当devtools安装在与/Users不同的驱动器上时,使用HyperV进行minishift启动失败 [英] minishift start using HyperV fails when devtools installed on a different drive than /Users

查看:136
本文介绍了当devtools安装在与/Users不同的驱动器上时,使用HyperV进行minishift启动失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行minishift时,将RH DevelopmentTools安装到D:是否存在已知问题?

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

我安装到D:\ DevelopmentTools,该目录创建了一个C:\ Users \ rcoe.minishift目录,RHEL iso位于该目录中.配置看起来正确:

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

但是,当我尝试启动minishift时,它无法找到iso.从错误情况来看,要搜索/Users的驱动器并不明显.实际上,它可能会尝试从安装了Dev工具的驱动器中解析/Users,即D:?

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?

我正在从cmd外壳运行.我在HyperV Administrators组中.

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

谢谢, 罗宾

推荐答案

迟到总比没有好.虽然我不知道其原因(坦率地说,它看起来不像任何人那样),但它与此有关:

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. minishift.exe放入与%USERPROFILE%文件夹所在的驱动器相同的驱动器的 root
  2. 从路径中删除minishift(确保不能直接调用可执行文件以外的任何方式调用 )
  3. 从用户配置文件驱动器中提升的PowerShell中调用可执行文件(以管理员身份运行PowerShell).例如,如果您的用户个人资料位于F盘上,则可以执行以下操作:

  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知道发生这种怪异行为的原因是什么-我的意思是本地路径解析是编程中最基本的事情之一,但是随您去吧.

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.

这篇关于当devtools安装在与/Users不同的驱动器上时,使用HyperV进行minishift启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆