Created attachment 1481585 [details] migration log Description of problem: When migrating VMs from VMware to RHV, the static IP address configuration is not retained post VM migration. This causes network connectivity failures. Version-Release number of selected component (if applicable): virt-v2v-1.36.10-6.16.rhvpreview.el7ev.x86_64 How reproducible: Every time. Steps to Reproduce: 1. Assign a static IP address to the source VM in VMware. 2. Use the IMS tooling to create an infrastructure mapping and migration plan. 3. Migrate the VM from VMware to RHV. 4. Post migration access the target VM and check the IP address configuration. Actual results: The VirtIO NIC doesn't get configured with the static IP address settings post migration. DHCP is not impacted. Expected results: Post migration, the source NIC(s) static IP address configuration is preserved and settings added to the VirtIO NIC(s) Additional info:
Created attachment 1481604 [details] Post migration E1000 adapter
Created attachment 1481605 [details] Post migration VirtIO NIC
Created attachment 1481606 [details] Post migration VirtIO NIC IP config
Created attachment 1481614 [details] Pre migration E1000 NIC IP config
Here's the information provided by VMware Tools for a running Windows 10 guest with 3 interfaces: $ PERL5LIB=../../lib/VMware/share ./guestinfo.pl --url https://vmware/sdk --operation display --vmname "Windows 10 Enterprise" [...] Windows 10 Enterprise net[0] - connected : 1 Windows 10 Enterprise net[0] - deviceConfigId : 4002 Windows 10 Enterprise net[0] - macAddress : 00:0c:29:e6:4d:b1 Windows 10 Enterprise net[0] - network : VM Network Windows 10 Enterprise net[0] - ipAddress : 2001:8b0:9ad:8728:c572:b8a4:6c72:9bba Windows 10 Enterprise net[0] - ipAddress : 2001:8b0:9ad:8728:d0bf:494d:efd7:afd2 Windows 10 Enterprise net[0] - ipAddress : fe80::c572:b8a4:6c72:9bba Windows 10 Enterprise net[0] - ipAddress : 192.168.0.109 Windows 10 Enterprise net[1] - connected : 1 Windows 10 Enterprise net[1] - deviceConfigId : 4001 Windows 10 Enterprise net[1] - macAddress : 00:0c:29:e6:4d:a7 Windows 10 Enterprise net[1] - network : VM Network Windows 10 Enterprise net[1] - ipAddress : 2001:8b0:9ad:8728:c65:fc28:f618:f2eb Windows 10 Enterprise net[1] - ipAddress : 2001:8b0:9ad:8728:e0c9:c09e:1508:8b04 Windows 10 Enterprise net[1] - ipAddress : fe80::c65:fc28:f618:f2eb Windows 10 Enterprise net[1] - ipAddress : 192.168.0.99 Windows 10 Enterprise net[2] - connected : 1 Windows 10 Enterprise net[2] - deviceConfigId : 4000 Windows 10 Enterprise net[2] - macAddress : 00:0c:29:e6:4d:9d Windows 10 Enterprise net[2] - network : VM Network Windows 10 Enterprise net[2] - ipAddress : 2001:8b0:9ad:8728:7494:538d:f227:c275 Windows 10 Enterprise net[2] - ipAddress : 2001:8b0:9ad:8728:a007:2dc9:efb5:1926 Windows 10 Enterprise net[2] - ipAddress : fe80::7494:538d:f227:c275 Windows 10 Enterprise net[2] - ipAddress : 192.168.0.89 Here's the VMX information for the same guest: ethernet0.addressType = "generated" ethernet0.generatedAddress = "00:0c:29:e6:4d:9d" ethernet0.generatedAddressOffset = "0" ethernet0.networkName = "VM Network" ethernet0.pciSlotNumber = "192" ethernet0.present = "TRUE" ethernet0.virtualDev = "e1000e" ethernet0.wakeOnPcktRcv = "FALSE" ethernet1.addressType = "generated" ethernet1.generatedAddress = "00:0c:29:e6:4d:a7" ethernet1.generatedAddressOffset = "10" ethernet1.networkName = "VM Network" ethernet1.pciSlotNumber = "224" ethernet1.present = "TRUE" ethernet1.uptCompatibility = "TRUE" ethernet1.virtualDev = "vmxnet3" ethernet2.addressType = "generated" ethernet2.generatedAddress = "00:0c:29:e6:4d:b1" ethernet2.generatedAddressOffset = "20" ethernet2.networkName = "VM Network" ethernet2.pciSlotNumber = "256" ethernet2.present = "TRUE" ethernet2.uptCompatibility = "TRUE" ethernet2.virtualDev = "vmxnet3"
I think this is the plan for how we implement this: (1) Fetch the MAC address + IP address data from VMware Tools as in previous comment. (2) Write a firstboot script to the guest which will: (a) Wait for interfaces to come up. (b) For each non-DHCP interface, examine the MAC address, and if present in the MAC address + IP address table collected in step (1), it will assign the fixed IP address to that interface. For (1), we're going to require that the Windows source VM is up and running at the point that whatever script which collects this data runs. Note this means it cannot be done from virt-v2v, but has to be done from another script (the wrapper?). However I can write this script (eg. in Python) and it's not a big deal because it's just using established VMware APIs. For (2), this requires some modifications to the existing Powershell script that I have written, but the basics are there already. We will need some command line parameters to pass the MAC/IP address mapping from the wrapper to virt-v2v.
Patches posted: https://www.redhat.com/archives/libguestfs/2019-April/thread.html#00114
Moving to RHEL 8.
Upstream in 1.41.5. The individual commits are: https://github.com/libguestfs/libguestfs/commit/e1e9b3845e76a4bb406d16b96283ac38677cd91f https://github.com/libguestfs/libguestfs/commit/dfd9fac7435cf2f9293961b6cc1fe316af4feebc
I can reproduce the bug with builds: virt-v2v-1.38.4-14.module+el8.1.0+4066+0f1aadab.x86_64 libguestfs-1.38.4-14.module+el8.1.0+4066+0f1aadab.x86_64 Steps to reproduce: 1. Configure network in VMware windows guest, change IP configuration from DHCP to static in Internet Protocol Version4 (TCP/IPv4) Properties dialog box of windows guest 2. Convert the guest from VMware to rhv by virt-v2v # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -b ovirtmgmt --password-file /home/passwd -of raw win2019-guest-static-ip -oo rhv-cluster=Default1 -os nfs_data [ 0.2] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 win2019-guest-static-ip -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 [ 2.1] Creating an overlay to protect the source from being modified nbdkit: error: VixDiskLib: VixDiskLibIsLegacyConnParams: the instance of VixDiskLibConnectParams is NOT allocated by VixDiskLib_AllocateConnectParams. The new features in 6.7 or later are not supported. [ 2.7] 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 [ 3.9] Opening the overlay nbdkit: error: VixDiskLib: VixDiskLibIsLegacyConnParams: the instance of VixDiskLibConnectParams is NOT allocated by VixDiskLib_AllocateConnectParams. The new features in 6.7 or later are not supported. [ 8.4] Inspecting the overlay [ 15.6] Checking for sufficient free disk space in the guest [ 15.6] Estimating space required on target for each disk [ 15.6] 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. [ 23.2] Mapping filesystem data to avoid copying unused and blank areas [ 23.5] Closing the overlay [ 23.7] Checking if the guest needs BIOS or UEFI to boot [ 23.7] Assigning disks to buses [ 23.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.N70Zxf/nbdkit1.sock", "file.export": "/" } (raw) nbdkit: error: VixDiskLib: VixDiskLibIsLegacyConnParams: the instance of VixDiskLibConnectParams is NOT allocated by VixDiskLib_AllocateConnectParams. The new features in 6.7 or later are not supported. (100.00/100%) [ 978.2] Creating output metadata [ 995.7] Finishing off 3. Check the network configuration in guest after finishing conversion on rhv, found IP configuration is changed from static to DHCP Verify the bug with builds: virt-v2v-1.40.2-15.module+el8.1.1+4955+f0b25565.x86_64 libguestfs-1.40.2-15.module+el8.1.1+4955+f0b25565.x86_64 steps: 1.Convert windows guest which has static IP from VMware to rhv by virt-v2v but the guest didn't install vmware-tools # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -b ovirtmgmt --password-file /home/passwd -of raw win2019-guest-static-ip -oo rhv-cluster=Default -os nfs_data [ 0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 win2019-guest-static-ip -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 [ 3.0] Creating an overlay to protect the source from being modified [ 3.7] Opening the overlay [ 8.7] Inspecting the overlay [ 17.0] Checking for sufficient free disk space in the guest [ 17.0] Estimating space required on target for each disk [ 17.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. [ 27.3] Mapping filesystem data to avoid copying unused and blank areas [ 28.3] Closing the overlay [ 28.4] Assigning disks to buses [ 28.4] Checking if the guest needs BIOS or UEFI to boot [ 28.4] 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 [ 29.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.fCTOnZ/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1080.1] Creating output metadata [1081.7] Finishing off 2.Check the network configuration in guest after finishing conversion on rhv, found guest gets IP from DHCP, pls refer to screenshot "windows-ip-config-after-v2v-conversion" 3.Convert windows guest which has static IP and vmware-tools installed from VMware to rhv by virt-v2v # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd -b ovirtmgmt --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data [ 0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.7] Creating an overlay to protect the source from being modified [ 3.1] Opening the overlay [ 7.8] Inspecting the overlay [ 15.8] Checking for sufficient free disk space in the guest [ 15.8] Estimating space required on target for each disk [ 15.8] Converting Windows Server 2016 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. [ 28.9] Mapping filesystem data to avoid copying unused and blank areas [ 30.7] Closing the overlay [ 30.8] Assigning disks to buses [ 30.8] Checking if the guest needs BIOS or UEFI to boot [ 30.8] 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 [ 32.2] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.K5tb1Y/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1053.8] Creating output metadata [1055.5] Finishing off 4.Check the network configuration in guest after finishing conversion on rhv, found guest gets IP from DHCP, pls refer to screenshot "vmware-tools-windows-ip-config-after-v2v-conversion" Hi Richard, Seems the bug is not fixed by virt-v2v-1.38.4-14.module+el8.1.0+4066+0f1aadab.x86_64, pls check screenshots and v2v log "windows-static-ip.log"
Created attachment 1642554 [details] vmware-tools-windows-ip-config-after-v2v-conversion.png
Created attachment 1642555 [details] windows-ip-config-after-v2v-conversion.png
Created attachment 1642556 [details] windows-static-ip-mxie.log
Sorry, correct the mistake for comment 26, the bug is not fixed by virt-v2v-1.40.2-15.module+el8.1.1+4955+f0b25565.x86_64
The fix that we added requires you to pass the virt-v2v --mac option to supply the IP address information. In IMS the IP address information about static network interfaces is collected by an Ansible script which runs before the guest is converted. However you don't need to do that, you can just supply your own made up data. eg: virt-v2v --mac 00:50:56:ac:9a:7c:ip:192.168.123.123 [...] (there are other fields you can add here, see the virt-v2v(1) manual) This should associate the guest's single NIC with static IP address 192.168.123.123 and after the guest boots first time the NIC should have that address. By the way, there is a firstboot log inside the guest which is useful to collect assuming the static IP address fails to be assigned. It's C:\Program Files\Guestfs\Firstboot\log.txt
Thanks rjones, verify the bug with below builds again: virt-v2v-1.40.2-16.module+el8.1.1+5096+6326d3d5.x86_64 libguestfs-1.40.2-16.module+el8.1.1+5096+6326d3d5.x86_64 libvirt-5.6.0-10.module+el8.1.1+5131+a6fe889c.x86_64 qemu-kvm-4.1.0-19.module+el8.1.1+5172+e3ff58a1.x86_64 nbdkit-1.12.5-2.module+el8.1.1+4904+0f013407.x86_64 libguestfs-winsupport-8.0-4.module+el8.1.0+4066+0f1aadab.x86_64 virtio-win-1.9.9-3.el8.noarch Steps: 0. Check v2v man page about --mac option, found below info is newly added. #man virt-v2v .... --mac aa:bb:cc:dd:ee:ff:ip:ipaddr[,gw[,len[,ns,ns,...]]] Force a particular interface (controlled by its MAC address) to have a static IP address after boot. The fields in the parameter are: "ipaddr" is the IP address. "gw" is the optional gateway IP address. "len" is the subnet mask length (an integer). The final parameters are zero or more nameserver IP addresses. This option can be supplied zero or more times. You only need to use this option for certain broken guests such as Windows which are unable to preserve MAC to static IP address mappings automatically. You don't need to use it if Windows is using DHCP. It is currently ignored for Linux guests since they do not have this problem. ..... Scenario1 1.1 Prepare a windows guest which has static IP, gateway, subnet mask and DNS static ip: 10.73.75.102 subnet mask:255.255.252.0 default gateway:10.73.75.254 DNS suffix:lab.eng.pek2.redhat.com 1.2 Check MAC address of the guest # virsh -c vpx://root.73.141/data/10.73.75.219/?no_verify=1 dumpxml esx6.7-win2016-x86_64-vmware-tools Enter root's password for 10.73.73.141: <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> <name>esx6.7-win2016-x86_64-vmware-tools</name> .... <interface type='bridge'> <mac address='00:50:56:ac:b3:da'/> <source bridge='VM Network'/> <model type='e1000e'/> </interface> .... </domain> 1.3 Convert this windows guest from VMware to rhv but just set static ip --mac option, the IP is consistent with the setting in guest # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102 -on win2016-vmware-tools-static-ip-no-bridge [ 0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.5] Creating an overlay to protect the source from being modified [ 3.1] Opening the overlay [ 7.9] Inspecting the overlay [ 13.9] Checking for sufficient free disk space in the guest [ 13.9] Estimating space required on target for each disk [ 13.9] Converting Windows Server 2016 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. [ 23.5] Mapping filesystem data to avoid copying unused and blank areas [ 25.3] Closing the overlay [ 25.3] Assigning disks to buses [ 25.3] Checking if the guest needs BIOS or UEFI to boot [ 25.3] 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 [ 26.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.cDHz2M/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1605.1] Creating output metadata [1606.9] Finishing off 1.4 Set bridge name 'ovirtmgmt' for guest manually on rhv after finishing conversion, power on guest and check network status in guest, guest has static IP '10.73.75.102' if check IP by command"ipconfig", but if check the network status in "internet Protocol Version4 (TCP/IPv4) Properties' dialog box, it shows guest gets IP from DHCP, pls refer to screenshot"scenario1.3" and "only-static_ip.log" Scenanio2 2.1 Convert the guest from VMware to rhv, set static IP address,gateway, subnet mask and DNS in --mac option, which are consistent with the setting in guest # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102,10.73.75.254,22,lab.eng.pek2.redhat.com -on win2016-vmware-tools-static-ip-gw-len-ns [ 0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.8] Creating an overlay to protect the source from being modified [ 3.6] Opening the overlay [ 8.6] Inspecting the overlay [ 14.4] Checking for sufficient free disk space in the guest [ 14.4] Estimating space required on target for each disk [ 14.4] Converting Windows Server 2016 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. [ 23.4] Mapping filesystem data to avoid copying unused and blank areas [ 25.4] Closing the overlay [ 25.5] Assigning disks to buses [ 25.5] Checking if the guest needs BIOS or UEFI to boot [ 25.5] 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 [ 26.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.MBvkg6/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [2884.4] Creating output metadata [2886.0] Finishing off 2.1.1 Set ovirtmgmt bridge name manually for guest network on rhv after finishing conversion, power on guest and check the network status in guest but found guest gets IP from DHCP, all the setting in --mac option doesn't work pls refer to screenshot"scenario2.1" and "static-ip-gw-len-dns.log" 2.2 Convert the same guest from VMware to rhv, set static IP address,gateway and subnet mask but not set DNS in --mac option # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102,10.73.75.254,22 -on win2016-vmware-tools-static-ip-gw-len 2.2.1 Set bridge name 'ovirtmgmt' for guest manually on rhv after finishing conversion, power on guest and check network status in guest, get the same result with step2.1.1 2.3 Convert the same guest from VMware to rhv, set static IP address and gateway but not set subnet mask and DNS in --mac option # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102,10.73.75.254 -on win2016-vmware-tools-static-ip-gw 2.3.1 Set bridge name 'ovirtmgmt' for guest manually on rhv after finishing conversion, power on guest and check network status in guest, get the same result with step2.1.1 Scenario3: 3.1 Convert the same guest and set static ip and bridge name 'ovirtmgmt' in --mac option # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102:bridge:ovirtmgmt -on win2016-vmware-tools-static-ip [ 0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.5] Creating an overlay to protect the source from being modified [ 3.2] Opening the overlay [ 8.1] Inspecting the overlay [ 13.8] Checking for sufficient free disk space in the guest [ 13.8] Estimating space required on target for each disk [ 13.8] Converting Windows Server 2016 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. [ 24.6] Mapping filesystem data to avoid copying unused and blank areas [ 26.6] Closing the overlay [ 26.7] Assigning disks to buses [ 26.7] Checking if the guest needs BIOS or UEFI to boot [ 26.7] 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 [ 28.0] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.sky5vq/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1643.7] Creating output metadata [1645.4] Finishing off 3.1.1 Power on guest and check the guest network after finishing conversion on rhv env, found guest gets IP from DHCP and bridge"ovirtmgmt" is not set successfully, pls refer to screenshot"scenario3.1" and "static-ip-bridge.log" 3.2 Convert the same guest and set static ip and bridge name 'ovirtmgmt' in --mac option but move bridge in front of static ip # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:bridge:ovirtmgmt:ip:10.73.75.102 -on win2016-vmware-tools-static-ip-add-bridge 3.2.1 Power on guest and check the guest network after finishing conversion on rhv env, found guest gets IP from DHCP and bridge"ovirtmgmt" is not set successfully, the result is same with step3.1.1 Scenario4: 4.1 Convert the same guest from VMware to rhv, just set static IP address in --mac option but the IP is not consistent with the setting of original guest # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:196.168.0.1 -on win2016-wrong-static-ip [ 0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.6] Creating an overlay to protect the source from being modified [ 3.4] Opening the overlay [ 8.4] Inspecting the overlay [ 14.7] Checking for sufficient free disk space in the guest [ 14.7] Estimating space required on target for each disk [ 14.7] Converting Windows Server 2016 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. [ 24.3] Mapping filesystem data to avoid copying unused and blank areas [ 26.4] Closing the overlay [ 26.5] Assigning disks to buses [ 26.5] Checking if the guest needs BIOS or UEFI to boot [ 26.5] 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 [ 27.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.FXamZ9/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [2616.8] Creating output metadata [2618.5] Finishing off 4.2 Set bridge name 'ovirtmgmt' for guest manually on rhv after finishing conversion, power on guest and check network status in guest, guest gets IP from DHCP which means static ip must be consistent with the setting in guest for --mac option. Scenario5: 5.1 Convert the same guest from VMware to libvirt, set static IP address,gateway, subnet mask and DNS in --mac option # 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 -ip /home/passwd esx6.7-win2016-x86_64-vmware-tools --mac 00:50:56:ac:b3:da:ip:10.73.75.102,10.73.75.254,22,lab.eng.pek2.redhat.com -on win2016-vmware-tools-static-ip-gw-len-ns [ 0.1] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 1.9] Creating an overlay to protect the source from being modified [ 2.6] Opening the overlay [ 7.5] Inspecting the overlay [ 13.5] Checking for sufficient free disk space in the guest [ 13.5] Estimating space required on target for each disk [ 13.5] Converting Windows Server 2016 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. [ 24.7] Mapping filesystem data to avoid copying unused and blank areas [ 26.4] Closing the overlay [ 26.5] Assigning disks to buses [ 26.5] Checking if the guest needs BIOS or UEFI to boot [ 26.5] Initializing the target -o libvirt -os default [ 29.8] Copying disk 1/1 to /var/lib/libvirt/images/win2016-vmware-tools-static-ip-gw-len-ns-sda (raw) (100.00/100%) [ 422.3] Creating output metadata Pool default refreshed Domain win2016-vmware-tools-static-ip-gw-len-ns defined from /tmp/v2vlibvirtdb64a6.xml [ 423.9] Finishing off 5.2 Power on and check the guest in virt-manager after v2v conversion, found guest has correct static IP, gateway and subnet mask but DNS isn't set correctly, pls refer to screenshot "scenario5" Hi rjones: (1)Please help to check the result of scenraio1, although guest have correct static ip by command checking after v2v conversion, the network status is not correct in "internet Protocol Version4 (TCP/IPv4) Properties' dialog box (2) According to the result of scenario2, the setting about gateway, subnet mask and DNS doesn't work in --mac option, is there any mistake in the command lines? (3) According to the result of scenario3, seems v2v doesn't support set bridge/network in --mac option for static IP. Or is there something wrong with my settings for bridge in command line? (4) According to result of scenario4, if the static IP is inconsistent with internal IP setting of guest,the static IP set in --mac option will be ignored, is it expected? (5) It's strange that the setting about gateway, subnet mask and DNS works except DNS in --mac option if output is libvirt,pls check screenshot"scenario5" and its log
Created attachment 1644732 [details] comment32-log-pics
> (2) According to the result of scenario2, the setting about gateway, subnet mask and DNS doesn't work in --mac option, is there any mistake in the command lines? The command looks correct. > (3) According to the result of scenario3, seems v2v doesn't support set bridge/network in --mac option for static IP. Or is there something wrong with my settings for bridge in command line? No you cannot mix :ip: and :bridge:. The only things which work are those described in the documentation. For the others, I really need to see this file from inside the guest after the guest has booted on the target. The virt-v2v log isn't useful in these cases where settings are done by a first boot script. Could you run only scenario (1) again and collect: C:\Program Files\Guestfs\Firstboot\log.txt after boot please?
The scenarios of comment32 are a little confusing,so verify the bug with below scenarios again Packages: virt-v2v-1.40.2-16.module+el8.1.1+5096+6326d3d5.x86_64 libguestfs-1.40.2-16.module+el8.1.1+5096+6326d3d5.x86_64 libvirt-5.6.0-10.module+el8.1.1+5131+a6fe889c.x86_64 qemu-kvm-4.1.0-19.module+el8.1.1+5172+e3ff58a1.x86_64 nbdkit-1.12.5-2.module+el8.1.1+4904+0f013407.x86_64 libguestfs-winsupport-8.0-4.module+el8.1.0+4066+0f1aadab.x86_64 virtio-win-1.9.9-3.el8.noarch Steps: Scenario1 1.1 Prepare a windows guest which has static IP, gateway, subnet mask and DNS(set suffix) static ip: 10.73.75.102 subnet mask:255.255.252.0 default gateway:10.73.75.254 DNS suffix:lab.eng.pek2.redhat.com 1.2 Check MAC address of the guest # virsh -c vpx://root.73.141/data/10.73.75.219/?no_verify=1 dumpxml esx6.7-win2016-x86_64-vmware-tools Enter root's password for 10.73.73.141: <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> <name>esx6.7-win2016-x86_64-vmware-tools</name> .... <interface type='bridge'> <mac address='00:50:56:ac:b3:da'/> <source bridge='VM Network'/> <model type='e1000e'/> </interface> .... </domain> 1.3 Convert the guest from VMware to rhv, set static IP address,gateway, subnet mask and DNS in --mac option, which are consistent with the setting in guest # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw esx6.7-win2016-x86_64-vmware-tools -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:b3:da:ip:10.73.75.102,10.73.75.254,22,lab.eng.pek2.redhat.com -b ovirtmgmt -on win2016-vmware-tools-static-ip-gw-subnet-dns_suffix-rhv [ 0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-win2016-x86_64-vmware-tools -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 [ 2.6] Creating an overlay to protect the source from being modified [ 3.3] Opening the overlay [ 8.2] Inspecting the overlay [ 13.7] Checking for sufficient free disk space in the guest [ 13.7] Estimating space required on target for each disk [ 13.7] Converting Windows Server 2016 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. [ 23.2] Mapping filesystem data to avoid copying unused and blank areas [ 25.2] Closing the overlay [ 25.3] Assigning disks to buses [ 25.3] Checking if the guest needs BIOS or UEFI to boot [ 25.3] 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 [ 26.6] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.QfaiSA/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1238.8] Creating output metadata [1244.6] Finishing off 1.4 Check the guest network after finishing conversion on rhv 1.4.1 Power on and log into guest, found guest gets IP from DHCP at this time because firstboot.log shows rhev-apt is installing 1.4.2 Wait about 7min (sometimes need wait about 20mins), found guest can get correct static IP, subnet mask and gateway, but DNS suffix info isn't shown in output of command ipconfig, open dialog box "internet Protocol Version4 (TCP/IPv4) Properties' -> Advanced-> DNS, found DNS suffix info is not input correctly in inputbox of "DNS suffix for this connection" (there is DNS suffix info input in this inputbox before v2v conversion) Scenario2 2.1 Prepare a windows guest which has static IP, gateway, subnet mask and DNS(set IP) static ip: 192.168.122.11 subnet mask:255.255.248.0 default gateway:192.168.1.1 DNS server: 196.168.11.1 2.2 Check MAC address of the guest # virsh -c vpx://root.73.141/data/10.73.75.219/?no_verify=1 dumpxml win2019-guest-static-ip-gw-subnet-dns Enter root's password for 10.73.73.141: <domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'> <name>win2019-guest-static-ip-gw-subnet-dns</name> .... <interface type='bridge'> <mac address='00:50:56:ac:9a:7c'/> <source bridge='VM Network'/> <model type='e1000e'/> </interface> .... 2.3 Convert the guest from VMware to rhv, set static IP address,gateway, subnet mask and DNS in --mac option, which are consistent with the setting in guest # 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 -o rhv-upload -oo rhv-cafile=/home/ca.pem -oo rhv-direct -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /home/rhvpasswd --password-file /home/passwd -of raw win2019-guest-static-ip-gw-subnet-dns -oo rhv-cluster=Default -os nfs_data --mac 00:50:56:ac:9a:7c:ip:192.168.122.11,192.168.1.1,21,196.168.11.1 -b ovirtmgmt -on win2019-static-ip-gw-subnet-dns_ip-rhv [ 0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 win2019-guest-static-ip-gw-subnet-dns -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 [ 2.9] Creating an overlay to protect the source from being modified [ 3.8] Opening the overlay [ 8.8] Inspecting the overlay [ 17.1] Checking for sufficient free disk space in the guest [ 17.1] Estimating space required on target for each disk [ 17.1] 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. [ 28.2] Mapping filesystem data to avoid copying unused and blank areas [ 29.2] Closing the overlay [ 29.3] Assigning disks to buses [ 29.3] Checking if the guest needs BIOS or UEFI to boot [ 29.3] 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 [ 30.6] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.VSAVm3/nbdkit0.sock", "file.export": "/" } (raw) (100.00/100%) [1185.3] Creating output metadata [1186.9] Finishing off 2.4 Check the guest network after finishing conversion on rhv: 2.4.1 Power on and log into guest, found guest gets IP from DHCP at this time because firstboot.log shows rhev-apt is installing 2.4.2 Wait about 10min, found guest can get correct static IP, subnet mask, gateway and DNS IP Hi rjones, (1) Because installing rhev-apt will take a long time sometimes,guest can't static ip until finishing rhev-apt installation and uninstalling vmware-tools, can make v2vnetcf run firstly in firstboot? (2) Although I got same strange and unstable results yesterday, I can't reproduce them today(will report later if meet again) and just find one problem, static DNS suffix can't be input correctly in windows guest after v2v conversion, does v2v support static DNS suffix ? Details info pls refer to comment35-screenshots
Created attachment 1646070 [details] comment35-screenshots
Thanks rjones for confirmation, have filed bug1788823 and bug1788816 to track the problems of comment35, so move the 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, 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:0404