I'm using Vagrant 1.7.4 on OSX 10.11.2 with VirtualBox 5.0.6.
I regularly leave boxes running on my laptop when I leave, and then later ssh into the laptop to continue work in one of those boxes. Sometimes the laptop may have gone to sleep in the meantime, but I can still log into it using Wake-on-WLAN with no problem. However, since in this case the system seems to be in a 'dark wake' state, my Vagrant boxes are suspended in VirtualBox and can't be resumed as expected:
[satta@tortuga:~/uni/debian-work] $ vagrant ssh
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.
[satta@tortuga:~/uni/debian-work] $ vagrant up
==> default: Unpausing the VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["controlvm", "1303098b-74c6-44d8-9cea-669af0927d30", "resume"]
Stderr: VBoxManage: error: VM is paused due to host power management
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component ConsoleWrap, interface IConsole, callee nsISupports
VBoxManage: error: Context: "Resume()" at line 123 of file VBoxManageControlVM.cpp
It looks like the only thing I can do is kill the paused VM manually (VBoxManage controlvm 1303098b-74c6-44d8-9cea-669af0927d30 poweroff) and then vagrant up the session again. This is a bit annoying since not even vagrant halt -f will kill the VM correctly, also leading to the error message above.
Here's a full log with debug output: https://gist.github.com/satta/714af0b84b3d8bcd4b88
Hi @satta
Thank you for opening an issue. Unfortunately this looks to be an issue with Virtualbox, not Vagrant. Can you please try upgrading Virtualbox to the latest version to see if the issue goes away? If you have any ideas how Vagrant could fix this issue, I'd gladly listen, but the errors are coming entirely from Virtualbox, which has gotten into a bad state.
Thanks Seth. I would have expected that vagrant halt -f would force a shutdown in this case. Anyway, I'm closing this ticket and will probably try the VirtualBox community.
@sethvargo I just wanted to add a follow up to request to "try upgrading Virtualbox to the latest version"
as of version 5.0.20r106931 this issue still exists.
The same happens in Ubuntu 14.04, but there is a workaround https://www.virtualbox.org/ticket/15378?cversion=0&cnum_hist=1#comment:10
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
@sethvargo I just wanted to add a follow up to request to "try upgrading Virtualbox to the latest version"
as of version 5.0.20r106931 this issue still exists.