minishift start using HyperV fails when devtools installed on a different drive than /Users

落爺英雄遲暮 提交于 2019-12-11 14:39:55

问题


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:


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.



来源:https://stackoverflow.com/questions/48139682/minishift-start-using-hyperv-fails-when-devtools-installed-on-a-different-drive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!