Bug 1789279
Summary: | virt-v2v should give more clear error info when use some special invalid uuids for disks | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | liuzi <zili> |
Component: | virt-v2v | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Vera <vwu> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9.0 | CC: | jsuchane, juzhou, kkiwi, mkletzan, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan |
Target Milestone: | beta | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | V2V | ||
Fixed In Version: | virt-v2v-1.45.1-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-12-07 21:35:16 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
liuzi
2020-01-09 09:13:40 UTC
Patches proposed upstream: https://www.redhat.com/archives/libguestfs/2020-January/msg00184.html Martin, this patch series got positive reviews upstream, but unfortunately there was no follow-on after version 3: https://listman.redhat.com/archives/libguestfs/2020-March/thread.html#00084 Would you mind taking a look at this series again? (In reply to Richard W.M. Jones from comment #3) I guess not much happens if this one does not get fixed and that's probably why I forgot about it. I'll try to send a new version so that we can get it through. Thanks for the reminder. Fixed upstream in: https://github.com/libguestfs/virt-v2v/commit/5a0662b1d85ef4cd07a0da937730f4b08f539989 Moving to RHEL 9 in the interests of not doing too much work in RHEL AV, and this is just an input validation change so not an important fix for AV. Verify with below builds: Virt-v2v-1.45.1-1.el9.1.x86_64 libguestfs-1.45.6-6.el9.x86_64 libvirt-7.4.0-1.el9.x86_64 nbdkit-1.26.1-1.el9.x86_64 virtio-win-1.9.15-3.el9.noarch Steps: 1.Check the v2v man page about options: -oo rhv-disk-uuid=UUID and --no-copy # man virt-v2v-output-rhv |grep disk-uuid -A6 -- -oo rhv-disk-uuid="UUID" This option can used to manually specify UUIDs for the disks when creating the virtual machine. If not specified, the oVirt engine will generate random UUIDs for the disks. Please note that: • you must pass as many -oo rhv-disk-uuid=UUID options as the amount of disks in the guest • the specified UUIDs are used as they are, without checking whether they are already used by other disks This option is considered advanced, and to be used mostly in combination with --no-copy. 2.Use virt-v2v to convert a guest from VMware to RHV and specify the disk's uuid scenario 1 Specify a valid uuid and make sure the uuid not used by other disks in rhv # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2019-x86_64_rhel9 -oo rhv-disk-uuid=2b20cbc1-9b8e-4e96-ad12-2b293d03a504 [ 1.1] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 [ 2.8] Creating an overlay to protect the source from being modified [ 4.6] Opening the overlay [ 10.1] Inspecting the overlay [ 15.9] Checking for sufficient free disk space in the guest [ 15.9] Estimating space required on target for each disk [ 15.9] Converting Windows Server 2019 Standard to run on KVM virt-v2v: warning: /usr/share/virt-tools/rhev-apt.exe is missing, but the output hypervisor is oVirt or RHV. Installing RHEV-APT in the guest would mean the guest is automatically updated with new drivers etc. You may wish to install RHEV-APT manually after conversion. virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 x86_64). virt-v2v looks for this driver in /usr/share/virtio-win/virtio-win.iso The guest will be configured to use a basic VGA display driver. virt-v2v: This guest has virtio drivers installed. [ 34.7] Mapping filesystem data to avoid copying unused and blank areas [ 36.2] Closing the overlay [ 36.3] Assigning disks to buses [ 36.3] Checking if the guest needs BIOS or UEFI to boot [ 36.3] Initializing the target -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -os nfs_data [ 37.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.iMNK2Y/nbdkit4.sock", "file.export": "/" } (raw) (100.00/100%) [ 264.0] Creating output metadata [ 265.2] Finishing off [root@hp-dl380eg8-01 ~]# Result 1:The conversion can be finished successfully and on the rhv, the new guest's disk-uuid is correct. scenario 2 Specify a valid uuid but which already used by other disks in rhv # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2016-x86_64_rhel9 -oo rhv-disk-uuid=2b20cbc1-9b8e-4e96-ad12-2b293d03a504 Traceback (most recent call last): File "/tmp/v2v.Umsan1/rhv-upload-precheck.py", line 107, in <module> raise RuntimeError("Disk with the UUID '%s' already exists" % uuid) RuntimeError: Disk with the UUID '2b20cbc1-9b8e-4e96-ad12-2b293d03a504' already exists virt-v2v: error: failed server prechecks, see earlier errors If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] # Result 2:The conversion was failed and virt-v2v gave a clear error info. scenario 3 Specify a invalid uuid which not conform to the format # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2016-x86_64_rhel9 -oo rhv-disk-uuid=abcdefghg virt-v2v: error: -o rhv-upload: invalid UUID for -oo rhv-disk-uuid If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Result 3:The conversion was failed and virt-v2v gave an expected error info. scenario 4 Use unassigned rhv-disk-uuid parameter # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2016-x86_64_rhel9 -oo rhv-disk-uuid= virt-v2v: error: -o rhv-upload: invalid UUID for -oo rhv-disk-uuid If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] # Result 4: The conversion was failed and virt-v2v gave an expected error info scenario 5 Specify rhv-disk-uuid=00000000-0000-0000-0000-000000000000 which conform to the format # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2016-x86_64_rhel9 -oo rhv-disk-uuid=00000000-0000-0000-0000-000000000000 virt-v2v: error: -o rhv-upload: invalid UUID for -oo rhv-disk-uuid If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] # Result 5: The conversion was failed and virt-v2v gave an expected error info Scenario 6:Specify rhv-disk-uuid=fc236597-1041-4885-bec9-1d71257c256u, which is illegal but conform to the format # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-x86_64 -ip /home/esx_passwd -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -it vddk -io vddk-libdir=/vddktest -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhv_passwd -oo rhv-cluster=Default -oo rhv-direct -on esx7.0-win2016-x86_64_rhel9 -oo rhv-disk-uuid=fc236597-1041-4885-bec9-1d71257c256u virt-v2v: error: -o rhv-upload: invalid UUID for -oo rhv-disk-uuid If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] # Result 6: The conversion was failed and virt-v2v gave an expected error info |