duanqia9034 2016-01-25 14:11
浏览 86

Vagrant Machine停止工作

I was using Homestead and vagrant for Laravel, everything was working fine until this morming when I tried to up the machine and work. i'm getting this error :

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 (guest) => 8000 (host) (adapter 1)
    default: 443 (guest) => 44300 (host) (adapter 1)
    default: 3306 (guest) => 33060 (host) (adapter 1)
    default: 5432 (guest) => 54320 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
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.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

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.

Anyone can help me fix this issue without reinstalling all over again?

What I have tried :

  • Restarting my computer
  • Closing some application
  • Deleting the VM
  • Shutting off my Firewall

VagrantFile content

  • 写回答

1条回答 默认 最新

  • duanqiang2977 2016-01-25 14:52
    关注

    it look like your vagrant has problem accessing your VM using the private-key:

    1. after the error-message, try to enter vagrant using the command vagrant ssh

    --> if everything work well without having to enter password then the error is probably somewhere else (see the recommended setting using config.vm.boot_timeout)

    1. maybe your private-key is not in the known_hosts list of you VM

      2.1 back-up the private key in your workstation

    a) As default, when using UBUNTU-OS, the file is located at ~/.vagrant.d/insecure_private_key

    b) You can also run the command vagrant ssh-config after vagrant up, in order to retrieve the exact location of the private_key in use)

    2.2 delete the file and restart vagrant

    vagrant reload or vagrant reload --provision

    vagrant will try to regenerate a new private key for you.

    1. Edited

    According to the vagrantfile you have added: You should also configure the network similar to the following example (remove the # and check if the content of your vagrantfile look like the example bellow):

    MY_IP_ADDRESS = '10.11.12.15'
    
    Vagrant.configure(2) do |config|
    
        config.vm.box = "base"
        config.vm.network :private_network, ip: MY_IP_ADDRESS
        config.ssh.forward_agent = true
    
    end
    
    1. You should check the box you are using, maybe the box does not exists

    example "hashicorp/precise64"

    please check the vagrant-documentation @ https://www.vagrantup.com/docs/boxes.html

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog