Disconnect all configured network adapters
When importing a Hyper-V VM ensure all adapters are disconnected from switches that were used when the box was built.
This commit is contained in:
parent
e43a94b797
commit
1554f447f2
|
@ -96,6 +96,9 @@ function New-VagrantVMVMCX {
|
||||||
Hyper-V\Set-VMFirmware -VM $VM -EnableSecureBoot (Hyper-V\Get-VMFirmware -VM $VM).SecureBoot
|
Hyper-V\Set-VMFirmware -VM $VM -EnableSecureBoot (Hyper-V\Get-VMFirmware -VM $VM).SecureBoot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Disconnect adapters from switches
|
||||||
|
Hyper-V\Get-VMNetworkAdapter -VM $VM | Hyper-V\Disconnect-VMNetworkAdapter
|
||||||
|
|
||||||
# Verify new VM
|
# Verify new VM
|
||||||
$Report = Hyper-V\Compare-VM -CompatibilityReport $VMConfig
|
$Report = Hyper-V\Compare-VM -CompatibilityReport $VMConfig
|
||||||
if($Report.Incompatibilities.Length -gt 0){
|
if($Report.Incompatibilities.Length -gt 0){
|
||||||
|
|
Loading…
Reference in New Issue