Error launching libguestfs appliance

Comment 1 Richard W.M. Jones 2020-11-07 22:03:11 UTC
Description of problem:

When I start a VM I get the following error message: "Error launching libguestfs appliance: /usr/bin/supermin"
Then when I run: libguestfs-test-tool  it gives me: supermin: failure: failed to parse epoch:version-release field 2.04-11.1


Version-Release number of selected component (if applicable):
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.42.0


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Running virt-manager to manage qemu virtual machines on Manjaro Linux (kernel 5.9)

Output for libguestfs-test-tool:

PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
XDG_RUNTIME_DIR=/run/user/1000
SELinux: sh: getenforce: Kommando nicht gefunden.
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-system-x86_64
guestfs_get_memsize: 768
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.42.0
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/libguestfsratTkg
libguestfs: launch: umask=0022
libguestfs: launch: euid=1000
libguestfs: begin building supermin appliance
libguestfs: 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/guestfs/supermin.d
libguestfs: command: run:  -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.2.0
supermin: package handler: arch/pacman
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: build: /usr/lib/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: failure: failed to parse epoch:version-release field 2.04-11.1
libguestfs: Fehler: /usr/bin/supermin beendet mit Fehlerstatus 1, see debug messages above
libguestfs: closing guestfs handle 0x557a42e072c0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run:  -rf /tmp/libguestfsratTkg


Comment 1


Richard W.M. Jones



2020-11-07 22:03:11 UTC

What Linux distro is this?  What exact version is installed and where is it from?

Linux manjaro 5.9.3-1-MANJARO #1 SMP PREEMPT Sun Nov 1 14:25:36 UTC 2020 x86_64 GNU/Linux (based on Arch Linux)

libguestfs was installed from the official distro repostitories

libguestfs-test-tools and the repo information tells me, that version 1.42.0 is installed (see my post above with the output of libguestfs-test-tools )

Running the libguest test it seems to end as expected ( we pass in the CI vsmt here).

We probably will need to check if the wrapped is being used/working in these tests + issues with F35 and the cluster host.

I will try to run kola tests with the libguest debug.

LIBGUESTFS_BACKEND=direct
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SELinux: Disabled
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-system-ppc64
guestfs_get_memsize: 1280
guestfs_get_network: 0
guestfs_get_path: /usr/lib64/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /tmp
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: powerpc64le
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.46.2fedora=35,release=1.fc35,libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: unix
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsqp50c1
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: begin building supermin appliance
libguestfs: 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-0/lock
libguestfs: command: run:  --copy-kernel
libguestfs: command: run:  -f ext2
libguestfs: command: run:  --host-cpu powerpc64le
libguestfs: command: run:  /usr/lib64/guestfs/supermin.d
libguestfs: command: run:  -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.3.1
supermin: rpm: detected RPM version 4.17
supermin: rpm: detected RPM architecture ppc64le
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-packages-xfs type uncompressed packages
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 188 packages, including dependencies
supermin: build: 35419 files
supermin: build: 8467 files, after matching excludefiles
supermin: build: 8478 files, after adding hostfiles
supermin: build: 8439 files, after removing unreadable files
supermin: build: 8461 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: picked vmlinuz /lib/modules/5.15.18-200.fc35.ppc64le/vmlinuz
supermin: kernel: kernel_version 5.15.18-200.fc35.ppc64le
supermin: kernel: modpath /lib/modules/5.15.18-200.fc35.ppc64le
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.ntsf1ugk/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-0/appliance.d.ntsf1ugk/initrd'
supermin: ext2: wrote 37 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.ntsf1ugk to /var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-ppc64, in /var/tmp/.guestfs-0
libguestfs: command: run: /usr/bin/qemu-system-ppc64
libguestfs: command: run:  -display none
libguestfs: command: run:  -help
libguestfs: command: run: /usr/bin/qemu-system-ppc64
libguestfs: command: run:  -display none
libguestfs: command: run:  -machine pseries,accel=kvm:tcg
libguestfs: command: run:  -device ?
libguestfs: command: run: echo '{ "execute": "qmp_capabilities" }' '{ "execute": "query-qmp-schema" }' '{ "execute": "quit" }'  | QEMU_AUDIO_DRV=none "/usr/bin/qemu-system-ppc64" -display none -machine "pseries,accel=kvm:tcg" -qmp stdio
libguestfs: did not understand QMP monitor output from /usr/bin/qemu-system-ppc64 (ignored)
libguestfs: command: run: echo '{ "execute": "qmp_capabilities" }' '{ "execute": "query-kvm" }' '{ "execute": "quit" }'  | QEMU_AUDIO_DRV=none "/usr/bin/qemu-system-ppc64" -display none -machine "pseries,accel=kvm:tcg" -qmp stdio
libguestfs: did not understand QMP monitor output from /usr/bin/qemu-system-ppc64 (ignored)
libguestfs: saving test results
libguestfs: QMP parse error: '[' or '{' expected near end of file (ignored)
libguestfs: QMP parse error: '[' or '{' expected near end of file (ignored)
libguestfs: qemu version: 6.1
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: finished testing qemu features
/usr/bin/qemu-system-ppc64 
    -global virtio-blk-pci.scsi=off 
    -no-user-config 
    -nodefaults 
    -display none 
    -machine pseries,accel=kvm:tcg 
    -m 1280 
    -no-reboot 
    -rtc driftfix=slew 
    -kernel /var/tmp/.guestfs-0/appliance.d/kernel 
    -initrd /var/tmp/.guestfs-0/appliance.d/initrd 
    -object rng-random,filename=/dev/urandom,id=rng0 
    -device virtio-rng-pci,rng=rng0 
    -device virtio-scsi-pci,id=scsi 
    -drive file=/tmp/libguestfsqp50c1/scratch1.img,cache=unsafe,format=raw,id=hd0,if=none 
    -device scsi-hd,drive=hd0 
    -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none 
    -device scsi-hd,drive=appliance 
    -device virtio-serial-pci 
    -serial stdio 
    -chardev socket,path=/tmp/libguestfsd6gFaR/guestfsd.sock,id=channel0 
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 
    -append "panic=1 console=hvc0 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=16c82726-639b-4e93-a394-dd8faf328dc5 selinux=0 guestfs_verbose=1 TERM=xterm"
qemu-system-ppc64: Failed to set KVM's VSMT mode to 1 (errno -22)
On PPC, a VM with 1 threads/core on a host with 8 threads/core requires the use of VSMT mode 1.
This KVM seems to be too old to support VSMT.
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x10034a91320: child process died
libguestfs: sending SIGTERM to process 829
libguestfs: error: /usr/bin/qemu-system-ppc64 exited with error status 1, see debug messages above
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x10034a91320 (state 0)
libguestfs: command: run: rm
libguestfs: command: run:  -rf /tmp/libguestfsqp50c1
libguestfs: command: run: rm
libguestfs: command: run:  -rf /tmp/libguestfsd6gFaR

I installed the community/libguestfs 1.42.0-5 packages, but when I run the command  libguestfs-test-tool the result is not the expected

I try to modify the qcow2 images using the  virt-customize -a CentOS-7-x86_64-GenericCloud-2009.qcow2 —root-password password:xpto and the result is the same

Can someone help me?

     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
XDG_RUNTIME_DIR=/run/user/1000
SELinux: sh: line 1: getenforce: command not found
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-system-x86_64
guestfs_get_memsize: 768
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.42.0
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/libguestfsX7gkDQ
libguestfs: launch: umask=0022
libguestfs: launch: euid=1000
libguestfs: begin building supermin appliance
libguestfs: 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/guestfs/supermin.d
libguestfs: command: run: -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.2.0
supermin: package handler: arch/pacman
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-1000
libguestfs: loading previously cached test results
libguestfs: qemu version: 5.2
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: finished testing qemu features
libguestfs: command: run: file
libguestfs: command: run: — /var/tmp/.guestfs-1000/appliance.d/root
/usr/bin/qemu-system-x86_64
    -global virtio-blk-pci.scsi=off
    -no-user-config
    -enable-fips
    -nodefaults
    -display none
    -machine accel=kvm:tcg
    -cpu host
    -m 768
    -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
    -object rng-random,filename=/dev/urandom,id=rng0
    -device virtio-rng-pci,rng=rng0
    -device virtio-scsi-pci,id=scsi
    -drive file=/tmp/libguestfsX7gkDQ/scratch1.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,format=raw
    -device scsi-hd,drive=appliance
    -device virtio-serial-pci
    -serial stdio
    -device sga
    -chardev socket,path=/run/user/1000/libguestfsoOwJMW/guestfsd.sock,id=channel0
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0
    -append «panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=d1b20073-49a7-428b-ffffa7e6-c57ca94b31d2 selinux=0 guestfs_verbose=1 TERM=xterm-256color»
libguestfs: responding to serial console Device Status Report
x1b[1;256rx1b[256;256Hx1b[6n
Google, Inc.
Serial Graphics Adapter 04/27/17
SGABIOS $Id$ (pbonzini@donizetti) gio 27 apr 2017, 08.36.57, UTC
Term: 80×24
4 0
SeaBIOS (version ArchLinux 1.14.0-1)
Booting from ROM…
x1b[2J[    0.207899] usbserial: usb_serial_init — registering generic driver failed
[    0.209382] usbserial: usb_serial_init — returning with error -19
supermin: mounting /proc
supermin: ext2 mini initrd starting up: 5.2.0 glibc
supermin: cmdline: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=d1b20073-49a7-428b-ffffa7e6-c57ca94b31d2 selinux=0 guestfs_verbose=1 TERM=xterm-256color
supermin: uptime: 0.31 0.00
supermin: mounting /sys
supermin: internal insmod crc32-pclmul.ko
supermin: internal insmod crc32c-intel.ko
supermin: internal insmod crct10dif-pclmul.ko
supermin: internal insmod crc32_generic.ko
supermin: internal insmod crc32c_generic.ko
supermin: internal insmod nfit.ko
supermin: internal insmod ata_piix.ko
supermin: internal insmod virtio_blk.ko
supermin: internal insmod rng-core.ko
supermin: internal insmod virtio-rng.ko
supermin: internal insmod virtio_console.ko
supermin: internal insmod crypto_engine.ko
supermin: internal insmod virtio_crypto.ko
supermin: internal insmod failover.ko
supermin: internal insmod net_failover.ko
supermin: internal insmod virtio_net.ko
supermin: internal insmod nd_btt.ko
supermin: internal insmod nd_pmem.ko
supermin: internal insmod nd_virtio.ko
supermin: internal insmod virtio_pmem.ko
supermin: internal insmod rpmsg_core.ko
supermin: internal insmod rpmsg_ns.ko
supermin: internal insmod virtio_rpmsg_bus.ko
supermin: internal insmod virtio_scsi.ko
supermin: internal insmod virtio_balloon.ko
supermin: internal insmod virtio_dma_buf.ko
supermin: internal insmod virtio_input.ko
supermin: internal insmod virtio_mem.ko
supermin: internal insmod virtio_mmio.ko
supermin: internal insmod virtio_pci.ko
supermin: internal insmod vdpa.ko
supermin: internal insmod virtio_vdpa.ko
supermin: internal insmod jbd2.ko
supermin: internal insmod mbcache.ko
supermin: internal insmod crc16.ko
supermin: internal insmod ext4.ko
supermin: internal insmod fuse.ko
supermin: internal insmod virtiofs.ko
supermin: internal insmod crc-itu-t.ko
supermin: internal insmod crc4.ko
supermin: internal insmod crc64.ko
supermin: internal insmod crc7.ko
supermin: internal insmod crc8.ko
supermin: internal insmod libcrc32c.ko
supermin: root UUID is longer than 16 bytes
[    1.023134] Kernel panic — not syncing: Attempted to kill init! exitcode=0x00000100
[    1.024783] CPU: 0 PID: 1 Comm: init Not tainted 5.11.11-arch1-1 #1
[    1.026162] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014
[    1.027906] Call Trace:
[    1.028389]  dump_stack+0x6b/0x83
[    1.029103]  panic+0x112/0x2e8
[    1.029660]  do_exit.cold+0xa7/0xb3
[    1.030286]  ? vfs_write+0x153/0x2a0
[    1.030932]  do_group_exit+0x33/0xa0
[    1.031644]  __x64_sys_exit_group+0x14/0x20
[    1.032772]  do_syscall_64+0x33/0x40
[    1.033519]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    1.034520] RIP: 0033:0x441221
[    1.035217] Code: c0 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 16 66 0f 1f 84 00 00 00 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00
[    1.039412] RSP: 002b:00007fff82a20d18 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[    1.041084] RAX: ffffffffffffffda RBX: 00000000004b3230 RCX: 0000000000441221
[    1.042495] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
[    1.044466] RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 00000000004b3600
[    1.046156] R10: 0000000000441fb7 R11: 0000000000000246 R12: 00000000004b3230
[    1.047494] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
[    1.049123] Kernel Offset: 0x2aa00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    1.051576] Rebooting in 1 seconds..
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x55fc3efd6e50: child process died
libguestfs: sending SIGTERM to process 30374
libguestfs: qemu maxrss 179528K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x55fc3efd6e50 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: -rf /tmp/libguestfsX7gkDQ
libguestfs: command: run: rm
libguestfs: command: run: -rf /run/user/1000/libguestfsoOwJMW

Best Regards,

[Impact]

An update to mainline kernel v4.13 breaks the supermin v5.1.14
package in Xenial. Supermin is a tool for preparing and building
very specific, tiny, virtual appliances which boot very fast. It
uses an ext2 file system disk image. Users of supermin functionality
like guestfish, libguestfs-test-tool, etc., all break in different
ways as a result, some catastrophic, but in each case, the tool
and virtual appliance are not usable. This impacts the
libguestfs-tools package (users of supermin).

This bug results in users not being able to upgrade their kernel,
specifically, use a kernel that is v4.13-based or later. A
workaround is to ensure that an earlier kernel (e.g. v4.4-based
Xenial kernels) is used by supermin. This can conflict
with user needs to use a later kernel for other reasons.

[Test Case]

1) Using the v5.1.14 supermin installed and running on a 4.13-based
   kernel like 4.13.0-32-generic #35~16.04.1-Ubuntu:
   (Assuming you have virtualization support packages etc. already
    installed):

    $ sudo apt-get install libguestfs-tools
    $ libguestfs-test-tool

     [appliance kernel panic or qemu crash or just a silent hang]

2) Using the v5.1.14 supermin version and running on a 4.13-based
   kernel like 4.13.0-32-generic #35~16.04.1-Ubuntu:

   # wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img -O /var/lib/libvirt/images/ubuntu-16.04-server-cloudimg-amd64-disk1.img

   # guestfish —rw -a /var/lib/libvirt/images/ubuntu-16.04-server-cloudimg-amd64-disk1.img
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
‘man’ to read the manual
‘quit’ to quit the shell

><fs> run
libguestfs: error: appliance closed the connection unexpectedly.
This usually means the libguestfs appliance crashed.

[Regression Potential]

* There might be errors in creation and management of tiny
  supermin appliances via tools in the libguestfs-tools
  package.

[Other Info]

* From the upstream patch description, brief explanation of
  the bug:

  «The ext2 filesystem on disk format has two ways to store symlinks.
  For symlinks >= 60 bytes in length, they are stored as files
  (so-called «slow symlinks»). For shorter symlinks the symlink is
  stored in the inode («fast symlinks»).

  Previously we only created slow symlinks even if they are shorter than
  60 bytes. This didn’t matter until recently, when a change went into
  the upstream kernel which assumes that symlinks shorter than 60 bytes
  are always stored in the inode, thus breaking the filesystems that we
  created before…»

  Note that the real fix is to switch to use ext2fs_symlink() to create
  links.

* A fix for this problem went into upstream supermin v5.1.18.
  Thus this bug affects supermin < v5.1.18, and kernel >= v4.13.

* Thus this bug only affects the Ubuntu Xenial distro release:

   supermin = v5.1.14
   kernel = v4.13.*

  Artful includes the v4.1.18 supermin package (which has the symlink fix)
  and Bionic has a later one (v4.1.19). Thus neither is affected by
  this issue. Trusty is running an older version (4.1.6-1) of supermin
  but is not running the v4.13 or later kernel, and is thus not affected
  either.

* This fix has been tested successfully on Xenial and shown to fix the
  reported and related breakages as listed in the Test Case section
  and more.

* A public PPA test package for Xenial is available to test with
  and has been tested by at least one user who was seeing the
  problem, successfully.

* This fix backports 2 patches from upstream:

   1. ext2: Don’t load whole files into memory when copying to the appliance (RHBZ#1113065).
   2. ext2: Create symlinks properly (RHBZ#1470157).

   Patch 1 is necessary as it supplies some dependent code
   used by Patch 2; and Patch 2 does not compile cleanly without
   it.

  https://github.com/libguestfs/supermin/commit/158854e3ba4be7f6b8d81f662ddad98358ede1de

  https://github.com/libguestfs/supermin/commit/f5a3deef588759c49dc862427a265aced612002d

  Both patches are contained to a single file (ext2fs-c.c).

* The fixed supermin has been tested with older (< 4.13) kernels
  as well, with no regression or issues.

* There is no security impact / aspect to this change (as confirmed
  by a quick review from security team member)

—-

Original Description
=====================
after upgrade to 4.13.0-26-generic #29~16.04.2-Ubuntu all the virt-* tools not work anymore

running the libguestfs-test-tool shows that the qemu kernel crashes
[ 0.755354] Kernel panic — not syncing: Attempted to kill init! exitcode=0x00000100
[ 0.755354]
[ 0.756619] CPU: 0 PID: 1 Comm: init Not tainted 4.13.0-26-generic #29~16.04.2-Ubuntu
[ 0.757893] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
[ 0.759157] Call Trace:
[ 0.759444] dump_stack+0x63/0x8b
[ 0.760847] panic+0xe4/0x23d
[ 0.761184] do_exit+0xae6/0xaf0
[ 0.761547] ? dput+0x34/0x1f0
[ 0.762292] do_group_exit+0x43/0xb0
[ 0.762690] SyS_exit_group+0x14/0x20
[ 0.763333] entry_SYSCALL_64_fastpath+0x1e/0x81
[ 0.764221] RIP: 0033:0x451579
[ 0.764799] RSP: 002b:00007ffda4fe3768 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[ 0.766275] RAX: ffffffffffffffda RBX: 0000000001415cb3 RCX: 0000000000451579
[ 0.767056] RDX: 0000000000000008 RSI: 0000000000000001 RDI: 0000000000000001
[ 0.768290] RBP: 0000000001415c30 R08: 000000000000003c R09: 00000000000000e7
[ 0.769451] R10: ffffffffffffffd0 R11: 0000000000000246 R12: 0000000000000000
[ 0.770651] R13: 0044b82fa09b5a53 R14: 0000000000000000 R15: 0000000001415c30
[ 0.772563] Kernel Offset: 0x3cc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 0.774729] Rebooting in 1 seconds..
libguestfs: error: appliance closed the connect

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.13.0-26-generic 4.13.0-26.29~16.04.2
ProcVersionSignature: Ubuntu 4.13.0-26.29~16.04.2-generic 4.13.13
Uname: Linux 4.13.0-26-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
Date: Mon Jan 15 07:03:40 2018
InstallationDate: Installed on 2017-07-14 (184 days ago)
InstallationMedia: Ubuntu-Server 16.04.2 LTS «Xenial Xerus» — Release amd64 (20170215.8)
SourcePackage: linux-hwe
UpgradeStatus: No upgrade log present (probably fresh install)

When I use virt-sysprep, I saw the following errors.

guestfsd: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory

In my case, after upgrading an appliance of guestfs with “update-guestfs-appliance” command, I could solve this error.

Here are trial and error logs I did.

KVM host: Ubuntu 13.10

virtual machine: CentOS 6.5

# guestfish —version

guestfish 1.22.4

# virt-sysprep —version

virt-sysprep 1.22.4

# qemu-system-x86_64 —version

QEMU emulator version 1.5.0 (Debian 1.5.0+dfsg-3ubuntu5.4), Copyright (c) 2003-2008 Fabrice Bellard

error

# virt-sysprep  —enable ssh-hostkeys,udev-persistent-net -a /var/lib/KVM_images/foobar.qcow2

Examining the guest …

Fatal error: exception Guestfs.Error(«guestfs_launch failed.

This usually means the libguestfs appliance failed to start or crashed.

See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs

or run ‘libguestfs-test-tool’ and post the *complete* output into a

bug report

run as debug mode.

# virt-sysprep  —enable ssh-hostkeys,udev-persistent-net -a /var/lib/KVM_images/foobar.qcow2

guestfsd: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory

[    1.395248] Unregister pv shared memory for cpu 0

[    1.395959] sd 2:0:1:0: [sdb] Synchronizing SCSI cache

[    1.397359] sd 2:0:0:0: [sda] Synchronizing SCSI cache

[    1.398840] reboot: Restarting system

[    1.399376] reboot: machine restart

libguestfs: child_cleanup: 0x2288f30: child process died

libguestfs: sending SIGTERM to process 12114

Fatal error: exception Guestfs.Error(«guestfs_launch failed, see earlier error messages»)

libguestfs: closing guestfs handle 0x2288f30 (state 0)

libguestfs: command: run: rm

libguestfs: command: run: -rf /tmp/libguestfsiwwYZ1

run libguestfs-test-tool.

same errors.

# libguestfs-test-tool

uptime: 1.29 0.74

guestfsd: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory

[    1.304720] Unregister pv shared memory for cpu 0

[    1.305483] sd 2:0:1:0: [sdb] Synchronizing SCSI cache

[    1.306562] sd 2:0:0:0: [sda] Synchronizing SCSI cache

[    1.339817] reboot: Restarting system

[    1.340285] reboot: machine restart

libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages

libguestfs: child_cleanup: 0x24399a0: child process died

libguestfs: sending SIGTERM to process 14987

libguestfs: error: guestfs_launch failed, see earlier error messages

libguestfs-test-tool: failed to launch appliance

libguestfs: closing guestfs handle 0x24399a0 (state 0)

libguestfs: command: run: rm

libguestfs: command: run: -rf /tmp/libguestfssEis6M

update appliance.

# update-guestfs-appliance

run libuestfs-test-tool again.

Okay.

# libguestfs-test-tool

umount /sysroot

fsync /dev/sda

guestfsd: main_loop: proc 282 (internal_autosync) took 0.03 seconds

libguestfs: sending SIGTERM to process 17227

libguestfs: closing guestfs handle 0x25579a0 (state 0)

libguestfs: command: run: rm

libguestfs: command: run: -rf /tmp/libguestfsuIeeBb

===== TEST FINISHED OK =====

run virt-sysprep. okay.

# virt-sysprep  —enable ssh-hostkeys,udev-persistent-net,random-

seed -a /var/lib/KVM_images/foobar.qcow2

Examining the guest …

Performing «random-seed» …

Performing «ssh-hostkeys» …

Performing «udev-persistent-net» …

Понравилась статья? Поделить с друзьями:
  • Error launching installer при удалении программы
  • Error launching installer при удалении ccleaner
  • Error launching installer teamspeak 3
  • Error launching installer rage mp
  • Error launching installer photoshop