Merge pull request #9929 from chrisroberts/f-hyperv-netadapt

Disconnect all configured network adapters
This commit is contained in:
Chris Roberts 2018-06-13 13:15:32 -07:00 committed by GitHub
commit c7e35d655c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ function New-VagrantVMVMCX {
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
$Report = Hyper-V\Compare-VM -CompatibilityReport $VMConfig
if($Report.Incompatibilities.Length -gt 0){