VMs failing to start seemingly randomly

Discussions related to using VirtualBox on Windows hosts.
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

Thanks for the reply.

Good thing you insisted on the Hyper-V part, despite following those steps, and everything on Windows indicating that it was disabled, for some mysterious reason it was still "enabled", but to completely disable it I had to first enable it, reboot, disable, do the steps again and reboot my machine again, and now the turtle is gone and the execution engine is VT-x.

I guess now I'll have to work with those VMs and see if the issue pops up again, I hope not.

Thanks for the help and the patience so far.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VMs failing to start seemingly randomly

Post by scottgus1 »

Sure, no problem! I'm not sure that is it, but getting Hyper-V off will give a decent playing field for troubleshooting.

If you have the problem again, and you post the logs, please also post a zip of the "C:\Users\{accountname}\.Virtualbox" folder.
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

I also don't this this will solve the issue, but a man can dream, right?

I also talked with a few colleagues that also have this issue, even those that also have VirtualBox using the correct execution engine have the issue with the VMs not starting after creating/deleting/restoring snapshots.

Let's see.
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

It happened again, this time with a different VM, and without any snapshot activity, I just powered it off to change the amount of RAM and when I tried to power it on again, it wouldn't.

Here are the logs of that VM and my .VirtualBox folder.
Attachments
Logs3.zip
(112.75 KiB) Downloaded 4 times
.VirtualBox.zip
(148.52 KiB) Downloaded 4 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VMs failing to start seemingly randomly

Post by fth0 »

Sorry that it took me awhile to recognize, but you're experiencing a problem that was fixed about 9 months ago in VirtualBox 6.1.28:
VirtualBox 6.1.28 Change Log wrote:
Windows Host: Fixed VBoxHeadless process sticking around after VM is closed (bug
#20574)
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

Hmmmm, the weird part is that this (I don't know if it's exactly the same cause, but effectively the same effect for the end user) also happens on more recent versions, with my colleagues, so this bug either persisted or there is another bug that has the same effect.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VMs failing to start seemingly randomly

Post by fth0 »

The problem is easy to recognize when you know what to look for:

In your favorite task manager, look how many VBoxHeadless processes are running. On a Windows host, there should be a triplet of them for each running VM. After the last VM has been terminated for at least 5 seconds, there shouldn't be any left.
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

The issue is that those processes won't terminate after 5 seconds, or even 50 seconds, that's why I have to terminate them manually, and since (at least on Task Manager) I have no way of knowing which process belongs to which VM, and even if I did, that would only work on machines where I have access to Task Manager, I can only shut down all the other VMs that are running and then manually terminate those processes, and that is what I said in my first post, that only after manually terminating those processes that the affected VM starts working again.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VMs failing to start seemingly randomly

Post by fth0 »

There may be a misunderstanding here, so let me sum it up from my POV:

First, there is your own setup. After my hint that you'd have to use a newer VirtualBox version, you didn't indicate that you're still having issues yourself.

Second, there are setups of your colleagues, where you indicated that they may have a similar issue with a newer VirtualBox version. That's why I indicated to count the VBoxHeadless processes to see if they are experiencing a similar or a different issue. There is no need to match the processes to the VMs for that.

Finally, the Windows 10 Task Manager shows the command lines on the Details tab after adding the corresponding column, allowing for easy matching.
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

fth0 wrote:There may be a misunderstanding here, so let me sum it up from my POV:

First, there is your own setup. After my hint that you'd have to use a newer VirtualBox version, you didn't indicate that you're still having issues yourself.
I updated VirtualBox on my machine, but since the last few days I was running them (without much in the way of powering them on and off and doing snapshots, basically turning them on and letting them run) in school, I didn't have the chance to see if the issue would occur in my PC, but right now I'm at home and will be able to do some more proper testing.
fth0 wrote:Second, there are setups of your colleagues, where you indicated that they may have a similar issue with a newer VirtualBox version. That's why I indicated to count the VBoxHeadless processes to see if they are experiencing a similar or a different issue. There is no need to match the processes to the VMs for that.
Since most just resigned themselves to the fact that those errors are a thing, many don't really use snapshots, or use them very sparingly, and basically stopped talking about the issue, but to those that I asked, and that use (or try to) snapshots more regularly, that sometimes happens.
fth0 wrote:Finally, the Windows 10 Task Manager shows the command lines on the Details tab after adding the corresponding column, allowing for easy matching.
Yes, you are indeed correct, I had completely forgotten about that, the last time I explored Task Manager on Windows 10 was shortly after it was released, and after a little bit of configuration to it after a fresh Windows install, I just leave it be, it completely slipped my mind.

IN the next few days I'll be mostly glued to my chair in front of my computer, so I believe I'll have a good chance of encountering the issue, if it persists on my machine, I'll also keep an eye on the VirtualBox processes after I shutdown the VMs and see if they persist, like they used to in the older version I had installed and had to be manually terminated, or if they are now terminating on their own in the newer version, I believe that might have been the cause when I was running the older version, and if I'm lucky that issue disappeared.

I'll give an update if the issue returns, and if nothing happens after 3 or 4 days, I'll assume the issue is resolved, and give a heads up.

Thanks for all the feedback so far, you guys have been incredibly helpful.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VMs failing to start seemingly randomly

Post by fth0 »

You're welcome, and thanks for the heads up. :)
radaxian
Posts: 14
Joined: 18. Jun 2022, 21:57

Re: VMs failing to start seemingly randomly

Post by radaxian »

No issues so far, I'll take it as it being resolved.

Thanks for all the help, guys.
Post Reply