2014-01-28 83 views
1

我试图从我的家庭计算机上的工作环境中获得我的流量计安装设置,但我一直在遇到问题。我已经卸载并重新安装了两次Virtualbox和Vagrant。在工作中,一切都按预期工作。在家里,什么都没有。我游民文件如下:在一台计算机上但不在另一台计算机上的流量增加规定

Vagrant::configure("2") do |config| 

    config.vm.box = "saucy64" 
    config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box" 
    config.vm.network :private_network, ip: "192.168.33.10" 

    # Allow more memory usage for the VM 
    config.vm.provider :virtualbox do |v| 
    v.customize ["modifyvm", :id, "--memory", "1024"] 
    end 

    # Fix rights and permissions on shared folder 
    config.vm.synced_folder ".", "/vagrant/", :mount_options => [ "dmode=777", "fmode=666" ] 
    config.vm.synced_folder "./www", "/vagrant/www/", :mount_options => [ "dmode=775", "fmode=644" ], :owner => 'vagrant', :group => 'www-data' 

    # Set the timezone to something useful 
    config.vm.provision :shell, :inline => "echo \"Europe/London\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" 
    # Make sure APT is up to date 
    config.vm.provision :shell, :inline => "apt-get update --fix-missing" 
    # Fix locales 
    # config.vm.provision :shell, :inline => "apt-get -y install language-pack-en" 

    config.vm.provision :puppet do |puppet| 
    puppet.facter = { "fqdn" => "dev.oraculum2.local", "hostname" => "www" } 
    puppet.manifests_path = "puppet/manifests" 
    puppet.manifest_file = "oraculum2.pp" 
    puppet.module_path = "puppet/modules" 
    puppet.options = "--hiera_config /vagrant/hiera.yaml" 
    end 

end 

我的输出是这样的:

$ vagrant up --provision 
Bringing machine 'default' up with 'virtualbox' provider... 
[default] Importing base box 'saucy64'... 
[default] Matching MAC address for NAT networking... 
[default] Setting the name of the VM... 
[default] Clearing any previously set forwarded ports... 
[default] Clearing any previously set network interfaces... 
[default] Preparing network interfaces based on configuration... 
[default] Forwarding ports... 
[default] -- 22 => 2222 (adapter 1) 
[default] Running 'pre-boot' VM customizations... 
[default] Booting VM... 
[default] Waiting for machine to boot. This may take a few minutes... 
Timed out while waiting for the machine to boot. This means that 
Vagrant was unable to communicate with the guest machine within 
the configured ("config.vm.boot_timeout" value) time period. This can 
mean a number of things. 

If you're using a custom box, make sure that networking is properly 
working and you're able to connect to the machine. It is a common 
problem that networking isn't setup properly in these boxes. 
Verify that authentication configurations are also setup properly, 
as well. 

If the box appears to be booting properly, you may want to increase 
the timeout ("config.vm.boot_timeout") value. 

当然,我试图增加启动超时但有相同的效果。我试图在GUI中启动,但它进入黑屏并且从不改变。

使用: 流浪1.4.1和4.3.6的virtualbox

我是一个Ubuntu 12.04的机器上,这就是一样的工作,以及。

我试着用Vagrant 1.4.3以及相同的结果。我迷失了,因为它在工作中工作得很好。有任何想法吗?

+0

在尝试流浪之前,能否恢复(或重新下载)virtualbox映像并正常启动?如果通过GUI引导进入黑屏,那么它很可能是vb映像或本地vb配置。不看起来像流浪... –

+0

我试图重新下载它,但仍然黑屏。试图重新安装Virtualbox,一无所获。我很难过。 – dansackett

+0

当然(ish)不是那么流浪的。你有没有尝试过使用内置的virtualbox来流浪?看一下[Vagrant的入门](http://docs.vagrantup.com/v2/getting-started/index.html)页面,使用那里提到的精确框32。也许尝试另一个虚拟机提供商。 –

回答

2

我最初会建议有网络问题,但是我错过了“GUI进入黑屏并从不改变”部分。

这听起来好像VirtualBox设置本身似乎有一些麻烦。我会建议用另一个盒子来尝试它,以确定它是否与盒子有问题(可能是下载失败?)或VirtualBox本身。

+0

我试了一个不同的盒子,但发生了相同的结果。我想这是一个Virtualbox的东西,但我试图重新下载并重新配置为无效... – dansackett

1

确保box user〜vagrant/.ssh/authorized_keys包含pub key以匹配您的流浪私钥。

我有一个非常类似的问题。流浪汉会中止,虚拟盒子开始就好了。 我会得到这样的:

$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
[default] Clearing any previously set forwarded ports... 
[default] Clearing any previously set network interfaces... 
[default] Preparing network interfaces based on configuration... 
[default] Forwarding ports... 
[default] -- 22 => 2222 (adapter 1) 
[default] Booting VM... 
[default] Waiting for machine to boot. This may take a few minutes... 
The guest machine entered an invalid state while waiting for it 
to boot. Valid states are 'starting, running'. The machine is in the 
'aborted' state. Please verify everything is configured 
properly and try again. 

If the provider you're using has a GUI that comes with it, 
it is often helpful to open that and watch the machine, since the 
GUI often has more helpful error messages than Vagrant can retrieve. 
For example, if you're using VirtualBox, run `vagrant up` while the 
VirtualBox GUI is open. 

我看着开放式控制台,看看它启动,然后中止。 所以我产生了调试。

VAGRANT_LOG=debug vagrant up >> DEBUG.LOG.0 2>&1 & 

我通过数据走,看见里面:

DEBUG ssh: == Net-SSH connection debug-level log END == 
INFO ssh: SSH not up: #<Vagrant::Errors::SSHAuthenticationFailed: SSH authentication failed! This is typically caused by the public/private 
keypair for the SSH user not being properly set on the guest VM. Please 
verify that the guest VM is setup with the proper public key, and that 
the private key path for Vagrant is setup properly as well.> 

我是从供应商开始了虚框,登录,检查和流浪汉的关键是腐败。 取而代之。测试ssh作为无密码的流浪者。关机-h现在。流浪... 成功!

从vagrant up的输出是误导。在调试中,我们可以看到它知道它在哪里失败了,但是这并没有充分处理,以告诉用户该盒子/可能很好,通信很糟糕。

0

运行下面的命令在终端上

$ vagrant ssh-config 

然后检查IdentityFile值输出,例如:

IdentityFile /home/{USERNAME}/.vagrant.d/insecure_private_key 

然后切换或登录到相应的SSH用户和运行vagrant up,前登录SSH用户,您必须使用vagrant suspend命令“暂停流浪者箱子”。

相关问题