plugins/providers/hyperv/driver.rb in vagrant-unbundled-2.3.3.0 vs plugins/providers/hyperv/driver.rb in vagrant-unbundled-2.3.6.0
- old
+ new
@@ -1,6 +1,7 @@
require "json"
+require "log4r"
require "vagrant/util/powershell"
require_relative "plugin"
@@ -24,10 +25,11 @@
# @return [String] VM ID
attr_reader :vm_id
def initialize(id)
@vm_id = id
+ @logger = Log4r::Logger.new("vagrant::hyperv::driver")
end
# @return [Boolean] Supports VMCX
def has_vmcx_support?
!!execute(:has_vmcx_support)["result"]
@@ -292,10 +294,13 @@
# Set enhanced session transport type of the VM
#
# @param [String] enhanced session transport type of the VM
# @return [nil]
def set_enhanced_session_transport_type(transport_type)
- execute(:set_enhanced_session_transport_type, VmID: vm_id, type: transport_type)
+ result = execute(:set_enhanced_session_transport_type, VmID: vm_id, type: transport_type)
+ if !result.nil?
+ @logger.debug("EnhancedSessionTransportType is not supported by this version of hyperv, ignoring")
+ end
end
protected
def execute_powershell(path, options, &block)