1. hyperv 驱动

Hyper-V 是内置在现代版本 Microsoft Windows 中的虚拟化程序。

1.1. 要求

  • 64-bit 版本的 Windows 10 Enterprise, Pro, or Education (system requirements) 版本
  • Hyper-V enabled

1.2. 启用 Hyper-V

使用 Administrator 打开一个 PowerShell 控制台,并执行如下命令:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

如果 Hyper-V 没有正常启动,需要 reboot 启动计算机。

1.3. 使用

minikube start --driver=hyperv

将 hyperv 设置成默认驱动:

minikube config set driver hyperv

1.4. 特有命令

minikube start 命令支持一些 hyperv 特有的参数选项:

  • --hyperv-virtual-switch: 指定 minikube VM 使用的虚拟交换机。默认是自动发现第一个
  • --hyperv-use-external-switch: Use external virtual switch over Default Switch if virtual switch not explicitly specified, creates a new one if not found. If the adapter is not specified, the driver first looks up LAN adapters before other adapters (WiFi, ...). Or the user may specify an adapter to attach to the external switch. Default false
  • --hyperv-external-adapter: External adapter on which the new external switch is created if no existing external switch is found. Since Windows 10 only allows one external switch for the same adapter, it finds the virtual switch before creating one. The external switch is created and named "minikube"

1.5. 问题

Also see co/hyperv open issues

1.6. Troubleshooting

  • 运行 minikube start --alsologtostderr -v=7 调试异常
  • While reinstalling minikube you may encounter error in starting minikube due to stuck.vmcx file from previous installation,a possible fix is:

    • Install Handle Windows tool, identify the process handling .vmcx file,kill it.

    • Run minikube delete --all --purge to remove the extra config files

Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-06-13 09:31:32

results matching ""

    No results matching ""