Bug 2070186
Summary: | fix virtio-vsock check (for Linux guests) in virt-v2v | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | mxie <mxie> |
Component: | virt-v2v | Assignee: | Laszlo Ersek <lersek> |
Status: | CLOSED ERRATA | QA Contact: | mxie <mxie> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 9.1 | CC: | chhu, hongzliu, juzhou, kkiwi, lersek, rjones, tyan, tzheng, vwu, xiaodwan |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | virt-v2v-2.0.2-1.el9 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 09:56:05 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: | |||
Bug Depends On: | 2059287 | ||
Bug Blocks: |
Description
mxie@redhat.com
2022-03-30 14:59:35 UTC
[v2v PATCH] convert/linux_kernels: fix virtio-socket check Message-Id: <20220331105739.10682-1-lersek> https://listman.redhat.com/archives/libguestfs/2022-March/028512.html ... for Windows guests, the downstream virtio-win package should be modified; the osinfo-db extensions it installs should advertize the driver for virtio-socket. (In reply to Laszlo Ersek from comment #1) > [v2v PATCH] convert/linux_kernels: fix virtio-socket check > Message-Id: <20220331105739.10682-1-lersek> > https://listman.redhat.com/archives/libguestfs/2022-March/028512.html Upstream commit 482e74bb56a6. Verify the bug with below builds: virt-v2v-2.0.2-1.el9.x86_64 libguestfs-1.48.0-2.el9.x86_64 guestfs-tools-1.48.0-1.el9.x86_64 libvirt-libs-8.2.0-1.el9.x86_64 qemu-img-6.2.0-12.el9.x86_64 nbdkit-server-1.30.2-1.el9.x86_64 libnbd-1.12.2-1.el9.x86_64 Steps: 1. Convert a rhel9 guest from VMware to local libvirt # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd esx7.0-rhel9.0-x86_64 [ 0.0] Setting up the source: -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk esx7.0-rhel9.0-x86_64 [ 2.0] Opening the source [ 7.4] Inspecting the source [ 12.9] Checking for sufficient free disk space in the guest [ 12.9] Converting Red Hat Enterprise Linux 9.0 Beta (Plow) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 115.0] Mapping filesystem data to avoid copying unused and blank areas [ 115.9] Closing the overlay [ 116.2] Assigning disks to buses [ 116.2] Checking if the guest needs BIOS or UEFI to boot [ 116.2] Setting up the destination: -o libvirt [ 119.3] Copying disk 1/1 █ 100% [****************************************] [ 230.6] Creating output metadata [ 230.7] Finishing off 2.Check the guest after v2v conversion 2.1 Check guest libvirtxml about vsock # virsh dumpxml esx7.0-rhel9.0-x86_64 |grep vsock -A 2 <vsock model='virtio'> <cid auto='yes'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </vsock> </devices> </domain> 2.2 Power on guest, guest can boot into OS normally and virtio socket driver is loaded automatically # lspci |grep sock 07:00.0 Communication controller: Red Hat, Inc. Virtio socket (rev 01) 3. Convert a rhel8 guest from VMware to rhv by v2v # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data -b ovirtmgmt esx6.7-rhel8.5-x86_64 -ip /home/passwd [ 0.0] Setting up the source: -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk esx6.7-rhel8.5-x86_64 [ 2.1] Opening the source [ 7.8] Inspecting the source [ 17.9] Checking for sufficient free disk space in the guest [ 17.9] Converting Red Hat Enterprise Linux 8.5 (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 124.0] Mapping filesystem data to avoid copying unused and blank areas [ 125.0] Closing the overlay [ 125.3] Assigning disks to buses [ 125.3] Checking if the guest needs BIOS or UEFI to boot [ 125.3] Setting up the destination: -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data [ 145.9] Copying disk 1/1 █ 100% [****************************************] [ 520.9] Creating output metadata [ 532.6] Finishing off 4. Check the guest after v2v conversion 4.1 Check guest libvirtxml about vsock on rhv node, but there is no vsock device in guest xml 5.Convert a rhel7 guest to openstack by v2v # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -o openstack -oo server-id=v2v-appliance -ip /home/passwd esx7.0-rhel7.9-x86_64 [ 0.0] Setting up the source: -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk esx7.0-rhel7.9-x86_64 [ 3.8] Opening the source [ 16.4] Inspecting the source [ 31.2] Checking for sufficient free disk space in the guest [ 31.2] Converting Red Hat Enterprise Linux Server 7.9 (Maipo) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 277.6] Mapping filesystem data to avoid copying unused and blank areas [ 279.3] Closing the overlay [ 279.7] Assigning disks to buses [ 279.7] Checking if the guest needs BIOS or UEFI to boot [ 279.7] Setting up the destination: -o openstack -oo server-id=v2v-appliance Failed to set volume read-only access mode flag: Invalid volume: Volume 4b7423df-4c6a-4c2c-a735-a4eeb068235b status must be available to update readonly flag, but current status is: creating. (HTTP 400) (Request-ID: req-893ddc5c-1f48-4f30-8bbe-2fa3bb38333d) [ 301.1] Copying disk 1/1 █ 100% [****************************************] [ 559.1] Creating output metadata [ 565.2] Finishing off 5. Launch the volume as instance after v2v conversion and check the instance 5.1 Check guest libvirtxml about vsock on OSP compute node, but there is no vsock device in guest xml # virsh dumpxml instance-0000000b |grep vsock nothing Hi Laszlo, virtio-vsock device will be added to linux guest only when target is local libvirt, is it expected? (In reply to Laszlo Ersek from comment #2) > ... for Windows guests, the downstream virtio-win package should be > modified; the osinfo-db extensions it installs should advertize the driver > for virtio-socket. Filed bug2074536 to track this problem, thanks@ Hi mxie, virtio-socket support is currently only mapped to the libvirt and QEMU cmdline outputs. (The JSON output used to capture virtio-socket as well, but Rich recently removed the JSON output upstream altogether -- commit 4e6b389b4e27.) As far as I can tell, the RHV* / Openstack outputs have never been extened with virtio-socket. It even looks like these destination hypervisors don't support virtio-socket at all: - Regarding Openstack, the documentation at <https://docs.openstack.org/glance/latest/admin/useful-image-properties.html> does not speak about virtio-socket, and the source file "nova/objects/image_meta.py" in the openstack-nova component, with master @ 449aa39a964b also does not about "socket" in this context. - Regarding ovirt-engine -- I've looked for long, but I can't find any trace of vsock / virtio-socket support in it (in particular there seems to be no way to express it in the OVF). All "socket" occurrences relate to CPU topology. Thanks Laszlo, continue to verify the other linux guests with below builds: virt-v2v-2.0.3-1.el9.x86_64 libguestfs-1.48.0-2.el9.x86_64 guestfs-tools-1.48.0-1.el9.x86_64 libvirt-libs-8.2.0-1.el9.x86_64 qemu-img-6.2.0-12.el9.x86_64 nbdkit-server-1.30.2-1.el9.x86_64 libnbd-1.12.2-1.el9.x86_64 Steps: 1.Convert a ubuntu guest from VMware to local libvirt by v2v 1.1 # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-ubuntu20.04.2-x86_64-uefi -ip /home/passwd 1.2 Check vsock device in guest libvirtxml # virsh dumpxml esx7.0-ubuntu20.04.2-x86_64-uefi |grep vsock -A 2 <vsock model='virtio'> <cid auto='yes'/> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </vsock> </devices> </domain> 1.3 Power on guest and check if virtio socket driver is installed # lspci |grep sock 06:00.0 Communication controller: Red Hat, Inc. Device 1053 (rev 01) 2.Convert a debian guest from VMware to local libvirt by v2v 2.1 # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA esx6.7-debian10.1.0-i386 -ip /home/passwd 2.2 Check vsock device in guest libvirtxml # virsh dumpxml esx6.7-debian10.1.0-i386 |grep vsock -A 2 <vsock model='virtio'> <cid auto='yes'/> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </vsock> </devices> </domain> 2.3 Power on guest and check if virtio socket driver is installed # lspci |grep sock 06:00.0 Communication controller: Red Hat, Inc. Device 1053 (rev 01) 3.Convert opensuse guests rom VMware to local libvirt by v2v 3.1 Convert a opensuse42.3 from VMware to local libvirt by v2v # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-opensuse42.3-x86_64 -ip /home/passwd # virsh dumpxml esx7.0-opensuse42.3-x86_64 |grep vsock nothing 3.2 Convert a opensuse15.2 from VMware to local libvirt by v2v # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-opensuse15.2-x86_64 -ip /home/passwd # virsh dumpxml esx7.0-opensuse15.2-x86_64 |grep vsock -A 2 <vsock model='virtio'> <cid auto='yes'/> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </vsock> </devices> </domain> 4.Convert a SLES guest from VMware to local libvirt by v2v 4.1 # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-sles15sp2-x86_64 -ip /home/passwd 4.2 Check vsock device in guest libvirtxml # virsh dumpxml esx7.0-sles15sp2-x86_64 |grep vsock -A 2 <vsock model='virtio'> <cid auto='yes'/> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </vsock> </devices> </domain> 4.3 Power on guest and check if virtio socket driver is installed # lspci |grep sock 06:00.0 Communication controller: Red Hat, Inc. Device 1053 (rev 01) Hi Laszlo, Please check step3.1, there is no vsock device after converting opensuse42.3 to local libvirt, details please refer to log'v2v-convert-opensuse42.3-to-libvirt' Hi mxie, this result seems consistent with the log you attached; it's just the case, as far as I can tell, that opensuse 42.3 does not enable support for virtio-socket. According to the log, CONFIG_VIRTIO_VSOCKETS is checked, but not found, in the kernel config, by virt-v2v; furthermore, the "vmw_vsock_virtio_transport" kernel module is not found either. Interestingly, the following modules *are* present in the guest: "/lib/modules/4.4.76-1-default/kernel/net/vmw_vsock", "/lib/modules/4.4.76-1-default/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko", "/lib/modules/4.4.76-1-default/kernel/net/vmw_vsock/vsock.ko", however, "vmw_vsock_vmci_transport" enables vsock only on VMWare, and not on KVM! (It corresponds to the CONFIG_VMWARE_VMCI_VSOCKETS option.) So, the results are correct. In fact, you just ended up verifying that looking specifically for the *virtio transport* for vsock is the right thing for virt-v2v to do! Thanks! 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 (Low: virt-v2v security, bug fix, and enhancement update), 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/RHSA-2022:7968 |