Hi everybody,
my first post, pls go easy on me
so, I use a lot of debian VMs in KVM for testing purposes
I clone the original machine, change the hostname and recreate ssh host keys through a set of commands (or script)
the goal is to automate this process using libvirt
the clone part is working but Iām unable to use virt-sysprep to do the rest
$ sudo virt-clone -o debian11 -n debian11-clone --auto-clone
$ sudo virsh list --all
Id Name State
---------------------------------
- debian11 shut off
- debian11-clone shut off
$ sudo virt-sysprep -d debian11-clone --hostname debian11-clone -v
[FONT=monospace] 0.0] Examining the guest ...
[/FONT]libguestfs: opening libvirt handle: URI = NULL, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x559a46597030
...
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/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.1
supermin: rpm: detected RPM version 4.17
supermin: rpm: detected RPM architecture x86_64
supermin: rpm: detected zypper version 1.14.50
supermin: package handler: opensuse/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
...
[FONT=monospace]supermin: internal insmod crc32- 0.271202] T1] Module has invalid ELF structures
pclmul.ko.zst
insmod: init_module: crc32-pclmul.ko.zst: Invalid module format
supermin: internal insmod crc32c-intel.ko.zst
0.272210] T1] Module has invalid ELF structures
insmod: init_module: crc32c-intel.ko.zst: Invalid module format
supermin: internal insmod crct10dif-pclmul.ko.zst
0.272915] T1] Module has invalid ELF structures
insmod: init_module: crct10dif-pclmul.ko.zst: Invalid module format
supermin: internal insmod crc32_generic.ko.zst
[/FONT]...
insmod: init_module: virtio_snd.ko.zst: Invalid module format
supermin: waiting another 1024000000 ns for root UUID to appear
This usually means your kernel doesn't support virtio, or supermin was unable
to load some kernel modules (see module loading messages above).
supermin: waiting another 2048000000 ns for root UUID to appear
supermin: waiting another 4096000000 ns for root UUID to appear
supermin: waiting another 8192000000 ns for root UUID to appear
^C
$
I tried to summarize the output, if the full output is more usefull please let me know how can i share it
the errors seem to be only from supermin/insmod
I have the following packages installed
$ rpm -qa | grep -i guestfs
**guestfs**-tools-1.44.2-2.1.x86_64
lib**guestfs**-test-1.44.2-2.1.x86_64
**guestfs**d-1.44.2-2.1.x86_64
lib**guestfs**-devel-1.44.2-2.1.x86_64
lib**guestfs**0-1.44.2-2.1.x86_64
python3-lib**guestfs**-1.44.2-2.1.x86_64
perl-Sys-**Guestfs**-1.44.2-2.1.x86_64
**guestfs**-winsupport-1.44.2-2.1.x86_64
ocaml-lib**guestfs**-1.44.2-2.1.x86_64
**guestfs**-data-1.44.2-2.1.x86_64
acording to https://doc.opensuse.org/documentation/leap/archive/42.3/virtualization/html/book.virt/chap.guestfs.html
it should be working
is there a easy what to automate the process besides using virt-sysprep? (already tried using virt-costumize, got the same erros)
thank in advance
kenobi