Description of problem: V2V doesn't ask password if there is no option about password file in v2v command line Version-Release number of selected component (if applicable): virt-v2v-1.42.0-3.module+el8.3.0+6497+b190d2a5.x86_64 libguestfs-1.42.0-1.module+el8.3.0+6496+d39ac712.x86_64 How reproducible: 100% Steps to Reproduce: 1.Convert a guest from Vmware but don't set any option about password file in v2v command line # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel7.8-x86_64 virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_NONE: An error occurred, but the cause is unknown If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel7.8-x86_64 virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_NONE: An error occurred, but the cause is unknown If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Actual results: As above description Expected results: Should ask password if there is no option about password file in v2v command line Additional info: 1.Can't reproduce the bug on rhel8.2 Packages: virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64 libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64 Steps: # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel7.8-x86_64 [ 0.1] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel7.8-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 Enter root's password for 10.73.198.169: ^C # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel7.8-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel7.8-x86_64 Enter root's password for 10.73.198.169: ^C
I guess this is related to the new password code I added in virt-v2v 1.42.
(In reply to Richard W.M. Jones from comment #1) > I guess this is related to the new password code I added in virt-v2v 1.42. I Think this is rather related to the switch to ocaml-libvirt instead of the home-brew libvirt bindings. I'll take a look.
(In reply to Pino Toscano from comment #2) > I Think this is rather related to the switch to ocaml-libvirt instead of the > home-brew libvirt bindings. Indeed, that was it; luckly easy to fix: https://www.redhat.com/archives/libguestfs/2020-May/msg00049.html
(In reply to Pino Toscano from comment #3) > Indeed, that was it; luckly easy to fix: > https://www.redhat.com/archives/libguestfs/2020-May/msg00049.html Fixed upstream with: https://github.com/libguestfs/virt-v2v/commit/ce66cac50179baf2fb8b404f7eba49048c7819b0
Verify the bug with below builds: virt-v2v-1.42.0-4.module+el8.3.0+6798+ad6e66be.x86_64 libguestfs-1.42.0-2.module+el8.3.0+6798+ad6e66be.x86_64 libvirt-6.3.0-1.module+el8.3.0+6478+69f490bb.x86_64 qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64 nbdkit-1.20.2-1.module+el8.3.0+6764+cc503f20.x86_64 VMware-vix-disklib-7.0.0-15832853.x86_64.tar.gz Steps: 1.Convert a guest from VMware via vddk and don't set any option about password in v2v command line. Input the correct password according to the prompt, but nbdkit can't recognize the password # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel8.2-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA Enter root's password for 10.73.73.141: password: nbdkit: error: could not read password from stdin: Inappropriate ioctl for device virt-v2v: error: nbdkit did not start up. There may be errors printed by nbdkit above. If the messages above are not sufficient to diagnose the problem then add the ‘virt-v2v -v -x’ options and examine the debugging output carefully. If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] 2.Convert a guest from VMware without vddk and don't set any option about password in v2v command line. Input the correct password according to the prompt, can see conversion can finish successfully but v2v will ask password once more than v2v conversion via vddk # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 Enter root's password for 10.73.73.141: Enter host password for user 'root': Enter host password for user 'root': [ 32.6] Creating an overlay to protect the source from being modified [ 33.3] Opening the overlay [ 73.3] Inspecting the overlay [ 166.5] Checking for sufficient free disk space in the guest [ 166.5] Estimating space required on target for each disk [ 166.5] Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [2213.0] Mapping filesystem data to avoid copying unused and blank areas [2215.8] Closing the overlay [2216.1] Assigning disks to buses [2216.1] Checking if the guest needs BIOS or UEFI to boot [2216.1] Initializing the target -o libvirt -os default [2216.2] Copying disk 1/1 to /var/lib/libvirt/images/esx6.7-rhel8.2-x86_64-sda (raw) ^C (7.05/100%) Additional info: Can't reproduce the problem of step1 on rhel8.2 with below builds virt-v2v-1.40.2-23.module+el8.2.1+6797+0db00a40.x86_64 libguestfs-1.40.2-23.module+el8.2.1+6797+0db00a40.x86_64 libvirt-6.0.0-22.module+el8.2.1+6815+1c792dc8.x86_64 qemu-kvm-4.2.0-22.module+el8.2.1+6758+cb8d64c2.x86_64 nbdkit-1.16.2-4.module+el8.2.1+6710+effcb1df.x86_64 1.Convert a guest from VMware via vddk and don't set any option about password in v2v command line. Input the correct password according to the prompt, v2v convert can finish successfully. # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel8.2-x86_64 [ 0.1] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA Enter root's password for 10.73.73.141: password: [ 11.3] Creating an overlay to protect the source from being modified [ 12.4] Opening the overlay [ 20.0] Inspecting the overlay [ 36.3] Checking for sufficient free disk space in the guest [ 36.3] Estimating space required on target for each disk [ 36.3] Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM virt-v2v: warning: guest tools directory ‘linux/el8’ is missing from the virtio-win directory or ISO. Guest tools are only provided in the RHV Guest Tools ISO, so this can happen if you are using the version of virtio-win which contains just the virtio drivers. In this case only virtio drivers can be installed in the guest, and installation of Guest Tools will be skipped. virt-v2v: This guest has virtio drivers installed. [ 137.0] Mapping filesystem data to avoid copying unused and blank areas [ 137.8] Closing the overlay [ 138.1] Assigning disks to buses [ 138.1] Checking if the guest needs BIOS or UEFI to boot [ 138.1] Initializing the target -o libvirt -os default [ 138.2] Copying disk 1/1 to /var/lib/libvirt/images/esx6.7-rhel8.2-x86_64-sda (raw) (100.00/100%) [ 525.3] Creating output metadata Pool default refreshed Domain esx6.7-rhel8.2-x86_64 defined from /tmp/v2vlibvirt77fde8.xml [ 525.4] Finishing off Hi Pino, Please help to check the problem of step1, thanks!
Created attachment 1694038 [details] vddk-input-password-manually.log
(In reply to mxie from comment #7) > Steps: > 1.Convert a guest from VMware via vddk and don't set any option about > password in v2v command line. Input the correct password according to the > prompt, but nbdkit can't recognize the password > > # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it > vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel8.2-x86_64 > [ 0.0] Opening the source -i libvirt -ic > vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 > -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io > vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA > Enter root's password for 10.73.73.141: > password: > nbdkit: error: could not read password from stdin: Inappropriate ioctl for > device > virt-v2v: error: nbdkit did not start up. There may be errors printed by > nbdkit above. > > If the messages above are not sufficient to diagnose the problem then add > the ‘virt-v2v -v -x’ options and examine the debugging output > carefully. > > If reporting bugs, run virt-v2v with debugging enabled and include the > complete output: > > virt-v2v -v -x [...] Possible regression in nbdkit, forked off as bug 1842440. Thanks for spotting it.
virt-v2v further fix: https://www.redhat.com/archives/libguestfs/2020-June/msg00013.html
Verify the bug with below builds: virt-v2v-1.42.0-4.module+el8.3.0+6798+ad6e66be.x86_64 libguestfs-1.42.0-2.module+el8.3.0+6798+ad6e66be.x86_64 libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64 qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64 nbdkit-1.20.3-1.module+el8.3.0+6969+c553f4a0.x86_64 Steps: 1.Convert a guest from VMware via vddk and don't set any option about password in v2v command line. Input the correct password for password prompt, then v2v conversion can finish successfully and checkpoints of guest are passed # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel8.2-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA Enter root's password for 10.73.73.141: password: [ 15.0] Creating an overlay to protect the source from being modified [ 15.9] Opening the overlay [ 22.3] Inspecting the overlay [ 46.6] Checking for sufficient free disk space in the guest [ 46.6] Estimating space required on target for each disk [ 46.6] Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 203.3] Mapping filesystem data to avoid copying unused and blank areas [ 204.7] Closing the overlay [ 205.0] Assigning disks to buses [ 205.0] Checking if the guest needs BIOS or UEFI to boot [ 205.0] Initializing the target -o libvirt -os default [ 205.0] Copying disk 1/1 to /var/lib/libvirt/images/esx6.7-rhel8.2-x86_64-sda (raw) (100.00/100%) [ 549.7] Creating output metadata [ 549.7] Finishing off 2.Convert a guest from VMware without vddk and don't set any option about password in v2v command line. Input the correct password for password prompt, then v2v conversion can finish successfully and checkpoints of guest are passed # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 Enter root's password for 10.73.198.169: Enter host password for user 'root': Enter host password for user 'root': [ 20.0] Creating an overlay to protect the source from being modified [ 20.6] Opening the overlay [ 44.9] Inspecting the overlay [ 121.0] Checking for sufficient free disk space in the guest [ 121.0] Estimating space required on target for each disk [ 121.0] Converting Windows Server 2019 Standard to run on KVM virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing. Firstboot scripts may conflict with PnP. 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. [ 212.7] Mapping filesystem data to avoid copying unused and blank areas [ 214.0] Closing the overlay [ 214.3] Assigning disks to buses [ 214.3] Checking if the guest needs BIOS or UEFI to boot [ 214.3] Initializing the target -o libvirt -os default [ 214.3] Copying disk 1/1 to /var/lib/libvirt/images/esx7.0-win2019-x86_64-sda (raw) (100.00/100%) [ 990.4] Creating output metadata [ 990.5] Finishing off Result: According to above result, bug has been fixed, move bug from ON_QA to VERIFIED
(In reply to Richard W.M. Jones from comment #10) > virt-v2v further fix: > > https://www.redhat.com/archives/libguestfs/2020-June/msg00013.html FWIW this commit is now also upstream: https://github.com/libguestfs/virt-v2v/commit/36c008009a601634ec1c1fbc4f619b21988f075c https://github.com/libguestfs/virt-v2v/commit/16b551c77c88219a2f68e2fc37daf2dc4d88e4ed Not completely sure if we need it, given we did verify this bug already. This bug is complicated because as I recall the nbdkit fix on its own, or the virt-v2v fix on its own, either are sufficient to fix the problem.
(In reply to Richard W.M. Jones from comment #12) > (In reply to Richard W.M. Jones from comment #10) > > virt-v2v further fix: > > > > https://www.redhat.com/archives/libguestfs/2020-June/msg00013.html > > FWIW this commit is now also upstream: > > https://github.com/libguestfs/virt-v2v/commit/ > 36c008009a601634ec1c1fbc4f619b21988f075c > https://github.com/libguestfs/virt-v2v/commit/ > 16b551c77c88219a2f68e2fc37daf2dc4d88e4ed > > Not completely sure if we need it, given we did verify this bug already. > This > bug is complicated because as I recall the nbdkit fix on its own, or the > virt-v2v > fix on its own, either are sufficient to fix the problem. Backported in virt-v2v-1.42.0-5.module+el8.3.0+7152+ab3787c3, hence resetting to ON_QA.
Verify the bug with below builds: virt-v2v-1.42.0-5.module+el8.3.0+7152+ab3787c3.x86_64 libguestfs-1.42.0-2.module+el8.3.0+6798+ad6e66be.x86_64 libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64 qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64 nbdkit-1.20.4-2.module+el8.3.0+7165+edc86943.x86_64 Steps: 1.Convert a guest from vCenter via vddk and don't set any option about password in v2v command line, input the correct password for password prompt, then v2v conversion can finish successfully and checkpoints of guest are passed # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -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-rhel8.2-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel8.2-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA Enter root's password for 10.73.73.141: password: [ 17.1] Creating an overlay to protect the source from being modified [ 18.1] Opening the overlay [ 44.8] Inspecting the overlay [ 69.0] Checking for sufficient free disk space in the guest [ 69.0] Estimating space required on target for each disk [ 69.0] Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 224.4] Mapping filesystem data to avoid copying unused and blank areas [ 225.5] Closing the overlay [ 225.8] Assigning disks to buses [ 225.8] Checking if the guest needs BIOS or UEFI to boot [ 225.8] Initializing the target -o libvirt -os default [ 225.8] Copying disk 1/1 to /var/lib/libvirt/images/esx6.7-rhel8.2-x86_64-sda (raw) (100.00/100%) [ 594.3] Creating output metadata [ 594.3] Finishing off 2.Convert a guest from vCenter without vddk and don't set any option about password in v2v command line, input the correct password for password prompt, then v2v conversion can finish successfully and checkpoints of guest are passed # virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 [ 0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 Enter root's password for 10.73.198.169: Enter host password for user 'root': Enter host password for user 'root': [ 32.8] Creating an overlay to protect the source from being modified [ 33.4] Opening the overlay [ 58.0] Inspecting the overlay [ 134.5] Checking for sufficient free disk space in the guest [ 134.5] Estimating space required on target for each disk [ 134.5] Converting Windows Server 2019 Standard to run on KVM virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing. Firstboot scripts may conflict with PnP. 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. [ 236.7] Mapping filesystem data to avoid copying unused and blank areas [ 238.2] Closing the overlay [ 238.5] Assigning disks to buses [ 238.5] Checking if the guest needs BIOS or UEFI to boot [ 238.5] Initializing the target -o libvirt -os default [ 238.6] Copying disk 1/1 to /var/lib/libvirt/images/esx7.0-win2019-x86_64-sda (raw) (100.00/100%) [1032.2] Creating output metadata [1032.3] Finishing off 3.Convert a guest from ESXi host with vddk and don't set any option about esxi host password in v2v command line, input the correct password for password prompt, then v2v conversion can finish successfully and checkpoints of guest are passed # virt-v2v -ic esx://root.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=DE:EA:A1:09:27:38:48:89:48:CB:95:A6:2B:5C:00:F3:53:13:25:44 -o rhv-upload -os nfs_data -of raw -b ovirtmgmt -n ovirtmgmt -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oo rhv-verifypeer=true esx6.7-rhel7.8-x86_64 [ 1.0] Opening the source -i libvirt -ic esx://root.75.219/?no_verify=1 esx6.7-rhel7.8-x86_64 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=DE:EA:A1:09:27:38:48:89:48:CB:95:A6:2B:5C:00:F3:53:13:25:44 Enter root's password for 10.73.75.219: password: [ 7.7] Creating an overlay to protect the source from being modified nbdkit: vddk[1]: error: VixDiskLib: VixDiskLib_Connect: Get CEIP status failed, treat CEIP as disabled. Other error encountered: HTTP error response: Bad Request at 4844. [ 8.5] Opening the overlay nbdkit: vddk[2]: error: VixDiskLib: VixDiskLib_Connect: Get CEIP status failed, treat CEIP as disabled. Other error encountered: HTTP error response: Bad Request at 4844. [ 14.9] Inspecting the overlay [ 52.7] Checking for sufficient free disk space in the guest [ 52.7] Estimating space required on target for each disk [ 52.7] Converting Red Hat Enterprise Linux Server 7.8 (Maipo) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 230.4] Mapping filesystem data to avoid copying unused and blank areas [ 231.8] Closing the overlay [ 232.1] Assigning disks to buses [ 232.1] Checking if the guest needs BIOS or UEFI to boot [ 232.1] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -os nfs_data [ 233.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/tmp/v2vnbdkit.zzbHaA/nbdkit4.sock", "file.export": "/" } (raw) nbdkit: vddk[3]: error: VixDiskLib: VixDiskLib_Connect: Get CEIP status failed, treat CEIP as disabled. Other error encountered: HTTP error response: Bad Request at 4844. (100.00/100%) [1302.1] Creating output metadata [1303.8] Finishing off Result: According to above result, bug has been fixed, move bug from ON_QA 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 (virt:8.3 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/RHBA-2020:5137