作者:pengdonglin137@163.com

 

在没有aarch64架构的开发板的情况下,可以使用Qemu来模拟一个支持KVM的AArch64位的host,然后再在其上运行一个开启KVM加速的Qemu虚拟机,如下图所示:

 基于ARM64的Qemu/KVM学习环境搭建

 

软件版本如下:

1: x86_64上运行的是ubuntu20.04

2:qemu版本是5.1.0,ubuntu16.04,内核版本5.8,因为要编译运行在aarch64上qemu版本, 所以这里使用了ubuntu文件系统(可以参考https://www.cnblogs.com/pengdonglin137/p/9540670.html)

3和4:qemu版本是4.1.0, 内核版本5.8,为了加快虚拟机的启动速度,这里使用ramdisk文件系统

 

启动2的命令如下:

!/bin/bash

QEMU=/home/pengdl/work1/Qemu/qemu-5.1.0/build/bin/qemu-system-aarch64

sudo $QEMU\ -M virt,gic-version=3,virtualization=on,type=virt \ -cpu cortex-a57 -nographic -smp 8 -m 8800 \ -fsdev local,security_model=passthrough,id=fsdev0,path=/home/pengdl/kvm_study/share \ -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \ -drive if=none,file=./ubuntu_40G.ext4,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 \ -append "noinitrd root=/dev/vda rootfstype=ext4 rw" \ -kernel ./Image \ -nic tap \ -nographic

 

启动3和4的命令如下:

#!/bin/bash

sudo /home/pengdl/qemu-5.1.0/build/bin/qemu-system-aarch64 \
        -M virt,gic-version=3,accel=kvm \
        -cpu cortex-a57 -nographic -smp 2 -m 4000  \
        -fsdev local,security_model=passthrough,id=fsdev0,path=/home/pengdl/share \
        -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \
        -append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc" \
        -initrd ./ramdisk.img \
        -kernel ./Image \
        -nographic

 

AArch64的Host和Guest使用的使用了相同的内核镜像,使用arm64的默认配置编译,如果要支持ramdisk文件系统的话,还需要调整一下配置。

 

编译运行在x86上的qemu的命令如下:

#!/bin/bash

../configure --prefix=`pwd` \
    --target-list=arm-softmmu,aarch64-softmmu,i386-softmmu,x86_64-softmmu,riscv32-softmmu,riscv64-softmmu,aarch64-linux-user,arm-linux-user,riscv64-linux-user,x86_64-linux-user \
    --audio-drv-list=alsa,sdl,pa \
    --enable-system \
    --enable-user \
    --enable-linux-user \
    --enable-sdl \
    --enable-vnc \
    --enable-virtfs \
    --enable-kvm \
    --enable-fdt \
    --enable-debug \
    --disable-strip \
    --enable-debug-tcg \
    --enable-debug-info

 

编译运行在aarch64上的qemu的命令如下:

#!/bin/bash

../configure --prefix=`pwd` \
    --target-list=aarch64-softmmu \
    --enable-kvm \
    --enable-virtfs 

 

Host的启动log:

pengdl@pengdl-dell:~/kvm_study$ ./run_host.sh 
[sudo] password for pengdl: 
sudo tunctl -u root -t tap0
TUNSETIFF: Device or resource busy
sudo ifconfig tap0 0.0.0.0 promisc up
sudo brctl addif br0 tap0
brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.5e3bffd05b0b    no        enp3s0
                            tap0
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[    0.000000] Linux version 5.8.0-g949c1b5-dirty (pengdl@pengdl-dell) (aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0, GNU ld (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 2.32.0.20190321) #8 SMP PREEMPT Sat Aug 29 16:32:00 CST 2020
[    0.000000] Machine model: linux,dummy-virt
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 32 MiB at 0x00000000fe000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x0000000265ffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x264ebe100-0x264ebffff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x0000000265ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000265ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000265ffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 23 pages/cpu s53912 r8192 d32104 u94208
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 832075
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: ARM erratum 834220
[    0.000000] CPU features: detected: EL2 vector hardening
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] ARM_SMCCC_ARCH_WORKAROUND_1 missing from firmware
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2217600
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: noinitrd root=/dev/vda rootfstype=ext4 rw
[    0.000000] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
[    0.000000] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x7bfff000-0x7ffff000] (64MB)
[    0.000000] Memory: 8691600K/9011200K available (13628K kernel code, 2170K rwdata, 7480K rodata, 5568K init, 481K bss, 286832K reserved, 32768K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=8.
[    0.000000]     Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 224 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[    0.000000] random: get_random_bytes called from start_kernel+0x314/0x4e4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[    0.000644] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[    0.032765] Console: colour dummy device 80x25
[    0.046314] printk: console [tty0] enabled
[    0.058175] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[    0.058957] pid_max: default: 32768 minimum: 301
[    0.065874] LSM: Security Framework initializing
[    0.074522] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.075387] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.244948] rcu: Hierarchical SRCU implementation.
[    0.278436] EFI services will not be available.
[    0.284762] smp: Bringing up secondary CPUs ...
[    0.299348] Detected PIPT I-cache on CPU1
[    0.301813] GICv3: CPU1: found redistributor 1 region 0:0x00000000080c0000
[    0.302489] CPU1: Booted secondary processor 0x0000000001 [0x411fd070]
[    0.319962] Detected PIPT I-cache on CPU2
[    0.320260] GICv3: CPU2: found redistributor 2 region 0:0x00000000080e0000
[    0.320630] CPU2: Booted secondary processor 0x0000000002 [0x411fd070]
[    0.329608] Detected PIPT I-cache on CPU3
[    0.329919] GICv3: CPU3: found redistributor 3 region 0:0x0000000008100000
[    0.330272] CPU3: Booted secondary processor 0x0000000003 [0x411fd070]
[    0.338145] Detected PIPT I-cache on CPU4
[    0.338462] GICv3: CPU4: found redistributor 4 region 0:0x0000000008120000
[    0.338796] CPU4: Booted secondary processor 0x0000000004 [0x411fd070]
[    0.345939] Detected PIPT I-cache on CPU5
[    0.346283] GICv3: CPU5: found redistributor 5 region 0:0x0000000008140000
[    0.346645] CPU5: Booted secondary processor 0x0000000005 [0x411fd070]
[    0.353264] Detected PIPT I-cache on CPU6
[    0.353582] GICv3: CPU6: found redistributor 6 region 0:0x0000000008160000
[    0.353945] CPU6: Booted secondary processor 0x0000000006 [0x411fd070]
[    0.361382] Detected PIPT I-cache on CPU7
[    0.361703] GICv3: CPU7: found redistributor 7 region 0:0x0000000008180000
[    0.362062] CPU7: Booted secondary processor 0x0000000007 [0x411fd070]
[    0.363882] smp: Brought up 1 node, 8 CPUs
[    0.368186] SMP: Total of 8 processors activated.
[    0.368869] CPU features: detected: 32-bit EL0 Support
[    0.369297] CPU features: detected: CRC32 instructions
[    0.369606] CPU features: detected: 32-bit EL1 Support
[    0.821221] CPU: All CPU(s) started at EL2
[    0.823477] alternatives: patching kernel code
[    1.027448] devtmpfs: initialized
[    1.083207] KASLR enabled
[    1.102331] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    1.103746] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    1.127388] pinctrl core: initialized pinctrl subsystem
[    1.182900] thermal_sys: Registered thermal governor 'step_wise'
[    1.183265] thermal_sys: Registered thermal governor 'power_allocator'
[    1.187302] DMI not present or invalid.
[    1.233542] NET: Registered protocol family 16
[    1.254206] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    1.256317] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    1.258042] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    1.259406] audit: initializing netlink subsys (disabled)
[    1.267903] audit: type=2000 audit(1.064:1): state=initialized audit_enabled=0 res=1
[    1.295434] cpuidle: using governor menu
[    1.302565] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    1.307628] ASID allocator initialised with 32768 entries
[    1.335554] Serial: AMBA PL011 UART driver
[    1.700648] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 40, base_baud = 0) is a PL011 rev1
[    1.752377] printk: console [ttyAMA0] enabled
[    1.978236] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    1.979171] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    1.980027] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    1.980542] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    2.031858] cryptd: max_cpu_qlen set to 1000
[    2.092349] ACPI: Interpreter disabled.
[    2.127002] iommu: Default domain type: Translated 
[    2.133187] vgaarb: loaded
[    2.142466] SCSI subsystem initialized
[    2.157615] usbcore: registered new interface driver usbfs
[    2.159586] usbcore: registered new interface driver hub
[    2.162663] usbcore: registered new device driver usb
[    2.178314] pps_core: LinuxPPS API ver. 1 registered
[    2.178897] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.180055] PTP clock support registered
[    2.185497] EDAC MC: Ver: 3.0.0
[    2.216904] FPGA manager framework
[    2.221250] Advanced Linux Sound Architecture Driver Initialized.
[    2.276280] clocksource: Switched to clocksource arch_sys_counter
[    2.291661] VFS: Disk quotas dquot_6.6.0
[    2.293107] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.300711] pnp: PnP ACPI: disabled
[    2.416548] NET: Registered protocol family 2
[    2.439861] tcp_listen_portaddr_hash hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    2.441273] TCP established hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    2.444354] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    2.446573] TCP: Hash tables configured (established 131072 bind 65536)
[    2.453123] UDP hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    2.455977] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    2.464992] NET: Registered protocol family 1
[    2.483236] RPC: Registered named UNIX socket transport module.
[    2.484380] RPC: Registered udp transport module.
[    2.485172] RPC: Registered tcp transport module.
[    2.485775] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.486979] PCI: CLS 0 bytes, default 64
[    2.532112] hw perfevents: enabled with armv8_pmuv3 PMU driver, 5 counters available
[    2.536683] kvm [1]: IPA Size Limit: 44bits
[    2.559619] kvm [1]: GICv3: no GICV resource entry
[    2.560989] kvm [1]: disabling GICv2 emulation
[    2.562369] kvm [1]: GIC system register CPU interface enabled
[    2.567590] kvm [1]: vgic interrupt IRQ1
[    2.576871] kvm [1]: Hyp mode initialized successfully
[    2.664544] Initialise system trusted keyrings
[    2.672429] workingset: timestamp_bits=44 max_order=22 bucket_order=0
[    2.779069] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.795020] NFS: Registering the id_resolver key type
[    2.796788] Key type id_resolver registered
[    2.797309] Key type id_legacy registered
[    2.798350] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.802637] 9p: Installing v9fs 9p2000 file system support
[    2.851086] Key type asymmetric registered
[    2.852159] Asymmetric key parser 'x509' registered
[    2.853534] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    2.855307] io scheduler mq-deadline registered
[    2.856232] io scheduler kyber registered
[    3.000025] pl061_gpio 9030000.pl061: PL061 GPIO chip registered
[    3.027605] pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
[    3.031306] pci-host-generic 4010000000.pcie:       IO 0x003eff0000..0x003effffff -> 0x0000000000
[    3.034007] pci-host-generic 4010000000.pcie:      MEM 0x0010000000..0x003efeffff -> 0x0010000000
[    3.035145] pci-host-generic 4010000000.pcie:      MEM 0x8000000000..0xffffffffff -> 0x8000000000
[    3.039907] pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
[    3.046667] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00
[    3.048319] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.049140] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    3.049761] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[    3.050498] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[    3.056262] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[    3.075219] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[    3.076926] pci 0000:00:01.0: reg 0x10: [io  0x0000-0x001f]
[    3.077938] pci 0000:00:01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    3.078590] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[    3.081461] pci 0000:00:02.0: [1af4:1009] type 00 class 0x000200
[    3.082088] pci 0000:00:02.0: reg 0x10: [io  0x0000-0x001f]
[    3.082717] pci 0000:00:02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    3.103063] pci 0000:00:01.0: BAR 6: assigned [mem 0x10000000-0x1003ffff pref]
[    3.104961] pci 0000:00:01.0: BAR 4: assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[    3.106088] pci 0000:00:02.0: BAR 4: assigned [mem 0x8000004000-0x8000007fff 64bit pref]
[    3.107011] pci 0000:00:01.0: BAR 0: assigned [io  0x1000-0x101f]
[    3.107821] pci 0000:00:02.0: BAR 0: assigned [io  0x1020-0x103f]
[    3.144695] EINJ: ACPI disabled.
[    3.320115] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[    3.331797] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[    3.416986] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    3.452418] SuperH (H)SCI(F) driver initialized
[    3.462052] msm_serial: driver initialized
[    3.488705] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    3.570256] brd: module loaded
[    3.711809] loop: module loaded
[    3.761953] virtio_blk virtio0: [vda] 83886080 512-byte logical blocks (42.9 GB/40.0 GiB)
[    3.763423] vda: detected capacity change from 0 to 42949672960
[    3.831356] megasas: 07.714.04.00-rc1
[    3.872631] physmap-flash 0.flash: physmap platform flash device: [mem 0x00000000-0x03ffffff]
[    3.879193] 0.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
[    3.881828] Intel/Sharp Extended Query Table at 0x0031
[    3.885395] Using buffer write method
[    3.888677] physmap-flash 0.flash: physmap platform flash device: [mem 0x04000000-0x07ffffff]
[    3.891413] 0.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
[    3.892309] Intel/Sharp Extended Query Table at 0x0031
[    3.894367] Using buffer write method
[    3.895564] Concatenating MTD devices:
[    3.895983] (0): "0.flash"
[    3.896289] (1): "0.flash"
[    3.896637] into device "0.flash"
[    4.028180] libphy: Fixed MDIO Bus: probed
[    4.039052] tun: Universal TUN/TAP device driver, 1.6
[    4.095361] thunder_xcv, ver 1.0
[    4.096347] thunder_bgx, ver 1.0
[    4.097240] nicpf, ver 1.0
[    4.120362] hclge is initializing
[    4.122235] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[    4.123023] hns3: Copyright (c) 2017 Huawei Corporation.
[    4.124933] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[    4.125545] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    4.126679] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    4.127441] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    4.128571] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[    4.129306] igb: Copyright (c) 2007-2014 Intel Corporation.
[    4.130460] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    4.131303] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    4.137429] sky2: driver version 1.30
[    4.152199] VFIO - User Level meta-driver version: 0.3
[    4.189422] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.190283] ehci-pci: EHCI PCI platform driver
[    4.192055] ehci-platform: EHCI generic platform driver
[    4.194908] ehci-orion: EHCI orion driver
[    4.198429] ehci-exynos: EHCI Exynos driver
[    4.202186] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.203529] ohci-pci: OHCI PCI platform driver
[    4.205171] ohci-platform: OHCI generic platform driver
[    4.207831] ohci-exynos: OHCI Exynos driver
[    4.219821] usbcore: registered new interface driver usb-storage
[    4.274446] rtc-pl031 9010000.pl031: registered as rtc0
[    4.278287] rtc-pl031 9010000.pl031: setting system clock to 2020-11-28T10:08:15 UTC (1606558095)
[    4.290465] i2c /dev entries driver
[    4.384553] sdhci: Secure Digital Host Controller Interface driver
[    4.385360] sdhci: Copyright(c) Pierre Ossman
[    4.392513] Synopsys Designware Multimedia Card Interface Driver
[    4.410108] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.446901] ledtrig-cpu: registered to indicate activity on CPUs
[    4.471787] usbcore: registered new interface driver usbhid
[    4.472576] usbhid: USB HID core driver
[    4.551982] NET: Registered protocol family 17
[    4.559986] 9pnet: Installing 9P2000 support
[    4.565208] Key type dns_resolver registered
[    4.571337] registered taskstats version 1
[    4.572091] Loading compiled-in X.509 certificates
[    4.618590] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    4.637979] ALSA device list:
[    4.639425]   No soundcards found.
[    4.662701] uart-pl011 9000000.pl011: no DMA platform data
[    4.913598] EXT4-fs (vda): recovery complete
[    4.919714] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null)
[    4.921755] VFS: Mounted root (ext4 filesystem) on device 254:0.
[    4.940540] devtmpfs: mounted
[    5.054115] Freeing unused kernel memory: 5568K
[    5.059456] Run /sbin/init as init process
[    6.076831] random: systemd: uninitialized urandom read (16 bytes read)
[    6.179556] random: systemd: uninitialized urandom read (16 bytes read)
[    6.280217] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    6.294513] systemd[1]: Detected virtualization qemu.
[    6.296325] systemd[1]: Detected architecture arm64.

Welcome to Ubuntu 16.04.6 LTS!

[    6.328954] systemd[1]: Set hostname to <ubuntu-arm64>.
[    6.839512] random: systemd: uninitialized urandom read (16 bytes read)
[    7.211380] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read)
[    7.358125] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read)
[    7.432198] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read)
[    9.399064] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[    9.424663] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    9.443639] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    9.464302] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    9.480181] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    9.488120] systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Swap.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Journal Socket.
         Starting Remount Root and Kernel File Systems...
         Mounting Huge Pages File System...
[  OK  ] Reached target Encrypted Volumes.
         Mounting Debug File System...
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Load Kernel Modules...
         Mounting POSIX Message Queue File System...
         Starting Set console keymap...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Mounting RPC Pipe File System...
[  OK  ] Listening on Syslog Socket.
         Starting Journal Service...
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted RPC Pipe File System.
[  OK  ] Started Remount Root and Kernel File Systems.
[   11.325976] systemd[1]: Started Load Kernel Modules.
[  OK  ] Started Load Kernel Modules.
[   11.564587] systemd[1]: Started Create Static Device Nodes in /dev.
[  OK  ] Started Create Static Device Nodes in /dev.
[   12.485134] systemd[1]: Starting udev Kernel Device Manager...
         Starting udev Kernel Device Manager...
[   12.564686] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[   12.669024] systemd[1]: Mounting Configuration File System...
         Mounting Configuration File System...
[   12.796258] systemd[1]: Starting Load/Save Random Seed...
         Starting Load/Save Random Seed...
[   12.941210] systemd[1]: Starting udev Coldplug all Devices...
         Starting udev Coldplug all Devices...
[  OK  ] Started Journal Service.
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started udev Kernel Device Manager.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Set console keymap.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Preprocess NFS configuration...
         Starting Create Volatile Files and Directories...
         Starting LSB: ebtables ruleset management...
         Starting Raise network interfaces...
[  OK  ] Started Preprocess NFS configuration.
[  OK  ] Reached target NFS client services.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started LSB: ebtables ruleset management.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on Virtual machine lock manager socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily apt download activities.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Listening on Virtual machine log manager socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
[  OK  ] Started Cgroup management daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting Login Service...
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Started Internet superserver.
         Starting System Logging Service...
[  OK  ] Started Regular background program processing daemon.
         Starting Permit User Sessions...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started System Logging Service.
[  OK  ] Started Login Service.
         Starting Set console scheme...
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
[  OK  ] Started Set console scheme.
[  OK  ] Found device /dev/ttyAMA0.
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting /etc/rc.local Compatibility...
         Starting Virtualization daemon...
         Starting OpenBSD Secure Shell server...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Started ifup for eth0.
[  OK  ] Started Set console font and keymap.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.

Ubuntu 16.04.6 LTS ubuntu-arm64 ttyAMA0

ubuntu-arm64 login: [   51.107941] libvirt-guests.sh[483]: libvirt-guests is configured not to start any guests on boot

Ubuntu 16.04.6 LTS ubuntu-arm64 ttyAMA0

ubuntu-arm64 login: pengdl
Password: 
Last login: Sat Nov 28 10:09:10 UTC 2020 from 192.168.2.11 on pts/0
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 5.8.0-g949c1b5-dirty aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
pengdl@ubuntu-arm64:~$ 
Host启动log

相关文章: