Closed bsanders closed 1 year ago
It seems to be failing in the script here: https://github.com/libguestfs/virt-v2v/blob/c5c9aa2f77ff65e986e05023d232d6bad3caaace/test-data/phony-guests/make-fedora-img.pl#L103 which is calling: https://github.com/libguestfs/libguestfs/blob/188c5f7d939c9f3f753f400144035a77c9fb59ab/daemon/md.c#L96
but exactly why that fails is a mystery. I suggest:
$ LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 make -C test-data/phony-guests stamp-fedora-md.img
which should print out a lot more detail.
That's about as far as I followed it as well before thinking that I'd done something wrong and needed an adult.
It definitely printed more, so I put it in a pastebin: https://pastebin.com/Ukg5sT9M
Let me know if there's a better place to drop that data.
Here's a snippet that's got the nearby lines
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: mdadm --create --run bootdev --level raid1 --raid-devices 2 /dev/sda1 /dev/sdb1
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: Defaulting to version 1.2 metadata
[ 16.145753] md: personality for level 1 is not loaded!
mdadm: RUN_ARRAY failed: Invalid argument
[ 16.147849] md: md127 stopped.
guestfsd: error: mdadm: bootdev: mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: Defaulting to version 1.2 metadata
mdadm: RUN_ARRAY failed: Invalid argument
guestfsd: => md_create (0x12b) took 0.57 secs
libguestfs: trace: md_create = -1 (error)
md_create: mdadm: bootdev: mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: Defaulting to version 1.2 metadata
mdadm: RUN_ARRAY failed: Invalid argument at ./make-fedora-img.pl line 103.
libguestfs: trace: close
libguestfs: closing guestfs handle 0x559335e08ad0 (state 2)
libguestfs: trace: internal_autosync
guestfsd: <= internal_autosync (0x11a) request length 40 bytes
umount-all: /proc/mounts: fsname=/dev/root dir=/ type=ext2 opts=rw,noatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/proc dir=/proc type=proc opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/sys dir=/sys type=sysfs opts=rw,relatime freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev dir=/dev type=devtmpfs opts=rw,relatime,size=629804k,nr_inodes=157451,mode=755,inode64 freq=0 passno=0
umount-all: /proc/mounts: fsname=/dev/pts dir=/dev/pts type=devpts opts=rw,relatime,mode=600,ptmxmode=000 freq=0 passno=0
umount-all: /proc/mounts: fsname=shmfs dir=/dev/shm type=tmpfs opts=rw,relatime,inode64 freq=0 passno=0
umount-all: /proc/mounts: fsname=tmpfs dir=/run type=tmpfs opts=rw,nosuid,relatime,size=252832k,mode=755,inode64 freq=0 passno=0
commandrvf: stdout=n stderr=y flags=0x0
commandrvf: udevadm --debug settle -E /dev/sdb
The crucial bit is indeed:
commandrvf: mdadm --create --run bootdev --level raid1 --raid-devices 2 /dev/sda1 /dev/sdb1
...
[ 16.145753] md: personality for level 1 is not loaded!
mdadm: RUN_ARRAY failed: Invalid argument
Notice how the RAID1 module isn't loaded for some unclear reason. Apparently that is kernel/drivers/md/raid1.ko*
. So I guess first of all make sure the module exists on the host. Then you could try modifying the script to add:
$g->modprobe ("raid1");
just before this line of code: https://github.com/libguestfs/virt-v2v/blob/c5c9aa2f77ff65e986e05023d232d6bad3caaace/test-data/phony-guests/make-fedora-img.pl#L103
If that fixes it then it's something to do with autoloading of modules not working. If it doesn't fix it then it's a host kernel or module problem of some sort.
I did note that line - had no idea what the "personality" would be.
Relevant snip after inserting the modprobe
commandrvf: modprobe raid1
modprobe: FATAL: Module raid1 not found in directory /lib/modules/5.15.0-1042-kvm
guestfsd: error: modprobe: FATAL: Module raid1 not found in directory /lib/modules/5.15.0-1042-kvm
libguestfs: trace: modprobe = -1 (error)
modprobe: modprobe: FATAL: Module raid1 not found in directory /lib/modules/5.15.0-1042-kvm at ./make-fedora-img.pl line 103.
libguestfs: trace: close
Sure enough, modprobe raid1
on my building/host system (itself a "minimal install" VM) didn't work. So I re-created the build environment but on a non-minimal VM and now it's working (well, make check
is proceding). Other tests are failing, but I assume there's just more dependencies I need to install - if I run into problems I can't work out I'll open a separate issue.
Thanks for your help!
I've built virt-v2v (2.2.0 from downloads on libguestfs.org, but also from git head of tree, 2.3.5, and 2.2.0), but every build fails
make check
at the same spot. I'm wondering if I have a too new/old version of the guestfs perl module?All builds are done on an Ubuntu 22.04 system.
perl module in question is from the distro and is:
make check error: