Osx

Vagrant:VMware“vmnet”設備無法啟動

  • January 21, 2021

我剛剛在 Vagrant 中安裝了 HashiCorp 的 ‘vagrant-vmware-fusion’ 5.0.4 官方外掛。

我正在使用 Vagrant 和在 High Sierra 中執行的 VMWare Fusion 10。

但是,在vagrant up為 VM 執行此操作時,我遇到了錯誤。

正如錯誤消息中所建議的,我已經重新啟動,但是錯誤仍然存在。

該怎麼辦?

$ vagrant up --provider vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find and install...
   default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
   default: Box Version: >= 0
==> default: Loading metadata for box 'hashicorp/precise64'
   default: URL: https://vagrantcloud.com/hashicorp/precise64
==> default: Adding box 'hashicorp/precise64' (v1.1.0) for provider: vmware_fusion
   default: Downloading: https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/vmware_fusion.box
==> default: Successfully added box 'hashicorp/precise64' (v1.1.0) for 'vmware_fusion'!
==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some time...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Verifying vmnet devices are healthy...
The VMware "vmnet" devices are failing to start. The most common
reason for this is collisions with existing network services. For
example, if a hostonly network space collides with another hostonly
network (such as with VirtualBox), it will fail to start. Likewise,
if forwarded ports collide with other listening ports, it will
fail to start.

Vagrant does its best to fix these issues, but in some cases it
cannot determine the root cause of these failures.

Please verify you have no other colliding network services running.
As a last resort, restarting your computer often fixes this issue.

重新啟動幾次後,我決定在呼叫vagrant up命令之前啟動“VMware Fusion”試試運氣。

它確實有效;vagrant up不會啟動 VMWare fusion,因此,您必須執行它vagrant up才能部署 VM。

最終,錯誤資訊可能更清楚。

對我來說,在 OSX Catalina(在 2018 mac-mini 上)上,這是一個完全不同的解決方案:

進入系統偏好設置 -> 安全和隱私 -> 全盤訪問,並選中 VMWare Fusion 複選框後,問題就消失了。

做完這個 vagrant up 工作順利。為了完整起見,這一切都發生在帶有 VMware Fusion 12.1.0 Pro 的 Vagrant VMWare Utility v1.0.18 上。

奇怪的是,在另一台 Mac(也是 Catalina,但 2017 Macbook Pro)上,我不必這樣做,而且我從未遇到過這個問題。

引用自:https://unix.stackexchange.com/questions/427768