Skip to content
Snippets Groups Projects
Unverified Commit 5bc065d6 authored by Gerard Braad's avatar Gerard Braad
Browse files

Allow localized names for Virtual Switch


Signed-off-by: default avatarGerard Braad <me@gbraad.nl>
parent eae38c19
Branches
Tags
No related merge requests found
...@@ -273,7 +273,7 @@ func (d *Driver) Create() error { ...@@ -273,7 +273,7 @@ func (d *Driver) Create() error {
func (d *Driver) chooseVirtualSwitch() (string, error) { func (d *Driver) chooseVirtualSwitch() (string, error) {
if d.VSwitch == "" { if d.VSwitch == "" {
// Default to the first external switche and in the process avoid DockerNAT // Default to the first external switche and in the process avoid DockerNAT
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch -SwitchType External).Name") stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch -SwitchType External).Name")
if err != nil { if err != nil {
return "", err return "", err
} }
...@@ -287,7 +287,7 @@ func (d *Driver) chooseVirtualSwitch() (string, error) { ...@@ -287,7 +287,7 @@ func (d *Driver) chooseVirtualSwitch() (string, error) {
return switches[0], nil return switches[0], nil
} }
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch).Name") stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch).Name")
if err != nil { if err != nil {
return "", err return "", err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment