Laszlo Ersek
2021-Sep-27 06:34 UTC
[Libguestfs] [virt-v2v PATCH 0/4] Build and test suite fixes
After (1) applying the libnbd patch at <https://listman.redhat.com/archives/libguestfs/2021-September/msg00158.html>, (2) creating a symlink to the just-built nbdkit binary under ~/bin, (3) applying these virt-v2v patches, and (4) masking the in-place v2v test temporarily with SKIP_TEST_V2V_IN_PLACE_SH=1, I can run "make" and "make check" successfully in the virt-v2v tree. Thanks, Laszlo Laszlo Ersek (4): Makefile.am: use $(LIBNBD_LIBS) for linking OCaml programs test-v2v-cdrom: update the CD-ROM's bus to SATA in the converted domain test-v2v-i-ova: update the CD-ROM's bus to SATA in the converted domain test-v2v-i-ova: spell out viosock element in output domain XML convert/Makefile.am | 1 + output/Makefile.am | 1 + v2v/Makefile.am | 1 + tests/test-v2v-cdrom.expected | 2 +- tests/test-v2v-cdrom.xml.in | 4 +++- tests/test-v2v-i-ova.xml | 3 ++- 6 files changed, 9 insertions(+), 3 deletions(-) -- 2.19.1.3.g30247aa5d201
Laszlo Ersek
2021-Sep-27 06:34 UTC
[Libguestfs] [virt-v2v PATCH 1/4] Makefile.am: use $(LIBNBD_LIBS) for linking OCaml programs
Otherwise the build fails with errors such as> GEN helper-v2v-output > /usr/bin/ld: cannot find -lnbd > collect2: error: ld returned 1 exit status > File "caml_startup", line 1: > Error: Error during linking (exit code 1)in the "convert", "output" and "v2v" modules. (This patch is similar to guestfs-tools commit 9b0f2e2d5893 ("Makefile.am: use $(LIBGUESTFS_LIBS) for linking OCaml programs", 2021-09-06).) Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- convert/Makefile.am | 1 + output/Makefile.am | 1 + v2v/Makefile.am | 1 + 3 files changed, 3 insertions(+) diff --git a/convert/Makefile.am b/convert/Makefile.am index bb7c444f4aed..398bc1ed77a3 100644 --- a/convert/Makefile.am +++ b/convert/Makefile.am @@ -99,6 +99,7 @@ OCAMLCLIBS = \ $(LIBGUESTFS_LIBS) \ $(LIBXML2_LIBS) \ $(LIBOSINFO_LIBS) \ + $(LIBNBD_LIBS) \ -lgnu OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' diff --git a/output/Makefile.am b/output/Makefile.am index 46e6560cb2bf..a63ad4c70d45 100644 --- a/output/Makefile.am +++ b/output/Makefile.am @@ -140,6 +140,7 @@ OCAMLCLIBS = \ $(LIBGUESTFS_LIBS) \ $(LIBXML2_LIBS) \ $(JANSSON_LIBS) \ + $(LIBNBD_LIBS) \ -lgnu OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' diff --git a/v2v/Makefile.am b/v2v/Makefile.am index 1ce11814e193..f1073d96399f 100644 --- a/v2v/Makefile.am +++ b/v2v/Makefile.am @@ -83,6 +83,7 @@ OCAMLCLIBS = \ $(JANSSON_LIBS) \ $(LIBOSINFO_LIBS) \ $(LIBINTL) \ + $(LIBNBD_LIBS) \ -lgnu OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' -- 2.19.1.3.g30247aa5d201
Laszlo Ersek
2021-Sep-27 06:34 UTC
[Libguestfs] [virt-v2v PATCH 2/4] test-v2v-cdrom: update the CD-ROM's bus to SATA in the converted domain
Per commit ac39fa292c31 ("v2v: Set machine type explicitly for outputs which support it (RHBZ#1581428).", 2020-12-04), Windows 7 guests (which are "more modern" than Windows XP guests) are converted to Q35, not I440FX boards. Per related commit d0267122e348 ("v2v: -o libvirt: Map IDE disks to bus="sata" on Q35.", 2020-12-04), when a Windows 7 guest with an IDE CD-ROM -- hence, an I440FX board -- is converted, the CD-ROM in the converted domain will be on the SATA bus (Q35 does not have an IDE controller, only a SATA controller). Because the Windows guest used in "test-v2v-cdrom" is "Windows 7 Phony Edition", it triggers the above cascade, and currently fails with:> --- ./test-v2v-cdrom.expected 2021-09-03 22:51:31.026185527 +0200 > +++ test-v2v-cdrom.d/disks 2021-09-19 13:01:47.471745622 +0200 > @@ -4,5 +4,5 @@ > </disk> > <disk device='cdrom' type='file'> > <driver name='qemu' type='raw'/> > - <target dev='hdc' bus='ide'/> > + <target dev='sdc' bus='sata'/> > </disk> > ./test-v2v-cdrom.sh: unexpected disk assignmentsThe conversion seems correct, but the test expectation is stale. Most probably, commit d0267122e348 missed updating the test data. Do it now. Fixes: d0267122e348202f6fac4d833f7448409e7129c9 Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- tests/test-v2v-cdrom.expected | 2 +- tests/test-v2v-cdrom.xml.in | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-v2v-cdrom.expected b/tests/test-v2v-cdrom.expected index 34d2bf5961b0..17bd152d8e64 100644 --- a/tests/test-v2v-cdrom.expected +++ b/tests/test-v2v-cdrom.expected @@ -4,5 +4,5 @@ </disk> <disk device='cdrom' type='file'> <driver name='qemu' type='raw'/> - <target dev='hdc' bus='ide'/> + <target dev='sdc' bus='sata'/> </disk> diff --git a/tests/test-v2v-cdrom.xml.in b/tests/test-v2v-cdrom.xml.in index 6bad5eab1cd4..a6e1e3f514d5 100644 --- a/tests/test-v2v-cdrom.xml.in +++ b/tests/test-v2v-cdrom.xml.in @@ -35,7 +35,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='@abs_top_builddir@/test-data/phony-guests/blank-disk.img'/> - <!-- virt-v2v should preserve the device name and bus --> + <!-- virt-v2v should change the bus to sata, due to Windows 7 + triggering a machine type change from i440fx to q35. Beyond that, + virt-v2v should preserve the on-bus index. --> <target dev='hdc' bus='ide'/> </disk> </devices> -- 2.19.1.3.g30247aa5d201
Laszlo Ersek
2021-Sep-27 06:34 UTC
[Libguestfs] [virt-v2v PATCH 3/4] test-v2v-i-ova: update the CD-ROM's bus to SATA in the converted domain
Using the argument from the "test-v2v-cdrom: update the CD-ROM's bus to SATA in the converted domain" patch earlier in this series. Fixes: d0267122e348202f6fac4d833f7448409e7129c9 Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- tests/test-v2v-i-ova.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml index 671476b95d96..a018fd44aee8 100644 --- a/tests/test-v2v-i-ova.xml +++ b/tests/test-v2v-i-ova.xml @@ -28,7 +28,7 @@ </disk> <disk device='cdrom' type='file'> <driver name='qemu' type='raw'/> - <target dev='hda' bus='ide'/> + <target dev='sda' bus='sata'/> </disk> <disk device='floppy' type='file'> <driver name='qemu' type='raw'/> -- 2.19.1.3.g30247aa5d201
Laszlo Ersek
2021-Sep-27 06:34 UTC
[Libguestfs] [virt-v2v PATCH 4/4] test-v2v-i-ova: spell out viosock element in output domain XML
This is likely an omission from commit 05f780c16f01 ("v2v: support configuration of viosock driver", 2021-02-26) -- if the converted Windows guest does not dispose over the virtio-sock guest drivers, an explicit "none"-model element is now generated in the domain XML. Fixes: 05f780c16f0135c657615520c2245b42de1efc3e Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- tests/test-v2v-i-ova.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml index a018fd44aee8..489c0ab09bcc 100644 --- a/tests/test-v2v-i-ova.xml +++ b/tests/test-v2v-i-ova.xml @@ -46,6 +46,7 @@ <backend model='random'>/dev/urandom</backend> </rng> <memballoon model='virtio'/> + <viosock model='none'/> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <console type='pty'/> -- 2.19.1.3.g30247aa5d201