我正在尝试建立一个流浪者。主机是 Ubuntu 12.10。这是我的流浪文件:
Vagrant::Config.run do |config|
config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
config.vm.network :bridged, :bridge => "eth0"
config.vm.define "restserver" do |chefs_config|
chefs_config.vm.box = "precise64"
chefs_config.vm.box_url = "http://files.vagrantup.com/precise64.box"
chefs_config.vm.host_name = "restserver"
chefs_config.vm.network :hostonly, "192.168.20.50"
chefs_config.vm.forward_port 80, 8080
config.vm.provision :chef_solo do |chef|
chef.log_level = :debug
chef.cookbooks_path = "cookbooks"
chef.run_list.clear
chef.add_recipe "apt"
chef.add_recipe "base"
chef.add_recipe "mongodb::default"
chef.add_recipe "nginx"
end
end
end
Run Code Online (Sandbox Code Playgroud)
问题是我从流浪者内部访问互联网很糟糕。这很慢。我认为路由表可能搞砸了。这是来自的输出route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 …Run Code Online (Sandbox Code Playgroud) 我已经使用 vagrant 设置了 ubuntu 12.10。我怎样才能真正连接到图形桌面?Virtualbox 管理器中似乎没有办法。它显示预览,但“显示”图标被禁用。
这有点麻烦,但我可以暂停流浪者,然后使用 VirtualBox 管理器启动虚拟机并连接到显示器。我宁愿我不必这样做,因为它可能会弄乱 NFS 共享/IP 地址等。