有人在 16.04 上成功运行过 virt-builder 吗?

有人在 16.04 上成功运行过 virt-builder 吗?

我已经尝试了好几天,但无济于事。

首先,我必须将 /boot/vmlinuz-* chmod 为 0644,因为出于某种原因它只有 root 才能读取。

但现在我无法让它工作,因为根据https://www.redhat.com/archives/libguestfs/2015-December/msg00036.html,如果找不到 /etc/fstab,Ubuntu 的 dhclient 将会失败。以下是完整日志:

$ virt-builder ubuntu-16.04
[   1.2] Downloading: http://libguestfs.org/download/builder/ubuntu-16.04.xz
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0xee66c0, program = virt-builder
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
[   1.9] Planning how to build this image
[   1.9] Uncompressing
[  27.3] Opening the new disk
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0xee6ca0, program = virt-builder
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: set_selinux false
libguestfs: trace: set_selinux = 0
libguestfs: trace: add_drive "ubuntu-16.04.img" "format:raw" "cachemode:unsafe"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version *>
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-builder
libguestfs: launch: version=1.32.2
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsOT2Jrh
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: [00004ms] begin building supermin appliance
libguestfs: [00004ms] run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.14
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed packages
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 195 packages, including dependencies
supermin: build: 6868 files
supermin: build: 3797 files, after matching excludefiles
supermin: build: 3799 files, after adding hostfiles
supermin: build: 3799 files, after removing unreadable files
supermin: build: 3803 files, after munging
supermin: kernel: picked kernel vmlinuz-4.4.0-51-generic
supermin: kernel: picked modules path /lib/modules/4.4.0-51-generic
supermin: kernel: kernel_version 4.4.0-51-generic
supermin: kernel: modules /lib/modules/4.4.0-51-generic
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-1000/appliance.d.vuw17x3f/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd '/var/tmp/.guestfs-1000/appliance.d.vuw17x3f/initrd'
supermin: ext2: wrote 11 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-1000/appliance.d.vuw17x3f to /var/tmp/.guestfs-1000/appliance.d
libguestfs: [04308ms] finished building supermin appliance
libguestfs: [04308ms] begin testing qemu features
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -version
libguestfs: qemu version 2.5
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: [04513ms] finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=13568608
[04520ms] /usr/bin/qemu-system-x86_64 \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=kvm:tcg \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /var/tmp/.guestfs-1000/appliance.d/kernel \
    -initrd /var/tmp/.guestfs-1000/appliance.d/initrd \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/home/vagrant/ubuntu-16.04.img,cache=unsafe,format=raw,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/var/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfsOT2Jrh/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -netdev user,id=usernet,net=169.254.0.0/16 \
    -device virtio-net-pci,netdev=usernet \
    -append 'panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=13568608 acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color'
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Could not open option rom 'sgabios.bin': No such file or directory
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.0-51-generic (buildd@lcy01-08) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #72-Uuntu SMP Thu Nov 24 18:29:54 UTC 2016 (Ubuntu 4.4.0-51.72-generic 4.4.30)
[    0.000000] Command line: panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=13568608 acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] x86/fpu: Legacy x87 FPU detected.
[    0.000000] x86/fpu: Using 'lazy' FPU context switches.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f3dffff] usable
[    0.000000] BIOS-e820: [mem 0x000000001f3e0000-0x000000001f3fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.8 present.
[    0.000000] e820: last_pfn = 0x1f3e0 max_arch_pfn = 0x400000000
[    0.000000] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT
[    0.000000] found SMP MP-table at [mem 0x000f6630-0x000f663f] mapped at [ffff8800000f6630]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] RAMDISK: [mem 0x1f2ce000-0x1f3dffff]
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000001f3dffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x1f2c9000-0x1f2cdfff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000001f3dffff]
[    0.000000]   Normal   empty
[    0.000000]   Device   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000001f3dffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000001f3dffff]
[    0.000000] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org
[    0.000000] Intel MultiProcessor Specification v1.4
[    0.000000] MPTABLE: OEM ID: BOCHSCPU
[    0.000000] MPTABLE: Product ID: 0.1
[    0.000000] MPTABLE: APIC at: 0xFEE00000
[    0.000000] Processor #0 (Bootup-CPU)
[    0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[    0.000000] Processors: 1
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] e820: [mem 0x1f400000-0xfffbffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] PERCPU: Embedded 33 pages/cpu @ffff88001f000000 s98008 r8192 d28968 u2097152
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 125849
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=13568608 acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Memory: 483256K/511480K available (8426K kernel code, 1285K rwdata, 3956K rodata, 1480K init, 1292K bss, 28224K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] \tBuild-time adjustment of leaf fanout to 64.
[    0.000000] \tRCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[    0.000000] NR_IRQS:16640 nr_irqs:256 16
[    0.000000] Console: colour *CGA 80x25
[    0.000000] console [ttyS0] enabled
[    0.000000] tsc: Fast TSC calibration failed
[    0.000000] tsc: Unable to calibrate against PIT
[    0.000000] tsc: No reference (HPET/PMTIMER) available
[    0.000000] tsc: Marking TSC unstable due to could not calculate TSC khz
[    0.024000] Calibrating delay loop (skipped) preset value.. 6784.30 BogoMIPS (lpj=13568608)
[    0.024000] pid_max: default: 32768 minimum: 301
[    0.024000] Security Framework initialized
[    0.024000] Yama: becoming mindful.
[    0.028000] AppArmor: AppArmor initialized
[    0.028000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.028000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.032000] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
[    0.032000] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
[    0.040000] Initializing cgroup subsys io
[    0.040000] Initializing cgroup subsys memory
[    0.044000] Disabling memory control group subsystem
[    0.044000] Initializing cgroup subsys devices
[    0.044000] Initializing cgroup subsys freezer
[    0.044000] Initializing cgroup subsys net_cls
[    0.044000] Initializing cgroup subsys perf_event
[    0.044000] itializing cgroup subsys net_prio
[    0.048000] Initializing cgroup subsys hugetlb
[    0.048000] Initializing cgroup subsys pids
[    0.052000] mce: CPU supports 10 MCE banks
[    0.052000] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[    0.052000] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[    0.220000] Freeing SMP alternatives memory: 32K (ffffffff820b5000 - ffffffff820bd000)
[    0.224000] ftrace: allocating 32053 entries in 126 pages
[    0.284000] smpboot: Max logical packages: 1
[    0.284000] smpboot: APIC(0) Converting physical 0 to logical package 0
[    0.284000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.404000] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
[    0.404000] Performance Events: Broken PMU hardware detected, using software events only.
[    0.404000] Failed to access perfctr msr (MSR c0010007 is 0)
[    0.408000] x86: Booted up 1 node, 1 CPUs
[    0.408000] smpboot: Total of 1 processors activated (6784.30 BogoMIPS)
[    0.408000] NMI watchdog: disabled (cpu0): hardware events not enabled
[    0.408000] NMI watchdog: Shutting down hard lockup detector on all cpus
[    0.420000] devtmpfs: initialized
[    0.432000] evm: security.selinux
[    0.432000] evm: security.SMACK64
[    0.432000] evm: security.SMACK64EXEC
[    0.432000] evm: security.SMACK64TRANSMUTE
[    0.432000] evm: security.SMACK64MMAP
[    0.432000] evm: security.ima
[    0.432000] evm: security.capability
[    0.436000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.440000] pinctrl core: initialized pinctrl subsystem
[    0.444000] RTC time: 22:22:07, date: 12/09/16
[    0.448000] NET: Registered protocol family 16
[    0.452000] cpuidle: using governor ladder
[    0.452000] cpuidle: using governor menu
[    0.456000] PCI: Using configuration type 1 for base access
[    0.468000] ACPI: Interpreter disabled.
[    0.468000] vgaarb: loaded
[    0.472000] SCSI subsystem initialized
[    0.472000] usbcore: registered new interface driver usbfs
[    0.472000] usbcore: registered new interface driver hub
[    0.472000] usbcore: registered new device driver usb
[    0.472000] PCI: Probing PCI hardware
[    0.472000] PCI host bridge to bus 0000:00
[    0.476000] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.476000] pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffff]
[    0.476000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.484000] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    0.484000] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    0.484000] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    0.484000] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    0.488000] pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
[    0.488000] pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
[    0.500000] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000]
[    0.504000] NetLabel: Initializing
[    0.504000] NetLabel:  domain hash size = 128
[    0.504000] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.508000] NetLabel:  unlabeled traffic allowed by default
[    0.512000] amd_nb: Cannot enumerate AMD northbridges
[    0.512000] clocksource: Switched to clocksource refined-jiffies
[    0.560003] AppArmor: AppArmor Filesystem Enabled
[    0.560003] pnp: PnP ACPI: disabled
[    0.580004] NET: Registered protocol family 2
[    0.580004] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.580004] TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
[    0.580004] TCP: Hash tables configured (established 4096 bind 4096)
[    0.580004] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.584004] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.584004] NET: Registered protocol family 1
[    0.584004] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.584004] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.584004] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.588004] Trying to unpack rootfs image as initramfs...
[    0.596005] Freeing initrd memory: 1096K (ffff88001f2ce000 - ffff88001f3e0000)
[    0.596005] platform rtc_cmos: registered platform RTC device (no PNP device found)
[    0.600005] Scanning for low memory corruption every 60 seconds
[    0.600005] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.600005] audit: initializing netlink subsys (disabled)
[    0.600005] audit: type=2000 audit(1481322127.600:1): initialized
[    0.608006] Initialise system trusted keyring
[    0.608006] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.620006] zbud: loaded
[    0.620006] VFS: Disk quotas dquot_6.6.0
[    0.620006] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.628007] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.628007] fuse init (API version 7.23)
[    0.632007] Key type big_key registered
[    0.632007] Allocating IMA MOK and blacklist keyrings.
[    0.636007] Key type asymmetric registered
[    0.636007] Asymmetric key parser 'x509' registered
[    0.636007] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.636007] io scheduler noop registered
[    0.636007] io scheduler deadline registered (default)
[    0.640008] io scheduler cfq registered
[    0.644008] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.644008] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.644008] virtio-pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 10
[    0.644008] virtio-pci 0000:00:02.0: virtio_pci: leaving for legacy driver
[    0.648008] virtio-pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 11
[    0.648008] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[    0.652008] virtio-pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 11
[    0.652008] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
[    0.652008] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[    0.656009] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.668009] Linux agpgart interface v0.103
[    0.704012] brd: module loaded
[    0.716012] loop: module loaded
[    0.724013] scsi host0: ata_piix
[    0.728013] scsi host1: ata_piix
[    0.728013] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc080 irq 14
[    0.728013] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc088 irq 15
[    0.732013] libphy: Fixed MDIO Bus: probed
[    0.732013] tun: Universal TUN/TAP device driver, 1.6
[    0.732013] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[    0.740014] PPP generic driver version 2.4.2
[    0.740014] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.740014] ehci-pci: EHCI PCI platform driver
[    0.744014] ehci-platform: EHCI generic platform driver
[    0.744014] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.744014] ohci-pci: OHCI PCI platform driver
[    0.744014] ohci-platform: OHCI generic platform driver
[    0.748014] uhci_hcd: USB Universal Host Controller Interface driver
[    0.748014] i8042: PNP: No PS/2 controller found. Probing ports directly.
[    0.752015] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.752015] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.756015] mousedev: PS/2 mouse device common for all mice
[    0.756015] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.760015] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[    0.760015] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
[    0.760015] i2c /dev entries driver
[    0.764015] device-mapper: uevent: version 1.0.3
[    0.764015] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: [email protected]
[    0.764015] ledtrig-cpu: registered to indicate activity on CPUs
[    0.768016] NET: Registered protocol family 10
[    0.780016] NET: Registered protocol family 17
[    0.780016] Key type dns_resolver registered
[    0.780016] microcode: AMD CPU family 0x6 not supported
[    0.784017] registered taskstats version 1
[    0.784017] Loading compiled-in X.509 certificates
[    0.792017] Loaded X.509 cert 'Build time autogenerated kernel key: 56603c66c9a77e946feb1e966c217ab15f551179'
[    0.792017] zswap: loaded using pool lzo/zbud
[    0.800018] Key type trusted registered
[    0.804018] Key type encrypted registered
[    0.804018] AppArmor: AppArmor sha1 policy hashing enabled
[    0.804018] ima: No TPM chip found, activating TPM-bypass!
[    0.804018] evm: HMAC attrs: 0x1
[    0.808018]   Magic number: 12:869:400
[    0.808018] rtc_cmos rtc_cmos: setting system clock to 2016-12-09 22:22:08 UTC (1481322128)
[    0.808018] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    0.808018] EDD information not available.
[    0.912025] Freeing unused kernel memory: 1480K (ffffffff81f43000 - ffffffff820b5000)
[    0.912025] Write protecting the kernel read-only data: 14336k
[    0.912025] Freeing unused kernel memory: 1800K (ffff88000183e000 - ffff880001a00000)
[    0.912025] Freeing unused kernel memory: 140K (ffff880001ddd000 - ffff880001e00000)
supermin: mounting /proc
supermin: uptime: 0.93 0.35
supermin: ext2 mini initrd starting up: 5.1.14 zlib xz
supermin: cmdline: panic=1 console=ttyS0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=13568608 acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 guestfs_network=1 TERM=xterm-256color
supermin: mounting /sys
supermin: internal insmod crc32-pclmul.ko
[    0.964028] PCLMULQDQ-NI instructions are not detected.
insmod: init_module: crc32-pclmul.ko: No such device
supermin: internal insmod crct10dif-pclmul.ko
insmod: init_module: crct10dif-pclmul.ko: No such device
supermin: internal insmod crc32.ko
supermin: internal insmod virtio-rng.ko
supermin: internal insmod scsi_transport_spi.ko
supermin: internal insmod virtio_scsi.ko
[    0.992030] scsi host2: Virtio SCSI HBA
[    0.996030] scsi 2:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
[    1.000030] scsi 2:0:1:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
[    1.092036] sd 2:0:0:0: [sda] 8388608 512-byte logical blocks: (4.29 GB/4.00 GiB)
[    1.092036] sd 2:0:0:0: [sda] Write Protect is off
[    1.092036] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.100036] sd 2:0:0:0: Attached scsi generic sg0 type 0
[    1.100036]  sda: sda1 sda2 < sda5 >
[    1.100036] sd 2:0:0:0: [sda] Attached SCSI disk
[    1.108037] sd 2:0:1:0: [sdb] 8388608 512-byte logical blocks: (4.29 GB/4.00 GiB)
[    1.108037] sd 2:0:1:0: [sdb] Write Protect is off
[    1.108037] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.112037] sd 2:0:1:0: [sdb] Attached SCSI disk
[    1.112037] sd 2:0:1:0: Attached scsi generic sg1 type 0
supermin: internal insmod crc-ccitt.ko
supermin: internal insmod crc-itu-t.ko
supermin: internal insmod crc7.ko
supermin: internal insmod crc8.ko
supermin: internal insmod libcrc32c.ko
supermin: picked /sys/block/sdb/dev as root device
supermin: creating /dev/root as block special 8:16
supermin: mounting new root on /root
[    1.144039] EXT4-fs (sdb): mounting ext2 file system using the ext4 subsystem
[    1.160040] EXT4-fs (sdb): mounted filesystem without journal. Opts:
supermin: chroot
main-loop: WARNING: I/O thread spun for 1000 iterations
Starting /init script ...
[    1.976091] random: systemd-tmpfile: uninitialized urandom read (16 bytes read, 62 bits of entropy available)
[    1.980091] random: systemd-tmpfile: uninitialized urandom read (16 bytes read, 64 bits of entropy available)
[    1.980091] random: systemd-tmpfile: uninitialized urandom read (16 bytes read, 64 bits of entropy available)
[/usr/lib/tmpfiles.d/journal-nocow.conf:26] Failed to replace specifiers: /var/log/journal/%m
[    1.988092] random: systemd-tmpfile: uninitialized urandom read (16 bytes read, 65 bits of entropy available)
[/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /run/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:28] Failed to replace specifiers: /run/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:29] Failed to replace specifiers: /run/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:32] Failed to replace specifiers: /var/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:33] Failed to replace specifiers: /var/log/journal/%m/system.journal
Failed to parse ACL "d:group:adm:r-x": No such file or directory. Ignoring
Failed to parse ACL "group:adm:r-x": No such file or directory. Ignoring
[/usr/lib/tmpfiles.d/systemd.conf:37] Failed to replace specifiers: /var/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:38] Failed to replace specifiers: /var/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:39] Failed to replace specifiers: /var/log/journal/%m/system.journal
starting version 229
[    2.136101] random: systemd-udevd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    2.140101] random: udevadm: uninitialized urandom read (16 bytes read, 75 bits of entropy available)
[    2.148102] random: udevadm: uninitialized urandom read (16 bytes read, 75 bits of entropy available)
[    2.156102] random: udevadm: uninitialized urandom read (16 bytes read, 75 bits of entropy available)
[    2.164103] random: udevadm: uninitialized urandom read (16 bytes read, 75 bits of entropy available)
[    2.172103] random: systemd-udevd: uninitialized urandom read (16 bytes read, 75 bits of entropy available)
[    3.020156] random: nonblocking pool is initialized
[    3.324175] kvm: Nested Virtualization enabled
/init: 86: /init: cannot create /sys/block/{h,s,ub,v}d*/queue/scheduler: Directory nonexistent
[    3.852208] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2
/sbin/dhclient-script: 34: /sbin/dhclient-script: cannot open /etc/fstab: No such file
RTNETLINK answers: File exists
<previous 2 messages repeated infinitely>

有没有人成功virt-builder在 Ubuntu 上运行过朋友?你是怎么做到的?

答案1

这已在上游提交中修复fd60be95091a1923e108f72caf251f5549eeccd0。该提交已反向移植到 1.32 稳定分支,但包含修复的第一个版本是 1.32.7(您正在运行 1.32.2)。因此,要么沿着稳定的 1.32 分支升级,要么自己反向移植该修复。

答案2

截至撰写本文时,Ubuntu 上的 libguestfs-tools 仍为 1.32.2 版本。从源代码构建它对我来说是可行的。
查看 libguestfs 页面了解编译细节
脚步:

sudo apt-get build-dep libguestfs
git clone https://github.com/libguestfs/libguestfs  
cd libguestfs/
./autogen.sh
make  

我遇到了一些问题,因为我尝试在 make 上执行 -j5,并且必须修复几个问题并以单线程重新运行它。

构建完成后,我决定不安装它(希望 ubuntu 最终会更新它),然后我像这样运行它:
sudo /path/to/libguestfs/run virt-builder fedora-23

相关内容