minishift start using HyperV fails when devtools i

2019-08-17 06:27发布

Is there a known issue wrt installing RH DevelopmentTools to D: when running minishift?

I installed to D:\DevelopmentTools, which created a C:\Users\rcoe.minishift directory, in which the RHEL iso is located. Config looks correct:

> D:\DevelopmentSuite>minishift config view
> - iso-url              : file://C:/Users/rcoe/.minishift/cache/iso/minishift-rhel7.iso
> - memory               : 4096
> - vm-driver            : hyperv

Yet, when I try to start minishift, it cannot locate the iso. From the error condition, it's not obvious which drive is being searched for /Users. Might it actually try resolving /Users from the drive into which Dev tools are installed, i.e., D:?

> D:\DevelopmentSuite>minishift start
> -- Checking if Hyper-V driver is installed ... OK
> -- Checking if Hyper-V driver is configured to use a Virtual Switch ... OK
> -- Checking if user is a member of the Hyper-V Administrators group ... OK
> -- Starting local OpenShift cluster using 'hyperv' hypervisor ...
> -- Minishift VM will be configured with ...    Memory:    4 GB    vCPUs :    2    Disk size: 20 GB
> -- Starting Minishift VM ...... FAIL E0107 11:49:57.549243    3524 start.go:356] Error starting the VM: Error creating the VM. Error
> creating machine: Error in driver during machine creation: open
> /Users/rcoe/.minishift/cache/iso/minishift-rhel7.iso: The system
> cannot find the path specified.. Retrying. Error starting the VM:
> Error creating the VM. Error creating machine: Error in driver during
> machine creation: open
> /Users/rcoe/.minishift/cache/iso/minishift-rhel7.iso: The system
> cannot find the path specified.

Known issue or can a separate config entry fix this?

I'm running from a cmd shell. I am in the HyperV Administrators group.

Thanks, Robin

1条回答
Anthone
2楼-- · 2019-08-17 07:24

Better late than never. While I don't know the cause of this (and, frankly, it doesn't look like anyone does), it is related to this: https://github.com/minishift/minishift/issues/236

However none of the proposed fixes on the thread work by themselves. What you need to do is this:

  1. Put minishift.exe to root of the same drive as where your %USERPROFILE% folder is
  2. Remove minishift from the Path (make sure it cannot be invoked in any way other than directly calling the executable)
  3. Invoke the executable from an elevated PowerShell (run PowerShell as administrator) from within your user profile drive. For example if your user profile is on F drive, then something like this will work:

    cd F:\
    ./minishift.exe start
    

Schrödinger knows what is the reason for such a weird behaviour - I mean home path resolution is one of the most basic things in programming, but there you go.

查看更多
登录 后发表回答