最佳答案
我想增加内存至少1 GB,我想配置“主机只”网络使用“199.188.44.20”。
这是我的 Vagrantfile
:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.customize ["modifyvm", :id, "--memory", 1024]
config.vm.network :hostonly, "199.188.44.20"
config.vm.define :web do |web_config|
web_config.vm.box = "lucid32"
web_config.vm.forward_port 80, 8080
web_config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "lucid32.pp"
end
end
config.vm.define :web2 do |web2_config|
web2_config.vm.box = "lucid32"
web2_config.vm.forward_port 80, 8081
web2_config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "myweb.pp"
end
end
end
然而,当我运行 vagrant up
时,我得到:
VM 在试图引导时未能保持“运行”状态。这通常是由于配置错误或主机系统不兼容造成的。请打开 VirtualBoxGUI 并尝试手动启动虚拟机以获取更多信息性错误消息
并且,当我尝试登录到 VM 时,我得到了一个 connection refuse
错误。