host:windows 10
guest: mloskot/manjaro-i3-17.0-minimal
一、 联网的问题
有三种联网的方式:
、nat方式
2、private network:
3、public network :
在此联网方式中, host 主机必须有联网方式,有外网IP地址。否则,在启动VM时,就会出现以下问题,解决的办法是屏蔽public network 开关:
""" vagrant up
inging machine 'default' up with 'virtualbox' provider...
default: Importing base box 'mloskot/manjaro-i3-17.0-minimal'...
default: Matching MAC address for NAT networking...
default: Setting the name of the VM: archlinux-k_default_1511073532379_52700 default: Clearing any previously set network interfaces...
default: Available bridged network interfaces:
default: When choosing an interface, it is usually the one that is
default: being used to connect to the internet.
default: Which interface should the network bridge to?
default: Which interface should the network bridge to?
default: Which interface should the network bridge to?
default: Which interface should the network bridge to?
default: Which interface should the network bridge to?
"""
二、继续的问题:
如果强制退出就会出现以下问题,解决
"""
vagrant destory
1 Bringing machine 'default' up with 'virtualbox' provider...
2 An action 'up' was attempted on the machine 'default',
3 but another process is already executing an action on the machine.
4 Vagrant locks each machine for access by only one process at a time.
5 Please wait until the other Vagrant process finishes modifying this
6 machine, then try again.
7 8
If you believe this message is in error, please check the process
9 listing for any "ruby" or "vagrant" processes and kill them. Then
10 try again.
"""
三、 还是网络问题:
解决来源:https://github.com/hashicorp/vagrant/issues/6426 在“private_network"、“public_network”中,添加“nic_type: "virtio", auto_config: false 。完美解决问题。后来去掉:nic_type,成功运行,看来问题还是出在auto_config上。
Vagrant attempted to execute the capability 'configure_networks'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.
#Wrong config
config.vm.network "public_network", type: "dhcp", auto_config: true , use_dhcp_assigned_default_route: true
config.vm.network "public_network", type: "dhcp", nic_type: "virtio", auto_config: false , use_dhcp_assigned_default_route: true