Tramp stuck in "Waiting for virtual machine to load"

I want a preface to this question, noting that I actually looked through most, if not all roaming "Waiting for a virtual machine to boot" troubleshooting:

What I tried:

And further.

Here's how I set up my stroller:

Note. We use Vagrant 1.2.2, because at the moment we do not have time to change the configuration to newer versions. I also use VirtualBox 4.2.26.

  • In my office there is a folder /official/ , which includes things like Vagrantfile inside. Inside my Vagrantfile are the following user settings:
  config.vm.box = "my_box" config.ssh.private_key_path = "~/.ssh/github_rsa" config.ssh.forward_agent = true config.ssh.forward_x11 = true config.ssh.max_tries = 300 config.vm.provision :shell, :inline => "/etc/init.d/networking restart" 
  1. I installed our custom box (called package.box ) through the vagrant box add my_box absolute_path/package.box , which went without fail.

  2. By running vagrant up , I would look at the VirtualBox โ€œpreviewโ€ and it just got stuck on the login page. My terminal would also say only: Waiting for VM to boot. This can take a few minutes. Waiting for VM to boot. This can take a few minutes. As far as I know, this is an SSH problem. Or my problems with the private key, although in my Vagrantfile I explicitly indicated the location of my private key.

Interesting notes:

  • Running dhclient in the VirtualBox GUI, it says that the command was not found. Running sudo dhclient eth0 was one of the suggested fixes.

  • This fix is: https://superuser.com/a/343775/298915 "edit the file /etc/rc.local to include the line sh /etc/init.d/networking restart just before exit 0 ". did not help solve the problem.

Output:

Having tried reinstalling all the thoughts that I messed up the file, it did not seem to improve the problem. I can not work with this problem. Can someone give me some idea?

+6
source share
1 answer

So, after about twelve hours of depressing troubleshooting, I was able (finally) to get the virtual machine to boot.

  • Install private / public keys using the provided link. My field is Debian Linux 3.2.0-4-amd64 , so instead of /root/.ssh/id_rsa.pub you need to use /home/vagrant/.ssh/id_rsa.pub (and the corresponding id_rsa path for the private key).

    Note. Make sure your files have the correct permissions. Check with ls -l path and change with chmod . Your machine may not have /home/vagrant/.ssh/authorized_keys , so generate this file with touch /home/vagrant/.ssh/authorized_keys .

  • Boot your virtual machine using the VirtualBox GUI using (via the Vagrantfile boot-GUI command or starting the virtual machine using VirtualBox). Log in using vagrant and vagrant when prompted.

  • In the GUI, manually start dhclient using sudo dhclient eth0 -v . Why is this disabled by default? I have no idea. I found out that this was disabled when I tried wget close / publish keys in the tutorial above, but couldn't.

  • Go to the command prompt of the local computer and restart the firewall using vagrant reload . It should boot and no longer freeze in "Waiting for VM to load."

It worked for me. Although for other cars this may be different, for some reason Vagrant likes to break.

Suggestion: can this be saved as a script, so we donโ€™t need to manually do this every time?

EDIT: Update the latest version of Vagrant and you will never see this problem again. About time, huh?

+5
source

Source: https://habr.com/ru/post/975621/


All Articles