Ubuntu crashes with Virtualbox, excessive HDD I/O

Discussions related to using VirtualBox on Linux hosts.
Post Reply
themusicalduck
Posts: 17
Joined: 19. Aug 2008, 22:06

Ubuntu crashes with Virtualbox, excessive HDD I/O

Post by themusicalduck »

When I try to run a virtualmachine on Ubuntu (most of the time Windows XP) after a few minutes it will usually crash Ubuntu. At first Ubuntu will start to run very choppily and the hard drive light will stay on constantly. If I can catch it before it becomes unresponsive, then I can ctrl alt backspace and it sorts it, but if I don't then I have to hard reset.

This happens most of the time I run a virtual machine, sometimes after running the machine for a few seconds or sometimes after 20 minutes or so and I am not generally doing anything too intensive on it when it happens, in fact it usually happens when I'm not using it at all at that time. Often it will work the second time I try after a hard reset, though not always. I've also found this seems to have happened once or twice while Vbox has not been running, but since it seems to be pretty certain to happen if I do run Vbox, then I'm starting there to try and work out what's happening.

I'm running Ubuntu 8.10 32 bit and Vbox 2.1.4.
Harald
Posts: 7
Joined: 6. Feb 2009, 22:33

Post by Harald »

This sound like your computer is running out of memory. How much physical RAM does the host have? How much did you allocate for the guest?

Of course it could also be a bug, for instance a memory leak in Virtualbox...
themusicalduck
Posts: 17
Joined: 19. Aug 2008, 22:06

Post by themusicalduck »

I have 1 gig of memory and allocated 256 mb to the machine. This is only a problem that has started affecting me recently though after using it problem free for months, so I wouldn't think it would be lack of memory.

I'll see if I can do a downgrade in case an update of Vbox created a bug or something and report back.
Harald
Posts: 7
Joined: 6. Feb 2009, 22:33

Post by Harald »

To check if it's a memory problem you could run VirtualBox while having a look at top. Start top from a console window, then press "shift-M" to sort by memory size. You should have a column titled "RES", keep an eye on how much Virtualbox is using. Also look at the size of SWAP. 1 GB isn't a lot to run Linux and Windows at the same size.

I've had similar problems with a machine that didn't have enough memory to hold all virtual machines (and it didn't have enough swap either). Went from unusable to dead within a minute or so, and this sound very similar. Of course it could still be something completely different.
themusicalduck
Posts: 17
Joined: 19. Aug 2008, 22:06

Post by themusicalduck »

Seems I found the problem!

While using top I noticed that swap was showing as using 0% of 0k total, which seemed a bit odd. Turns out my fstab was pointing at the wrong partition.

For future reference if anyone has the same problem, I found the partition using fdisk -l then used commands -
sudo mkswap /dev/*partition*
and sudo swapon /dev/*partition*

I then checked that my swap was working in sysmonitor. If it was then I could use the UUID that the commands above gave me to edit fstab and point it to the right partition.

Cheers for the help Harald.
Post Reply