vagrant
vagrant copied to clipboard
Hyper-V: add support for EnhancedSessionTransportType
Please add support for enhanced session transport: https://blogs.technet.microsoft.com/virtualization/2018/02/28/sneak-peek-taking-a-spin-with-enhanced-linux-vms/
A new configuration parameter is required that would be used in import_vm_vmcx.ps1 to set the configuration during vm settup: Hyper-V\Set-VM -VM $vmConfig.VM -EnhancedSessionTransportType 'HvSocket'
. The default settting is 'VMBus'.
When Xrdp is compiled in ubuntu 16.04 (using the scripts from aboves link), the rendering is faster and allows screen resizing :)
It applies to Windows guests as well: https://blogs.technet.microsoft.com/virtualization/2017/01/27/introducing-vmconnect-dynamic-resize/
Same, would like for this feature as well!
It would be helpful to have a command to open HyperV session (VMConnect) in addition.
Workaround:
vmconnect.exe $env:computername $(Get-VM -Id $(Get-Content .\.vagrant\machines\default\hyperv\id)).Name
I am currently using a PowerShell script and an after
up
trigger to work around this:
# Trigger to set EnhancedSessionTransportType after the VM is up
config.trigger.after :up do |trigger|
trigger.name = "Set EnhancedSessionTransportType"
trigger.info = "Configuring Enhanced Session"
trigger.run = {inline: "powershell -ExecutionPolicy Bypass -File \"#{File.join(__dir__, 'set-enhanced-session.ps1')}\" -vmName '#{vm_name}'"}
end
param(
[string]$vmName
)
$vm = Get-VM -Name $vmName
if ($vm -ne $null) {
# Enable Enhanced Session Mode
Set-VM -VMName $vmName -EnhancedSessionTransportType HvSocket
Get-VM -VMName $vmName | Select-Object -Property EnhancedSessionTransportType
} else {
Write-Output "VM not found: $vmName"
}
maybe this can help somebody. Any updates on an implementation in vagrant?