cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit
Apache License 2.0
227 stars 64 forks source link

"cf dev start" not working on non-english windows environments #43

Closed rockebee closed 6 years ago

rockebee commented 6 years ago

I installed the latest plugin (version 0.0.9) to the CF CLI on my Windows 10 environment and the command cf dev start

failed with

C:\path\to\my\home\cf dev start
Setting up IP aliases for the BOSH Director & CF Router (requires administrator privileges)
Downloading Resources...
Creating the VM...=============>| 100.0%
FAILED
cf dev start: creating the vm: removing netowrk adapter: exit status 1

After some investigation in source code I found out that when constructing the powershell command, the english default name for the network adapter is tried to get removed (link to source):

cmd = exec.Command("powershell.exe", "-Command", fmt.Sprintf("Remove-VMNetworkAdapter "+
        "-VMName %s "+
        "-Name 'Network Adapter'",
        vm.Name))

Unfortunately, on non-english installations the adapter's default name is different (in german its "Netzwerkadapter"), hence the powershell command fails and cfdev can not be started :/.

Would be great to handle this properly, in worst case by using "" as name (as the command is intended to remove the default attached network adapter, it should be safe to use "" as there are no other adapters at that point).

ssisil commented 6 years ago

@rockebee - thanks for pointing this out. We have prioritized this an issue we need to fix.

kamkie commented 6 years ago

I had same problem with minishift, this may be useful https://github.com/minishift/minishift/issues/2096

rockebee commented 6 years ago

I had same problem with minishift, this may be useful minishift/minishift#2096

@kamkie, the minishift bugs seems related, but different issue though - from what I read it is mainly about support for non-ascii characters for some names/parameters, not about default values within different locales. IMHO the quickest fix for this dedicated issue in cfdev would still be to use * rather than Network Adapter. (by the way, just realized that the asterisk * in my original writing above was interpreted as "italic" indicator :/)

aemengo commented 6 years ago

The most recent release v0.0.10 should have this resolved.