-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.6
-
None
-
No
-
Important
-
rhel-sst-virtualization
-
ssg_virtualization
-
None
-
False
-
-
None
-
None
-
None
-
None
-
-
x86_64
-
None
Description of problem:
static IPs shows incorrect in guest if use --firstboot and --mac options to configure static IPs for windows guest at the same time
Version-Release number of selected component (if applicable):
virt-v2v-2.7.1-1.el9.x86_64
libguestfs-1.54.0-3.el9.x86_64
guestfs-tools-1.52.2-2.el9.x86_64
nbdkit-server-1.38.5-1.el9.x86_64
libnbd-1.20.3-1.el9.x86_64
libvirt-libs-10.9.0-1.el9.x86_64
qemu-img-9.1.0-1.el9.x86_64
virtio-win-1.9.43-0.el9_5.noarch
How reproducible:
100%
Steps:
1. Prepare below scripts and copy script 'network-configure.ps1' to original VMware windows guest
# cat 2500-0006-network-configure.bat powershell.exe -ExecutionPolicy ByPass -NoProfile -file "C:\network-configure.ps1" # cat network-configure.ps1 # Uncomment this line for lots of debug output. # Set-PSDebug -Trace 1# Wait for the netkvm (virtio-net) driver to become active. $startdate = Get-Date $adapters = @() While (-Not $adapters -and $startdate.AddMinutes(5) -gt (Get-Date)) { Start-Sleep -Seconds 5 $adapters = Get-NetAdapter -Physical | Where DriverFileName -eq "netkvm.sys" Write-Host "adapters = '$adapters'" } # In the timeout case $ifindex will not be set below.$mac_address = '00-50-56-a0-b5-f5' $ifindex = (Get-NetAdapter -Physical | Where MacAddress -eq $mac_address).ifIndex if ($ifindex) { Write-Host "setting IP address of adapter at $ifindex" New-NetIPAddress -InterfaceIndex $ifindex -IPAddress '192.168.0.10' Set-DnsClientServerAddress -InterfaceIndex $ifindex -ServerAddresses ('8.8.8.8') }
2. Convert the guest from VMware by v2v and use --firstboot and --mac options to configure static IPs for windows guest at the same time
# virt-v2v -ic vpx://non-admin%40vsphere.local@10.73.212.129/data/10.73.212.36/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk8.0.3 -io vddk-thumbprint=CB:9F:B1:9D:33:49:6C:60:AD:3C:A5:16:77:91:5F:CD:1B:24:B1:43 -ip /home/passwd esx8.0-win11-efi-contains-scirpt --firstboot /home/2500-0006-network-configure.bat -on esx8.0-win11-efi-contains-scirpt-using-firstboot-and-mac-options-to-set-static-ips --mac 00:50:56:a0:b5:f5:network:default --mac 00:50:56:a0:b5:f5:ip:10.184.112.42,10.184.112.1,24,10.10.10.53,10.10.10.54 -v -x |& tee > v2v-convert-windows-guest-using-firstboot-and-mac-options-to-set-static-ips.log
3. Check the guest after conversion, static IPs shows incorrect in guest, static ipv4 address, gatewa IP, subnet mask length are configured by --mac option but DNS address is configured by --firstboot option, details please check screenshot 'set-static-ips-with-firstboot-and-mac-options.png' and v2v debug log