[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] Help, it’s not working!



Hi,

I can't get virt-sysprep to work.

What are you trying to do?
- I want to clean a virtual machine before creating a template from it.

What exact command(s) did you run?
- sudo virt-sysprep -v -x -a /var/lib/libvirt/images/centos_8_stream.qcow2

I use sudo because centos_8_stream.qcow2 belongs to root:root. If I change the permissions to access it without superuser permissions, the error is the same.

What was the precise error or output of these commands?
- Find attached the output of the previous command.

Command executed to retrieve output: sudo virt-sysprep -v -x -a /var/lib/libvirt/images/centos_8 _stream.qcow2 > output.log 2>&1

Include the version of libguestfs, the operating system version, and how you installed libguestfs (eg. from source, yum install, etc.)
- virt-sysprep 1.42.0,
- libguestfs 1.42.0-5
- Linux lap-001-1 5.12.1-arch1-1 #1 SMP PREEMPT Sun, 02 May 2021 12:43:58 +0000 x86_64 GNU/Linux

Library installed this way: yay -S libguestfs

URL of the package: https://archlinux.org/packages/community/x86_64/libguestfs/

Thanks!

Best regards,

Adrien
[   0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network false
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "/var/lib/libvirt/images/centos_8_stream.qcow2" "readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 42, release: 0, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-sysprep
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/libguestfsomWtRn
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
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 x86_64
libguestfs: command: run: \ /usr/lib/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.0
supermin: package handler: arch/pacman
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-0
libguestfs: loading previously cached test results
libguestfs: qemu version: 6.0
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: command: run: file
libguestfs: command: run: \ -- /var/tmp/.guestfs-0/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-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=/var/lib/libvirt/images/centos_8_stream.qcow2,cache=writeback,discard=unmap,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,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/tmp/libguestfsHeYxIC/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=86c4d92f-1cec-4950-ffff8281-16dec027ffffb04b selinux=0 guestfs_verbose=1 TERM=xterm-256color"
qemu-system-x86_64: -enable-fips: warning: -enable-fips is deprecated, please build QEMU with the `libgcrypt` library as the cryptography provider to enable FIPS compliance
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 04/27/17
SGABIOS $Id$ (pbonzini donizetti) gio 27 apr 2017, 08.36.57, UTC
Term: 80x24
4 0
\x1b[2J
SeaBIOS (version ArchLinux 1.14.0-1)


Booting from ROM...

\x1b[2J[    0.074269] usbserial: usb_serial_init - registering generic driver failed
[    0.074894] 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=86c4d92f-1cec-4950-ffff8281-16dec027ffffb04b selinux=0 guestfs_verbose=1 TERM=xterm-256color
supermin: uptime: 0.15 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_modern_dev.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
[    0.521158] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    0.521813] CPU: 0 PID: 1 Comm: init Not tainted 5.12.1-arch1-1 #1
[    0.522345] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014
[    0.523364] Call Trace:
[    0.523582]  dump_stack+0x76/0x94
[    0.523877]  panic+0x112/0x2e8
[    0.524147]  do_exit.cold+0xa7/0xb3
[    0.524455]  ? vfs_write+0x152/0x2a0
[    0.524770]  do_group_exit+0x33/0xa0
[    0.525084]  __x64_sys_exit_group+0x14/0x20
[    0.525452]  do_syscall_64+0x33/0x40
[    0.525767]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[    0.526209] RIP: 0033:0x441221
[    0.526513] 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
[    0.528116] RSP: 002b:00007fffed427cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[    0.528772] RAX: ffffffffffffffda RBX: 00000000004b3230 RCX: 0000000000441221
[    0.529394] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
[    0.530015] RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 00000000004b3600
[    0.530635] R10: 0000000000441fb7 R11: 0000000000000246 R12: 00000000004b3230
[    0.531254] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
[    0.531889] Kernel Offset: 0x3b800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.532818] Rebooting in 1 seconds..
libguestfs: child_cleanup: 0x555efeeaa3f0: child process died
libguestfs: sending SIGTERM to process 23314
libguestfs: qemu maxrss 187040K
libguestfs: trace: launch = -1 (error)
virt-sysprep: error: libguestfs error: guestfs_launch failed, see earlier 
error messages
libguestfs: trace: close
libguestfs: closing guestfs handle 0x555efeeaa3f0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsomWtRn
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsHeYxIC

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]