-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
rhel-9.5
-
No
-
Important
-
rhel-sst-virtualization
-
ssg_virtualization
-
8
-
False
-
-
None
-
Migration Toolkit for Virtualization
-
None
-
None
-
None
-
None
(https://access.redhat.com/support/cases/#/case/03881757/)
Virt-v2v installs a Powershell script to set up the network at first boot. For unclear reasons, sometimes this script fails, exits with code 1, and does not set up the network. There are no other error messages visible.
We talked through an example with the customer, and found that if the same script is run manually after boot, then it works fine.
The script below is generated for the virt-v2v command line option --mac 12:12:12:34:34:34:ip:192.168.0.10,192.168.0.1,24,8.8.8.8
# Uncomment this line for lots of debug output. # Set-PSDebug -Trace 1 # Wait for the netkvm (virtio-net) driver to become active. $adapters = @() While (-Not $adapters) { Start-Sleep -Seconds 5 $adapters = Get-NetAdapter -Physical | Where DriverFileName -eq "netkvm.sys" Write-Host "adapters = '$adapters'" } $mac_address = '12-12-12-34-34-34' $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' -DefaultGateway '192.168.0.1' -PrefixLength 24 Set-DnsClientServerAddress -InterfaceIndex $ifindex -ServerAddresses ('8.8.8.8') }
- links to