Unplanned host reboot causes vagrant to lose all virtualbox guest associations

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Charlie
Hi group,

Is it expected behaviour that vagrant loses all it's associations to virtualbox guests if the host machine is rebooted without running vagrant halt/suspend first on the guests first (e.g. due to power loss or a system update)?

I see this every time a Windows host running Vagrant 2.0.1 and Virtualbox 5.1.30 r118389 reboots for e.g. an unattended windows update (and it's been happening with every version of vagrant and virtualbox I've used prior to the current ones).

Is there anything that can be done to get vagrant not to lose track of guests after such a host reboot? Re-creating and re-provisioning them is quite tedious (even with the aid of ansible).

Thanks,
Charlie

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Alvaro Miranda Aguilera
hello

the state of the VM is stored in the running directory of the project.

where the Vagrantfile is, a directory .vagrant is created

some of that state is pointed also to your home/.vagrant.d

When your machine starts, does anything gets deleted?

I have a Win10 machine and i don't lose any VM that is registered.

Alvaro.

On Mon, Dec 4, 2017 at 11:34 PM, Charlie <[hidden email]> wrote:
Hi group,

Is it expected behaviour that vagrant loses all it's associations to virtualbox guests if the host machine is rebooted without running vagrant halt/suspend first on the guests first (e.g. due to power loss or a system update)?

I see this every time a Windows host running Vagrant 2.0.1 and Virtualbox 5.1.30 r118389 reboots for e.g. an unattended windows update (and it's been happening with every version of vagrant and virtualbox I've used prior to the current ones).

Is there anything that can be done to get vagrant not to lose track of guests after such a host reboot? Re-creating and re-provisioning them is quite tedious (even with the aid of ansible).

Thanks,
Charlie

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezXrBnzRWvt%2BB3xSNGoYZoBwM4KCoAVOn_PwsecOAWujg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Charlie
Hi Alvaro

After simulating an unplanned host reboot (i.e. forcibly turning the laptop off and then on), this is what happens:

1. The machine dirs and files under ".vagrant/machines" (in the directory where the Vagrant file is) remain as they were
2. Running `vagrant global-status` shows the machines (although I think this is cached info as the warning message suggests)
3. Running `vagrant status` lists all the machines but their status is marked as "not created"
4. After running `vagrant status`, all the files in the machine dirs (under ".vagrant/machines/machine_name/vagrant" in the project directory with the Vagrant file) disappear
5. Running `VBoxManage list vms` no longer shows the machines
6. Despite this, the virtualbox files and vmdks for each machine all still exist under C:\Users\Charlie\VirtualBox VMs
7. Running `vagrant up` re-creates all the machines and re-provisions them (effectively duplicating the virtualbox machine files and vmdks that were already present in C:\Users\Charlie\VirtualBox VMs)

It's not clear to me if the issue is with vagrant losing the associations after a reboot or with Virtualbox losing track of the VMs after a reboot and causing vagrant to assume they don't exist. If the latter, I don't understand why virtualbox doesn't also lose track of other non-vagrant VMs I have created. They continue to exist and work as normal after a reboot.

Charlie

On Tuesday, December 5, 2017 at 7:33:09 AM UTC, Alvaro Miranda Aguilera wrote:
hello

the state of the VM is stored in the running directory of the project.

where the Vagrantfile is, a directory .vagrant is created

some of that state is pointed also to your home/.vagrant.d

When your machine starts, does anything gets deleted?

I have a Win10 machine and i don't lose any VM that is registered.

Alvaro.

On Mon, Dec 4, 2017 at 11:34 PM, Charlie <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="joMRzTuSAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">charlie...@...> wrote:
Hi group,

Is it expected behaviour that vagrant loses all it's associations to virtualbox guests if the host machine is rebooted without running vagrant halt/suspend first on the guests first (e.g. due to power loss or a system update)?

I see this every time a Windows host running Vagrant 2.0.1 and Virtualbox 5.1.30 r118389 reboots for e.g. an unattended windows update (and it's been happening with every version of vagrant and virtualbox I've used prior to the current ones).

Is there anything that can be done to get vagrant not to lose track of guests after such a host reboot? Re-creating and re-provisioning them is quite tedious (even with the aid of ansible).

Thanks,
Charlie

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="joMRzTuSAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Alvaro Miranda Aguilera
to try to repro this.

you have multiple vagrant projects that were provisioned
you did cut the power
started, the machins gone.

what host OS?

Alvaro.

On Tue, Dec 5, 2017 at 5:32 PM, Charlie <[hidden email]> wrote:
Hi Alvaro

After simulating an unplanned host reboot (i.e. forcibly turning the laptop off and then on), this is what happens:

1. The machine dirs and files under ".vagrant/machines" (in the directory where the Vagrant file is) remain as they were
2. Running `vagrant global-status` shows the machines (although I think this is cached info as the warning message suggests)
3. Running `vagrant status` lists all the machines but their status is marked as "not created"
4. After running `vagrant status`, all the files in the machine dirs (under ".vagrant/machines/machine_name/vagrant" in the project directory with the Vagrant file) disappear
5. Running `VBoxManage list vms` no longer shows the machines
6. Despite this, the virtualbox files and vmdks for each machine all still exist under C:\Users\Charlie\VirtualBox VMs
7. Running `vagrant up` re-creates all the machines and re-provisions them (effectively duplicating the virtualbox machine files and vmdks that were already present in C:\Users\Charlie\VirtualBox VMs)

It's not clear to me if the issue is with vagrant losing the associations after a reboot or with Virtualbox losing track of the VMs after a reboot and causing vagrant to assume they don't exist. If the latter, I don't understand why virtualbox doesn't also lose track of other non-vagrant VMs I have created. They continue to exist and work as normal after a reboot.

Charlie

On Tuesday, December 5, 2017 at 7:33:09 AM UTC, Alvaro Miranda Aguilera wrote:
hello

the state of the VM is stored in the running directory of the project.

where the Vagrantfile is, a directory .vagrant is created

some of that state is pointed also to your home/.vagrant.d

When your machine starts, does anything gets deleted?

I have a Win10 machine and i don't lose any VM that is registered.

Alvaro.

On Mon, Dec 4, 2017 at 11:34 PM, Charlie <[hidden email]> wrote:
Hi group,

Is it expected behaviour that vagrant loses all it's associations to virtualbox guests if the host machine is rebooted without running vagrant halt/suspend first on the guests first (e.g. due to power loss or a system update)?

I see this every time a Windows host running Vagrant 2.0.1 and Virtualbox 5.1.30 r118389 reboots for e.g. an unattended windows update (and it's been happening with every version of vagrant and virtualbox I've used prior to the current ones).

Is there anything that can be done to get vagrant not to lose track of guests after such a host reboot? Re-creating and re-provisioning them is quite tedious (even with the aid of ansible).

Thanks,
Charlie

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exDyKoPz0%2BQme6WAxBKU4mHX6iA0Sru7yRHu0KPKQfB_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Charlie
Host is Windows 10

I have one vagrant file that defines 4 guests (all ubuntu 16.04 LTS).

Cutting the power causes either virtualbox or vagarant (not sure which) to lose these guests even though the vmdk etc files remain on disk.

As mentioned before, I also have three manually created virtualbox guest machines (unrelated to the project or vagrant) and they survive unplanned reboots without issue.


On Tuesday, December 5, 2017 at 5:04:20 PM UTC, Alvaro Miranda Aguilera wrote:
to try to repro this.

you have multiple vagrant projects that were provisioned
you did cut the power
started, the machins gone.

what host OS?

Alvaro.

On Tue, Dec 5, 2017 at 5:32 PM, Charlie <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1NblJGexAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">charlie...@...> wrote:
Hi Alvaro

After simulating an unplanned host reboot (i.e. forcibly turning the laptop off and then on), this is what happens:

1. The machine dirs and files under ".vagrant/machines" (in the directory where the Vagrant file is) remain as they were
2. Running `vagrant global-status` shows the machines (although I think this is cached info as the warning message suggests)
3. Running `vagrant status` lists all the machines but their status is marked as "not created"
4. After running `vagrant status`, all the files in the machine dirs (under ".vagrant/machines/machine_name/vagrant" in the project directory with the Vagrant file) disappear
5. Running `VBoxManage list vms` no longer shows the machines
6. Despite this, the virtualbox files and vmdks for each machine all still exist under C:\Users\Charlie\VirtualBox VMs
7. Running `vagrant up` re-creates all the machines and re-provisions them (effectively duplicating the virtualbox machine files and vmdks that were already present in C:\Users\Charlie\VirtualBox VMs)

It's not clear to me if the issue is with vagrant losing the associations after a reboot or with Virtualbox losing track of the VMs after a reboot and causing vagrant to assume they don't exist. If the latter, I don't understand why virtualbox doesn't also lose track of other non-vagrant VMs I have created. They continue to exist and work as normal after a reboot.

Charlie

On Tuesday, December 5, 2017 at 7:33:09 AM UTC, Alvaro Miranda Aguilera wrote:
hello

the state of the VM is stored in the running directory of the project.

where the Vagrantfile is, a directory .vagrant is created

some of that state is pointed also to your home/.vagrant.d

When your machine starts, does anything gets deleted?

I have a Win10 machine and i don't lose any VM that is registered.

Alvaro.

On Mon, Dec 4, 2017 at 11:34 PM, Charlie <[hidden email]> wrote:
Hi group,

Is it expected behaviour that vagrant loses all it's associations to virtualbox guests if the host machine is rebooted without running vagrant halt/suspend first on the guests first (e.g. due to power loss or a system update)?

I see this every time a Windows host running Vagrant 2.0.1 and Virtualbox 5.1.30 r118389 reboots for e.g. an unattended windows update (and it's been happening with every version of vagrant and virtualbox I've used prior to the current ones).

Is there anything that can be done to get vagrant not to lose track of guests after such a host reboot? Re-creating and re-provisioning them is quite tedious (even with the aid of ansible).

Thanks,
Charlie

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/700b6dca-b73a-4cb8-8c4c-fb9853fd7361%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="1NblJGexAQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/264b82e7-ba18-47c8-965f-95d362b28b55%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fcc40b62-1534-4216-b077-929b68a7def2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Robert Lilly
Charlie, just for clarification, were the non-Vagrant Virtualbox VMs running at the time of the power down / reboot as well as the the Vagrant ones?

I have experienced this problem before on Windows 7 and 10, as well as OS X / MacOS. I didn't take the time to troubleshoot, I just made a habit of not leaving any VMs running when I was finished for the day.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/61e0e0c9-a551-4afc-9b42-5fb450e96881%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Charlie
Alvaro, Robert:

I think I've tracked down the culprit. The non-vagrant virtualboxes were running at the time of the power down/reboot and survived with no problem - digging further in to this is what revealed the issue:

I start all my vagrant machines with a command line emulator called Cmder and rarely pay attention to the VirtualBox Manager GUI.

While doing some more debugging today I noticed that my non-vagrants were always present in the VirtualBox Manager GUI but the vagrant machines only sporadically showed up (and always showed as being powered off, even if running).

I remembered I had set the Cmder emulator to run as administrator (for an unrelated reason, nothing to do with vagrant or this issue). As soon as I ran the emulator with normal privs and issued `vagrant up` the vagrant machines started surviving reboots with no issue.

So I guess virtualbox and/or vagrant don't like communicating with each other if running under different user contexts. I don't think that's a bug (more like an implementation limitation/constraint) so, for me at least, the issue is marked 'solved' :)

Charlie





On Wednesday, December 6, 2017 at 3:53:05 PM UTC, Robert Lilly wrote:
Charlie, just for clarification, were the non-Vagrant Virtualbox VMs running at the time of the power down / reboot as well as the the Vagrant ones?

I have experienced this problem before on Windows 7 and 10, as well as OS X / MacOS. I didn't take the time to troubleshoot, I just made a habit of not leaving any VMs running when I was finished for the day.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Robert Lilly
Charlie,

Thank you for the follow-up. That explanation makes a lot of sense. ~R

Robert

On Thu, Dec 7, 2017 at 4:50 PM, Charlie <[hidden email]> wrote:
Alvaro, Robert:

I think I've tracked down the culprit. The non-vagrant virtualboxes were running at the time of the power down/reboot and survived with no problem - digging further in to this is what revealed the issue:

I start all my vagrant machines with a command line emulator called Cmder and rarely pay attention to the VirtualBox Manager GUI.

While doing some more debugging today I noticed that my non-vagrants were always present in the VirtualBox Manager GUI but the vagrant machines only sporadically showed up (and always showed as being powered off, even if running).

I remembered I had set the Cmder emulator to run as administrator (for an unrelated reason, nothing to do with vagrant or this issue). As soon as I ran the emulator with normal privs and issued `vagrant up` the vagrant machines started surviving reboots with no issue.

So I guess virtualbox and/or vagrant don't like communicating with each other if running under different user contexts. I don't think that's a bug (more like an implementation limitation/constraint) so, for me at least, the issue is marked 'solved' :)

Charlie





On Wednesday, December 6, 2017 at 3:53:05 PM UTC, Robert Lilly wrote:
Charlie, just for clarification, were the non-Vagrant Virtualbox VMs running at the time of the power down / reboot as well as the the Vagrant ones?

I have experienced this problem before on Windows 7 and 10, as well as OS X / MacOS. I didn't take the time to troubleshoot, I just made a habit of not leaving any VMs running when I was finished for the day.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/Gn0BxZh6Peg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAPqfOOUZmWSJzvTZoAyPdBKL%3DFdTHbk-5T6c1D%2BVYmDZ-GJ1-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Alvaro Miranda Aguilera
In reply to this post by Charlie
hello

if you run the vagrant command as administrator, maybe all those lost vms are under the admin user

vagrant by default will create VMs on the default dir for each user.

Virtualbox uses   USER/VirtualBox VMs

C:\Users\Administrator\VirtualBox VMs

or maybe you can use that cmder thing to run Virtualbox and check the gui under admin.

Alvaro

On Fri, Dec 8, 2017 at 1:50 AM, Charlie <[hidden email]> wrote:
Alvaro, Robert:

I think I've tracked down the culprit. The non-vagrant virtualboxes were running at the time of the power down/reboot and survived with no problem - digging further in to this is what revealed the issue:

I start all my vagrant machines with a command line emulator called Cmder and rarely pay attention to the VirtualBox Manager GUI.

While doing some more debugging today I noticed that my non-vagrants were always present in the VirtualBox Manager GUI but the vagrant machines only sporadically showed up (and always showed as being powered off, even if running).

I remembered I had set the Cmder emulator to run as administrator (for an unrelated reason, nothing to do with vagrant or this issue). As soon as I ran the emulator with normal privs and issued `vagrant up` the vagrant machines started surviving reboots with no issue.

So I guess virtualbox and/or vagrant don't like communicating with each other if running under different user contexts. I don't think that's a bug (more like an implementation limitation/constraint) so, for me at least, the issue is marked 'solved' :)

Charlie





On Wednesday, December 6, 2017 at 3:53:05 PM UTC, Robert Lilly wrote:
Charlie, just for clarification, were the non-Vagrant Virtualbox VMs running at the time of the power down / reboot as well as the the Vagrant ones?

I have experienced this problem before on Windows 7 and 10, as well as OS X / MacOS. I didn't take the time to troubleshoot, I just made a habit of not leaving any VMs running when I was finished for the day.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyL05YaA%3D%3DygtvdWAEje0VTCCFznT%3Db9NK8C0o3-EiJOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unplanned host reboot causes vagrant to lose all virtualbox guest associations

Charlie
Hi Alvaro

The on-disk location of the vmdk files never changed. It just seems that the VirtualBox Manager GUI sometimes can't see them if `vagrant up` was issued from an elevated command prompt (which in turn causes vagrant to lose them after a reboot). If I run the VirtualBox Manager GUI with admin rights, the vagrant machines show up (and the powered off/running status is correct). If I run the VirtualBox Manager GUI with normal user privs, the vagrant machines (created vwith an elevated command prompt) sometimes show up (but always listed as "powered off") or simply don't appear in the VirtualBox Manager GUI.

If I issue `vagrant up` from an non-elevated command prompt and run VirtualBox Manager GUI with normal privs too, everything works as intended. The vagrant machines are correctly listed in the GUI (with correct powered off/running status) and they survive an unplanned host reboot.

Charlie


On Friday, December 8, 2017 at 9:51:27 AM UTC, Alvaro Miranda Aguilera wrote:
hello

if you run the vagrant command as administrator, maybe all those lost vms are under the admin user

vagrant by default will create VMs on the default dir for each user.

Virtualbox uses   USER/VirtualBox VMs

C:\Users\Administrator\VirtualBox VMs

or maybe you can use that cmder thing to run Virtualbox and check the gui under admin.

Alvaro

On Fri, Dec 8, 2017 at 1:50 AM, Charlie <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="aiF6fHK_CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">charlie...@...> wrote:
Alvaro, Robert:

I think I've tracked down the culprit. The non-vagrant virtualboxes were running at the time of the power down/reboot and survived with no problem - digging further in to this is what revealed the issue:

I start all my vagrant machines with a command line emulator called Cmder and rarely pay attention to the VirtualBox Manager GUI.

While doing some more debugging today I noticed that my non-vagrants were always present in the VirtualBox Manager GUI but the vagrant machines only sporadically showed up (and always showed as being powered off, even if running).

I remembered I had set the Cmder emulator to run as administrator (for an unrelated reason, nothing to do with vagrant or this issue). As soon as I ran the emulator with normal privs and issued `vagrant up` the vagrant machines started surviving reboots with no issue.

So I guess virtualbox and/or vagrant don't like communicating with each other if running under different user contexts. I don't think that's a bug (more like an implementation limitation/constraint) so, for me at least, the issue is marked 'solved' :)

Charlie





On Wednesday, December 6, 2017 at 3:53:05 PM UTC, Robert Lilly wrote:
Charlie, just for clarification, were the non-Vagrant Virtualbox VMs running at the time of the power down / reboot as well as the the Vagrant ones?

I have experienced this problem before on Windows 7 and 10, as well as OS X / MacOS. I didn't take the time to troubleshoot, I just made a habit of not leaving any VMs running when I was finished for the day.

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="aiF6fHK_CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/831f9c40-ba2a-4de3-9555-88eba86e51e6%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/27af780b-30de-42bf-bfd2-f2d55b392d31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.