我的一个stream浪者的箱子结束了一个“中止”的状态,显然我用完了记忆或什么的,是的。 现在盒子不能正常启动。
这是我得到的:
$ vagrant up cloud2 Bringing machine 'cloud2' up with 'virtualbox' provider... [cloud2] Clearing any previously set forwarded ports... [cloud2] Fixed port collision for 22 => 2222. Now on port 2200. [cloud2] Clearing any previously set network interfaces... [cloud2] Preparing network interfaces based on configuration... [cloud2] Forwarding ports... [cloud2] -- 22 => 2200 (adapter 1) [cloud2] Booting VM... [cloud2] 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. $
它说,它正在运行,但我不能login,但。
$ vagrant status cloud2 Current machine states: cloud2 running (virtualbox) The VM is running. To stop this VM, you can run `vagrant halt` to shut it down forcefully, or you can run `vagrant suspend` to simply suspend the virtual machine. In either case, to restart it again, simply run `vagrant up`. $ vagrant ssh cloud2 ssh_exchange_identification: read: Connection reset by peer $
这是框的Vagrantfileconfiguration:
config.vm.define "cloud2" do |cloud2| cloud2.vm.box = "precise32" cloud2.vm.network "public_network", :bridge => 'wlan0' config.vm.boot_timeout = 600 # config.vm.provider :virtualbox do |vb| # vb.customize ["modifyvm", :id, "--memory", "1024"] # vb.customize ["modifyvm", :id, "--cpus", "2"] # end end
在阅读这里的一些post的时候,我已经设置了超时600,但是对我完全没有帮助。
SOS! 我在那个虚拟机上做了很多东西,我…….没有备份:D:P
解决了!
出于某种原因,虚拟机根本不是启动的,我的意思是操作系统。 我添加了vb.gui = true ,只需input启动选项…默认的一个,从grub启动菜单:)
在这里看到如何使用这个configuration选项。
执行命令
vagrant ssh-config
在输出,请检查
IdentityFile /home/{USERNAME}/.vagrant.d/insecure_private_key
并切换
ssh user {USERNAME}
最后运行
vagrant up
当VM中的/etc/ssh/sshd_config无效时,也可能会发生这种情况,但ssh服务已重新启动。
无效/etc/ssh/sshd_config示例:
# Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 22 ... UsePAM yesAcceptEnv GIT_*
这种情况是可能的,当你的供应脚本做到这一点,或者你改变了一些手动。
在你的Vagrantfile改变vb.gui = true并启动你的虚拟机( vagrant up )来debugging这个问题。 在/etc/ssh/sshd_config有效后重新启动你的ssh服务:
service ssh restart
我有相同的错误信息。 问题来自ssh密钥,不是由我拥有,而是由root用户拥有。
sudo chown {USERNAME} /home/{USERNAME}/.vagrant.d/insecure_private_key
一切正常,现在!