Virtualbox crashing

Discussions about using Linux guests in VirtualBox.
Post Reply
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Virtualbox crashing

Post by CactusWren »

Hi, my VB has been crashing lately. It seems to happen with high RAM usage, but not sure.

For example, just now I was expanding a .gz file, and it crashed. Earlier, it happened when downloading a file from the browser.

Thanks for taking a look.
Attachments
Working VB-2022-11-21-09-50-26.zip
(35.49 KiB) Downloaded 3 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox crashing

Post by mpack »

Well, I don't know if this is your problem - but assigning 5 cores to running guest code, leaving only 1 core for VirtualBox plus every other host OS app... is not a good decision or a fair balance. Reduce the VM allocation to 2 cores.

Your disk space allocation of 150GB per snapshot seems rather generous too, especially since you seem to have 7 snapshots in play (including the base). I hope your PC can afford all that.

Also, you shouldn't be running 2 * 2K displays without enabling 3D acceleration: that's a huge overhead for a software-only renderer. I would also increase the graphics RAM to 256MB.
Last edited by mpack on 22. Nov 2022, 17:35, edited 1 time in total.
Reason: Fix K v MB typo.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

mpack wrote:Well, I don't know if this is your problem - but assigning 5 cores to running guest code, leaving only 1 core for VirtualBox plus every other host OS app... is not a good decision or a fair balance. Reduce the VM allocation to 2 cores.

Your disk space allocation of 150GB per snapshot seems rather generous too, especially since you seem to have 7 snapshots in play (including the base). I hope your PC can afford all that.

Also, you shouldn't be running 2 * 2K displays without enabling 3D acceleration: that's a huge overhead for a software-only renderer. I would also increase the graphics RAM to 256K.
Thank you, I'll make the adjustments!

Is this the way to increase Video Memory (it's 256MB you meant, right?). My current setup only goes to 128MB in the UI.

https://askubuntu.com/questions/587083/ ... deo-memory

As far as reducing the size of the snapshot, do you have a resource or link for how to do that? I have a 1TB SDD exclusively for the VBs.

Appreciate the help!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Virtualbox crashing

Post by scottgus1 »

Often folks use mistakenly use snapshots thinking they are backups, which they are not. They're more like time travel markers in the history of the VM.

If you are not using the snapshots to travel back into the history of the VM, you can delete the snapshots.

Snapshot manipulation can really go south if the host has a glitch while the process is running. A host disk image backup is strongly recommended, as well as a complete file-compare-integrity-checked folder copy of the entire VM folder, as well as any disk files kept outside the VM folder, while the VM is fully shut down, not save-stated.

Select each snapshot you no longer want, then click Delete. The time needed for the delete will depend on the size of the snapshot data to be merged back in. A new backup of the VM folder may be good if a snapshot delete takes a long time and succeeds.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox crashing

Post by mpack »

CactusWren wrote: (it's 256MB you meant, right?).
Yes it is. I corrected the typo in my post.
CactusWren wrote: My current setup only goes to 128MB in the UI.
The limit should go up when you enable 3D acceleration.
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: Virtualbox crashing

Post by fth0 »

CactusWren wrote:For example, just now I was expanding a .gz file, and it crashed.
I'm not sure how to match the provided Working VB-2022-11-21-09-50-26.log file to your description:

The VM was executed for a total of ~25 seconds. Before booting from the virtual hard disk, the VM was paused for ~4 seconds, because someone/something requested to close the VM window. Around the 10 seconds mark, the booting from the virtual hard disk started. Around the 18 seconds mark, the GUI became visible, and at ~21 seconds a normal shutdown was initiated. Especially there is no sign of a crash. Can you match that with your description?
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

fth0 wrote:
CactusWren wrote:For example, just now I was expanding a .gz file, and it crashed.
I'm not sure how to match the provided Working VB-2022-11-21-09-50-26.log file to your description:

The VM was executed for a total of ~25 seconds. Before booting from the virtual hard disk, the VM was paused for ~4 seconds, because someone/something requested to close the VM window. Around the 10 seconds mark, the booting from the virtual hard disk started. Around the 18 seconds mark, the GUI became visible, and at ~21 seconds a normal shutdown was initiated. Especially there is no sign of a crash. Can you match that with your description?
Yes, here is the sequence of events:

1. VB crashed while expanding a .gz file
2. turned on VB
3. shut down VB
4. downloaded and attached log

I thought this was the right way to get a log--every time I've seen a log requested, it was from a shut down state. Maybe this is the wrong way here?
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

mpack wrote:
CactusWren wrote: (it's 256MB you meant, right?).
Yes it is. I corrected the typo in my post.
CactusWren wrote: My current setup only goes to 128MB in the UI.
The limit should go up when you enable 3D acceleration.
It didn't for me--still 128MB. https://ibb.co/GszsHDN

By the way, with the new settings (3D + 128MB), there was a new jankiness when moving windows around in the VB.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

scottgus1 wrote:Often folks use mistakenly use snapshots thinking they are backups, which they are not. They're more like time travel markers in the history of the VM.

If you are not using the snapshots to travel back into the history of the VM, you can delete the snapshots.

Snapshot manipulation can really go south if the host has a glitch while the process is running. A host disk image backup is strongly recommended, as well as a complete file-compare-integrity-checked folder copy of the entire VM folder, as well as any disk files kept outside the VM folder, while the VM is fully shut down, not save-stated.

Select each snapshot you no longer want, then click Delete. The time needed for the delete will depend on the size of the snapshot data to be merged back in. A new backup of the VM folder may be good if a snapshot delete takes a long time and succeeds.


The way I have used snapshots is to be able to roll back if I mess up something in the guest, which is... not never. I am far from an expert in linux/mysql and sometimes things get off. Is this a bad way to use it?
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: Virtualbox crashing

Post by fth0 »

CactusWren wrote:I thought this was the right way to get a log--every time I've seen a log requested, it was from a shut down state. Maybe this is the wrong way here?
The missing key is that you have to reproduce the issue in that VM run:

Start the VM from power-off state, so that the VM and the guest OS both get fully initialized. Reproduce the issue and if possible, shut down the VM from within the guest OS, so that the guest OS and the VM get fully shut down. In the case of a crash, you obviously cannot fulfill the last part.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

fth0 wrote:
CactusWren wrote:I thought this was the right way to get a log--every time I've seen a log requested, it was from a shut down state. Maybe this is the wrong way here?
The missing key is that you have to reproduce the issue in that VM run:

Start the VM from power-off state, so that the VM and the guest OS both get fully initialized. Reproduce the issue and if possible, shut down the VM from within the guest OS, so that the guest OS and the VM get fully shut down. In the case of a crash, you obviously cannot fulfill the last part.
Yeah, that's the problem--almost every issue I have with VB results in a crash.

BTW, should I be manually shutting down Ubuntu (the guest) before switching off the VB? I normally use the VB UI to turn turn it off, but someone told me that's problematic.
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: Virtualbox crashing

Post by fth0 »

CactusWren wrote:BTW, should I be manually shutting down Ubuntu (the guest) before switching off the VB?
Yes, it's always preferable to shut down the guest OS with its own means. The VM will shut down itself automatically then.
CactusWren wrote:I normally use the VB UI to turn turn it off, but someone told me that's problematic.
The VirtualBox Manager and the VM window's Close button offer several methods to terminate the VM. For example, the "Power off the machine" option is the equivalent of pulling the power plug of a physical PC, which works 99.9% of the time. It's just the remaining 0.1% that can damage the physical PC (or the VM).
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Virtualbox crashing

Post by CactusWren »

fth0 wrote:
CactusWren wrote:BTW, should I be manually shutting down Ubuntu (the guest) before switching off the VB?
Yes, it's always preferable to shut down the guest OS with its own means. The VM will shut down itself automatically then.
CactusWren wrote:I normally use the VB UI to turn turn it off, but someone told me that's problematic.
The VirtualBox Manager and the VM window's Close button offer several methods to terminate the VM. For example, the "Power off the machine" option is the equivalent of pulling the power plug of a physical PC, which works 99.9% of the time. It's just the remaining 0.1% that can damage the physical PC (or the VM).
Yeah, I use the shutdown signal one.
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: Virtualbox crashing

Post by fth0 »

CactusWren wrote:I use the shutdown signal one.
That's ok, and should give the same result as when initiating the shutdown from within the guest OS. It just doesn't seem to work on some guest OS installations.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox crashing

Post by mpack »

@CactusWren: could you please stop quoting previous posts in their entirety? That is redundant since the original post is usually right above yours. Only use quote selectively, i.e. when you want to highlight a particular passage.
Post Reply