Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resume suspended virtual machine #282

Closed
boucher opened this issue Dec 1, 2016 · 14 comments
Closed

Unable to resume suspended virtual machine #282

boucher opened this issue Dec 1, 2016 · 14 comments

Comments

@boucher
Copy link

boucher commented Dec 1, 2016

Whenever I either shut down my machine, or manually run vagrant suspend on my vm, I'm unable to resume the vm afterwards. Vagrant just sits retrying forever:

› vagrant resume
==> default: Forwarding ports...
    default: 22 => 2345
    default: 443 => 443
    default: 8000 => 8000
    default: 8080 => 8080
    default: 9000 => 9000
    default: 9200 => 9200
==> default: Resuming suspended VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.211.55.9:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...
    default: Warning: Host appears down. Retrying...

The Parallels app seems to think the vm is running, but there's no way for me to connect to it. Running vagrant ssh manually also fails.

I'm running Parallels 12.1.0, Vagrant 1.8.7, and vagrant-parallels 1.7.0. The vm is version 2.0.3 of parallels/ubuntu-16.04.

@boucher
Copy link
Author

boucher commented Dec 1, 2016

I was able to run vagrant reload to restart the vm, which seemed to work, but then failed when trying to mount in shared folders:

› vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Checking if box 'parallels/ubuntu-16.04' is up to date...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 0: shared
==> default: Clearing any previously set network interfaces...
==> default: Forwarding ports...
    default: 22 => 2345
    default: 443 => 443
    default: 8000 => 8000
    default: 8080 => 8080
    default: 9000 => 9000
    default: 9200 => 9200
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.211.55.9:22
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools were not detected on this VM! They are required
==> default: for shared folders, time sync and more. If shared folders are not
==> default: working on this machine, please install Parallels Tools within the
==> default: virtual machine and reload your VM.
==> default: Installing the proper version of Parallels Tools. This may take a few minutes...
==> default: Parallels Tools have been installed. Rebooting the VM...
==> default: Attempting graceful shutdown of VM...
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.211.55.9:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection refused. Retrying...
==> default: Machine booted and ready!
==> default: Mounting shared folders...
    default: /tonic => /Users/boucher/RunKit/tonic
Failed to mount folders in Linux guest. This is usually because
the "prl_fs" file system is not available. Please verify that
Parallels Tools are properly installed in the guest and
can work properly. If so, the VM reboot can solve a problem.
The command attempted was:

mount -t prl_fs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` tonic /tonic
mount -t prl_fs -o uid=`id -u vagrant`,gid=`id -g vagrant` tonic /tonic

@legal90
Copy link
Collaborator

legal90 commented Dec 1, 2016

Hi @boucher,
Could you please share your Vagrantfile? I've just tried to reproduce from the scratch (vagrant init -f parallels/ubuntu-16.04 --box-version 2.0.3), but everything works fine there. Probably, custom :synced_folders and/or :forwarded_ports make sense.

The Parallels app seems to think the vm is running, but there's no way for me to connect to it.

Have you tried to open the VM window at that moment? You can double-click on the VM name in the list (Control Center) and the window should appear. Normally there is a login prompt available.

@boucher
Copy link
Author

boucher commented Dec 1, 2016

Yes, there's a login prompt available (though I don't know the credentials, and it's not that useful to me).

@boucher
Copy link
Author

boucher commented Dec 1, 2016

VAGRANTFILE_API_VERSION = "2"

$enable_serial_logging = false

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.synced_folder "./", "/tonic"

  config.vm.box = "ubuntu/xenial64"
  config.vm.box_version = "16.04"

  config.vm.network :forwarded_port, guest: 22, host: 2345
  config.vm.network :forwarded_port, guest: 443, host: 443
  config.vm.network :forwarded_port, guest: 8000, host: 8000
  config.vm.network :forwarded_port, guest: 8080, host: 8080
  config.vm.network :forwarded_port, guest: 9000, host: 9000
  config.vm.network :forwarded_port, guest: 9200, host: 9200

  config.ssh.insert_key = false

  config.vm.provider "parallels" do |box, override|
    override.vm.box = "parallels/ubuntu-16.04"
    override.vm.box_version = "~>2.0.3"
    box.cpus = 2
    box.memory = 3072
    box.update_guest_tools = true
  end

  config.vm.provider "virtualbox" do |vbox|
    vbox.memory = 3072
    vbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    vbox.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
  end
end

@legal90
Copy link
Collaborator

legal90 commented Dec 1, 2016

@boucher Unfortunately I still can't reproduce this issue. I'd be great if you send a Problem Report to Parallels, so our engineers will be able to investigate it.
Please, do the following:

  1. Upgrade Parallels Desktop to the latest version. At the moment it is v12.1.1.
    In the top menu: Parallels Desktop -> Chef for Updates...
  2. Try to reproduce the issue with VM hanging on the vagrant resume. If it still exists, send a problem report - open the VM window and select in top menu: Help -> Send Technical Data....
    Then tell me the report ID you received.

Thanks!

P.s.

Yes, there's a login prompt available (though I don't know the credentials, and it's not that useful to me).

Just in case - there are default credentials. Username: vagrant , password: vagrant

@boucher
Copy link
Author

boucher commented Dec 2, 2016

Manually suspending and resuming the vm right after seems to work fine, but restarting the machine and then resuming the vm seems to fail consistently for me.

@boucher
Copy link
Author

boucher commented Dec 2, 2016

Here's the report ID I sent in just now: 133465318

@legal90
Copy link
Collaborator

legal90 commented Dec 7, 2016

@boucher The issue of Parallels Tools and shared folders should be fixed in vagrant-parallels v1.7.1.

Please, update the plugin and verify it with Parallels Desktop 12.1.1 - do you have any problems with vagrant suspend / vagrant resume now?

@boucher
Copy link
Author

boucher commented Dec 14, 2016

The other problems are fixed, but when I restart my computer, vagrant resume still ends up with the machine being unable to connect (even though the vm actually has come online if I access it not through vagrant).

@boucher
Copy link
Author

boucher commented Dec 14, 2016

I was still running box 2.0.3, I'll try to see if upgrading to the latest box fixes anything.

@tolmasky
Copy link

Just want to chime in that running 2.0.4 still has this issue.

@legal90
Copy link
Collaborator

legal90 commented Dec 22, 2016

@boucher @tolmasky Is this issue reproducible constantly, even with a "clean" VM? (vagrant init parallels/ubuntu-16.04 --box-version 2.0.4)

Unfortunately, I still can't reproduce it on my laptop.
But looking at your Problem Report we can see that after the VM resume its network interface enp0s5 doesn't receive network settings from our internal DHCP server of "Shared" network. As a result, Vagrant can't connect to this VM by SSH.
Moreover, we see that VM don't send any packet to DHCP server after resume, which might be caused by some problems on the Linux VM side. So, it makes sense to start the troubleshooting from the VM.

If you don't have any success with it, then hopefully @dskr99 can help you by a remote session, if you want.

@wizonesolutions
Copy link
Contributor

I run into this issue with a specific VM (based on https://github.com/geerlingguy/drupal-vm). Going to try updating Parallels and the plugin. Worst-case, I'll eventually try destroying and re-provisioning the VM. Using bento/ubuntu-16.04.

@legal90
Copy link
Collaborator

legal90 commented Apr 5, 2020

Hi all.
I'm gonna close this issue since it's pretty old and wasn't updated for more than 2 years.

If anyone still have it on the latest versions of Parallels Desktop, Vagrant and provider, feel free to open a new issue for that.

@legal90 legal90 closed this as completed Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants