From 8cf2240383cded5bd6e3a4541193c16e42dffff3 Mon Sep 17 00:00:00 2001 From: Patrick Lang Date: Thu, 18 Aug 2016 23:45:44 -0700 Subject: [PATCH] Finish hooking up hv.enable_virtualization_extensions --- plugins/providers/hyperv/action/import.rb | 2 +- plugins/providers/hyperv/config.rb | 1 + plugins/providers/hyperv/scripts/import_vm_xml.ps1 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/providers/hyperv/action/import.rb b/plugins/providers/hyperv/action/import.rb index 226d99061..6c11a2105 100644 --- a/plugins/providers/hyperv/action/import.rb +++ b/plugins/providers/hyperv/action/import.rb @@ -147,7 +147,7 @@ module VagrantPlugins options[:auto_start_action] = auto_start_action if auto_start_action options[:auto_stop_action] = auto_stop_action if auto_stop_action options[:differencing_disk] = differencing_disk if differencing_disk - options[:enable_virtualization_extensions] = enable_virtualization_extensions if enable_virtualization_extensions + options[:enable_virtualization_extensions] = "$True" if enable_virtualization_extensions and enable_virtualization_extensions == true env[:ui].detail("Creating and registering the VM...") server = env[:machine].provider.driver.import(options) diff --git a/plugins/providers/hyperv/config.rb b/plugins/providers/hyperv/config.rb index e4b40bb1f..eec67d1b3 100644 --- a/plugins/providers/hyperv/config.rb +++ b/plugins/providers/hyperv/config.rb @@ -14,6 +14,7 @@ module VagrantPlugins attr_accessor :differencing_disk # Create differencing disk instead of cloning whole VHD [Boolean] attr_accessor :auto_start_action #action on automatic start of VM. Values: Nothing, StartIfRunning, Start attr_accessor :auto_stop_action #action on automatic stop of VM. Values: ShutDown, TurnOff, Save + attr_accessor :enable_virtualization_extensions # Enable virtualization extensions (nested virtualization). Values: true, false def initialize @ip_address_timeout = UNSET_VALUE diff --git a/plugins/providers/hyperv/scripts/import_vm_xml.ps1 b/plugins/providers/hyperv/scripts/import_vm_xml.ps1 index 9622ea067..c7aca6b34 100644 --- a/plugins/providers/hyperv/scripts/import_vm_xml.ps1 +++ b/plugins/providers/hyperv/scripts/import_vm_xml.ps1 @@ -11,7 +11,7 @@ Param( [string]$vmname=$null, [string]$auto_start_action=$null, [string]$auto_stop_action=$null, - [bool]$enable_virtualization_extensions=$False + [string]$enable_virtualization_extensions=$False ) # Include the following modules