Bug 2044911
| Summary: | virt-p2v conversion hangs with RHEL9 virt-v2v | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | tingting zheng <tzheng> |
| Component: | virt-v2v | Assignee: | Virtualization Maintenance <virt-maint> |
| Status: | CLOSED ERRATA | QA Contact: | tingting zheng <tzheng> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.0 | CC: | juzhou, lersek, mxie, rjones, tyan, tzheng, vwu, xiaodwan |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-v2v-1.45.97-3.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-17 13:42:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
tingting zheng
2022-01-25 10:46:58 UTC
Comments from Richard. Looking at the log and referring to: https://libguestfs.org/virt-p2v.1.html#how-virt-p2v-works we can see that port 34337 is set up as the ssh reverse forwarding port (ie. on localhost from the point of view of virt-v2v, connected to qemu-nbd on the virt-p2v host). We successfully set up nbdkit-nbd-plugin to forward in0 to this port. (This is different from how old virt-v2v worked - it would have created a qcow2 file backed by nbd:localhost:34337). Everything seems to go fine during conversion. However when we start copying we make several connections to in0 and I suspect what is happening is that nbdkit-nbd-plugin makes several connections to qemu-nbd. However qemu-nbd only permits a single connection by default and so the extra connections will deadlock. We cannot change virt-p2v (because RHEL 7), but we can patch virt-v2v. In this case nbdkit-nbd-plugin has a shared=true option which makes it share a single connection to the proxied nbd server (ie. qemu-nbd). So my guess is that the following patch will fix it: diff --git a/input/input_libvirt.ml b/input/input_libvirt.ml index 33f61086ec..42050c157b 100644 --- a/input/input_libvirt.ml +++ b/input/input_libvirt.ml @@ -76,6 +76,7 @@ and libvirt_servers dir disks = Nbdkit.add_filter cmd "cow"; Nbdkit.add_arg cmd "hostname" hostname; Nbdkit.add_arg cmd "port" (string_of_int port); + Nbdkit.add_arg cmd "shared" "true"; let _, pid = Nbdkit.run_unix ~socket cmd in (* --exit-with-parent should ensure nbdkit is cleaned Tingting tested this and confirmed the fix works. Tested the build and set Verified:Tested for this bug. Fixed upstream in: https://github.com/libguestfs/virt-v2v/commit/20019b5cadc1434ac09842e2045a7d5635561835 Tested the bug with: Virt-p2v-1.40.2-1.el7.iso libguestfs-1.46.1-2.el9.x86_64 virt-v2v-1.45.97-3.el9.x86_64 nbdkit-1.28.5-1.el9.x86_64 libvirt-8.0.0-2.el9.x86_64 qemu-kvm-6.2.0-5.el9.x86_64 1.Launch RHEL7 virt-p2v client, connect to RHEL9 server. 2.Use virt-p2v to start conversion to local kvm and RHV, the conversion can be finished successfully. Refer to the above comments, move the bug to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: virt-v2v), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2022:2566 |