ip: "192.168.33.100"

时间:2021-10-30 08:54:54

==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 70 of file VBoxManageHostonly.cpp

报错原因:

  在Windows10中,,网络计谋的变革,VirtualBox没有相应权限

解决方案:

  ①打开Orcle VM VirtualBox图形界面。打点-->全局设定-->网络-->仅主机(Host-Only)网络,改削IPv4地点为192.168.33.100。生存退出

  ②变动Windows网络配置,改削VirtualBox Host-Only Ethernet Adapter手动设定ip地点为192.168.33.100。

  ③改削vagrant的配置文件VagrantFile,在private-network中改削对应网络设置为:config.vm.network "private_network", ip: "192.168.33.100", name: "VirtualBox Host-Only Ethernet Adapter" 这段配置的暗示使用现有的网络配置,不再自动创建对应的网卡信息。

  再次启动即可进入虚拟机了~~~

Windows10环境vagrant+VirtualBox虚拟机无法创建私有网络的解决方案。