parent
82550805a0
commit
9452e7cc38
|
@ -10,7 +10,7 @@
|
|||
|
||||
[string]$switchname=$null,
|
||||
[string]$memory=$null,
|
||||
[string]$maxmemory=$null,
|
||||
[string]$maxmemory=$null,
|
||||
[string]$cpus=$null,
|
||||
[string]$vmname=$null,
|
||||
[string]$auto_start_action=$null,
|
||||
|
@ -24,7 +24,7 @@ $Dir = Split-Path $script:MyInvocation.MyCommand.Path
|
|||
. ([System.IO.Path]::Combine($Dir, "utils\write_messages.ps1"))
|
||||
|
||||
$VmProperties = @{
|
||||
Path = $vm_config_file
|
||||
Path = $vm_config_file
|
||||
SnapshotFilePath = Join-Path $data_path 'Snapshots'
|
||||
VhdDestinationPath = Join-Path $data_path 'Virtual Hard Disks'
|
||||
VirtualMachinePath = $data_path
|
||||
|
@ -88,7 +88,7 @@ if (!$switchname) {
|
|||
}
|
||||
|
||||
# Enable nested virtualization if configured
|
||||
if ($enable_virtualization_extensions) {
|
||||
if ($enable_virtualization_extensions -eq "True") {
|
||||
Set-VMProcessor -VM $vmConfig.VM -ExposeVirtualizationExtensions $true
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ if($differencing_disk){
|
|||
}
|
||||
|
||||
foreach($controller in $controllers){
|
||||
foreach($drive in $controller.Drives){
|
||||
foreach($drive in $controller.Drives){
|
||||
if([System.IO.Path]::GetFileName($drive.Path) -eq [System.IO.Path]::GetFileName($source_path)){
|
||||
# Remove the old disk and replace it with a differencing version
|
||||
$path = $drive.Path
|
||||
|
|
|
@ -6,7 +6,7 @@ Param(
|
|||
|
||||
[string]$switchname=$null,
|
||||
[string]$memory=$null,
|
||||
[string]$maxmemory=$null,
|
||||
[string]$maxmemory=$null,
|
||||
[string]$cpus=$null,
|
||||
[string]$vmname=$null,
|
||||
[string]$auto_start_action=$null,
|
||||
|
@ -163,7 +163,7 @@ $controllers = Select-Xml -xml $vmconfig -xpath "//*[starts-with(name(.),'contro
|
|||
|
||||
# Only set EFI secure boot for Gen 2 machines, not gen 1
|
||||
if ($generation -ne 1) {
|
||||
# Set EFI secure boot
|
||||
# Set EFI secure boot
|
||||
if ($secure_boot_enabled -eq "True") {
|
||||
Set-VMFirmware -VM $vm -EnableSecureBoot On
|
||||
} else {
|
||||
|
@ -172,7 +172,7 @@ if ($generation -ne 1) {
|
|||
}
|
||||
|
||||
# Enable nested virtualization if configured
|
||||
if ($enable_virtualization_extensions) {
|
||||
if ($enable_virtualization_extensions -eq "True") {
|
||||
Set-VMProcessor -VM $vm -ExposeVirtualizationExtensions $true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue