May 27 2011

Host and virtual machine hangs / pauses / stops periodically in VMware Workstation

Category: vmwareAbhishek Shukla @ 12:15 | |

I have been a bit anoyed about my host and virtual machines pausing for a few seconds, and pretty frequently. I code on my virtual machine, and all those pauses was hurting my productivity a lot. An old colleague heard at a VMware course that it could be because of the fact that if the computer is dual core and the virtual machine is set to use both cores, then BOTH cores must be available everytime cpu is needed from client. This might be the problem for some, and setting VMware to use 1 CPU core for clients may help, but for me it did not.

I ended up finding the solution online. It’s quite simple – only a line needs to be added to the virtual machine .vmx configuration line. Add the following line:

mainmem.useNamedFile = false

The pauses should stop now, and it does not matter if you use 1 or 2 cores on clients.

From what I read this config line should only change the place the swapped memory for the client is placed, but it did the trick for me somehow. I have read this has helped others too.

Tags:

May 27 2011

VMware: Host Power Management Causes slowdown on virtual machines

Category: vmwareAbhishek Shukla @ 12:13 | |

Common problems for slow virtual machines are CPU throttling caused by the Power Management on host machine, and IO problems.

This will discuss how to avoid the CPU throttling done by Intel SpeedStep and AMD Cool ‘n’ Quiet.

 

1: Find out what your CPU speed is.

If you don’t know rightclick on “My Computer” and click “Properties”.

About 2/3 down it says:

Dell Latitude D630

Intel(R) Core(TM) Duo CPU

T7500 @ 2.20GHz

The 2.2GHz is what we’re looking for.

 

2: Open VMware global configuration fine (config.ini)

Location is:

Windows XP / Windows Server 2000 / 2003:

%AllUsersProfile%\Application Data\VMware\VMware Workstation\config.ini

Windows Vista / Windows 7 / Windows Server 2008:

C:\ProgramData\VMware\VMware Workstation\config.ini

“VMware Workstation” needs to be replaced if that is not the product used.

 

3: Edit config.ini

3 lines needs to be copied to the config.ini file:

host.cpukHz = “2200000″
host.noTSC = “TRUE”
ptsc.noTSC = “TRUE”


The cpu speed is listed in kiloherz, and your CPU is most likely listed in gigaherz where we looked it up.

Multiply the gigaherz with 1.000.000 (1 million) and you have your speed in kiloherz.

The value above is for 2.2 GHz. If you have 2.4 GHz for instance, just replace the “22″ with “24″.

 

4: Make sure time synchonisation is enabled on client.
Double click the VMware tools icon in “Notification Tray” and select the “Options” tab. Make sure “Time synchronization between the virtual machine and the host operating system”

 

5: Restart VMware Authorization service
Click Start -> Control Panel -> Administrative Tools -> Services
Rightclick VMware Authorization and choose Restart

Start up your Virtual Machine now and you should experience better CPU speeds.

Tags: