VMWare Server

Timekeeping in VMware guests

One of the known problems has to do with the timer frequency set in the kernel. 2.6 kernels request clock interrupts at 1000Hz and it can be difficult for the virtual machine to keep up (see this bug report for details). To remedy this, CentOS used to offer kernels with the clock rate set to 100Hz.

CentOS also offers vmware-images, prebuilt and updated. See this CentOS bug report for details and CentOS developer's site to download vmware-images.

As of CentOS 5.2, a new kernel option called "divider= " was made available. You can set the timer frequency to 100Hz just by adding divider=10 as the kernel option. Unfortunately, in many cases this is barely enough to keep the guest's clock accurate. As of this writing, the best practice for timekeeping is provided in this VMware's KB article:

http://kb.vmware.com/kb/1006427

Below is a brief summary of the instructions adjusted for CentOS:

(add to the top of the file)
# modification as per http://kb.vmware.com/kb/1006427
# The configuration directive tinker panic 0 instructs NTP not to give up
# if it sees a large jump in time and must be at the top of the ntp.conf file.
tinker panic 0
# end of mod

(comment out 2 lines as below)
# modification as per http://kb.vmware.com/kb/1006427
# It is also important not to use the local clock as a time source,
# often referred to as the Undisciplined Local Clock. NTP has a
# tendency to fall back to this in preference to the remote servers
# The following 2 lines commented out.

# when there is a large amount of time drift.
# server        127.127.1.0     # local clock
# fudge 127.127.1.0 stratum 10

0.centos.pool.ntp.org
1.centos.pool.ntp.org

{i} rpm packages for VMware Tools are available from http://people.centos.org/hughesjr/open-vm-tools/

Change guest VM networking bridge to work across host wireless connection

You can easily change eth0 to a different location so that you don't have to use NAT across your wireless connection. First stop the service vmware, but first make sure all guest VMs are not running.

# service vmware stop 

Next, edit the vmware configuration file and change all instances of eth0 to your wireless connection. In my case, this is eth1.

# vim /etc/vmware/locations 
answer VNET_0_INTERFACE eth1
answer VNET_0_INTERFACE eth1

Save and exit this file. Now start vmware services back up.

# service vmware start 

You should now be able to bridge across your host wireless and VM with no more fuss. You also don't need to worry about loading any wireless drivers on the guest OS, because it's bridged across the virtual VMware network interface.

TipsAndTricks/VMWare Server (last edited 2009-04-24 20:56:44 by AkemiYagi)