除非我在主路径上,否则 Vagrant 不会启动。
[ruby-1.9.3-p286] ~ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
end
[ruby-1.9.3-p286] ~ vagrant up
[default] Importing base box 'precise32'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.12
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[ruby-1.9.3-p286] ~ vagrant destroy
Are you sure you want to destroy the 'default' VM? [Y/N] Y
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...
[ruby-1.9.3-p286] ~
vagrant up
当我从我的家庭路径运行时,它成功启动。但是当我vagrant up
从另一个子目录运行时,它不会启动。这有点奇怪,因为我使用的 Vagrantfile 完全相同。
[ruby-1.9.3-p286] ~
[ruby-1.9.3-p286] ~ cd dev_vm
[ruby-1.9.3-p286] ~/dev_vm cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
end
[ruby-1.9.3-p286] ~/dev_vm vagrant up
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
The VM failed to remain in the "running" state while attempting to boot.
This is normally caused by a misconfiguration or host system incompatibilities.
Please open the VirtualBox GUI and attempt to boot the virtual machine
manually to get a more informative error message.
[ruby-1.9.3-p286] ~/dev_vm
[ruby-1.9.3-p286] ~/dev_vm
我什至尝试从 Virtualbox UI 手动启动它,但我只看到一个空白屏幕。我可能认为我错过了一些东西。