Skip to content

Commit 6f34be4

Browse files
committed
Allow localized names for Virtual Switch
Signed-off-by: Gerard Braad <[email protected]>
1 parent 7ef2969 commit 6f34be4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hyperv/hyperv.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (d *Driver) Create() error {
273273
func (d *Driver) chooseVirtualSwitch() (string, error) {
274274
if d.VSwitch == "" {
275275
// Default to the first external switche and in the process avoid DockerNAT
276-
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch -SwitchType External).Name")
276+
stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch -SwitchType External).Name")
277277
if err != nil {
278278
return "", err
279279
}
@@ -287,7 +287,7 @@ func (d *Driver) chooseVirtualSwitch() (string, error) {
287287
return switches[0], nil
288288
}
289289

290-
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch).Name")
290+
stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch).Name")
291291
if err != nil {
292292
return "", err
293293
}

0 commit comments

Comments
 (0)