Virtualization extensions wern't enabled for vmcx file format, so it didn't work for Windows 10 and up. Fixes #8402

This commit is contained in:
Bjorn Brala 2017-03-23 07:54:41 +01:00
parent 0534ebf895
commit 2f7e0d3a1f
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@
[string]$auto_start_action=$null,
[string]$auto_stop_action=$null,
[string]$differencing_disk=$null
[string]$enable_virtualization_extensions=$False
)
# Include the following modules
@ -86,6 +87,11 @@ if (!$switchname) {
$switchname = (Get-VMNetworkAdapter -VM $vmConfig.VM).SwitchName
}
# Enable nested virtualization if configured
if ($enable_virtualization_extensions) {
Set-VMProcessor -VM $vmConfig.VM -ExposeVirtualizationExtensions $true
}
$vmNetworkAdapter = Get-VMNetworkAdapter -VM $vmConfig.VM
Connect-VMNetworkAdapter -VMNetworkAdapter $vmNetworkAdapter -SwitchName $switchname
Set-VM -VM $vmConfig.VM -NewVMName $vm_name