VirtualBox Guest OS High CPU Usage/Wrong CPU Speed

virtualbox

I have created a VM image out of a physical PC running Windows XP. I am now trying to run that image as a guest OS under Ubuntu Linux using VirtualBox. Everything seems to be running smoothly with the exception of one issue:

The performance of the guest OS is extremely slow, and it shows extremely high CPU usage to complete even simple tasks like opening up a dialog box.

One thing that I have noticed is that when I right click on "My Computer" and go to "Properties" in the guest OS, it shows the CPU information as follows:

Pentium (D) CPU 2.80Ghz
3.95Ghz, 896MB RAM

Now the intriguing part here is that the Pentium D 2.8Ghz processor is what the host machine is running, but I have no idea what the 3.95Ghz is about. I should also note that the 3.95Ghz during a previous boot of the image read something along the lines of 5.2Ghz!

I'm thinking there is a processor issue here. Does anyone have a solution? I have already tried uninstalling the processor in the Device Manager and rebooting, which didn't fix it.

Best Answer

I've had a similar issue and had to use the 'taskset' tool to set the affinity for CPU0; it appears a number of folks have the same problem. Here's a concise artticle:

https://help.ubuntu.com/community/VirtualBox/Previous

On my system I did it a little more directly than 'taskset -c 1' as they list; I found the direct command in the process list that launches the exact VM I want (which includes the VM's unique SID) and created a simple helper script to run it, like so:

#!/bin/sh
/bin/taskset 0x00000001 /usr/lib/virtualbox/VirtualBox -comment WindowsXP -startvm a7487a75-6119-4a14-a8ea-195ce2906a4b &

This was on Fedora, the Ubuntu paths might be a slight bit different so adjust as necessary.