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

No registration happens on vagrant up after host reboot #75

Open
mmalina opened this issue Apr 7, 2016 · 1 comment
Open

No registration happens on vagrant up after host reboot #75

mmalina opened this issue Apr 7, 2016 · 1 comment

Comments

@mmalina
Copy link

mmalina commented Apr 7, 2016

When you have a running vagrant box (cdk) and then you restart your machine, your vagrant box will appear in a strange state.
In my case it will be aborted:

$ vagrant status
Current machine states:
default aborted (virtualbox)

This is because apparently when I go for shutdown in OS X, virtualbox will simply kill the VMs.

When I then do "vagrant up", cdk starts again, but there will be no registration happening.
(When I then do "vagrant halt" and "vagrant up", registration will happen again.)

But even if I just do ACPI Shutdown in VirtualBox, the machine state will be stopped, but on a consequent "vagrant up", there will be no registration. All the other things that usually happen on "vagrant up" will happen.

Even when no registration happens during "vagrant up", the subscription manager still returns this:

$ sudo subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Current

So maybe it's all good and it's actually still registered because it was not unregistered during shutdown? In that case this issue can be simply closed. But I wanted to be sure.

This was first spotted by @mlabuda as he regularly shuts down his laptop when leaving the office for the day. Very often he doesn't think to "vagrant halt" first.

@hferentschik
Copy link
Contributor

See also - hashicorp/vagrant#495. It seems just rebooting the machine without halting the VM via Vagrant will indeed put the VM into an inconsistent state. That's because in this case VirtualBox will "shut down" the VM and put it into the "aborted" state. This state in turn is then not managed by Vagrant once you start your machine again. Hard to tell whether there is really something we can do here. I guess we could take a closer look on what exactly happens.

A workaround seems to be to define some systemd/init.d scripts which will properly suspend the machines on shutdown.

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

2 participants