danthedataman.com

November 13, 2008

Clock running slow in Linux guest on VMWare Server: one solution

Filed under: VMWare — Dan @ 3:19 pm
Tags: , , ,

Correct clock time on this Linux VM (Virtual Machine) is important for us, as the purpose of this Linux machine is to house the Extract part of our primary ETL (Extract/Transform/Load) process, so if the clock is not right, the extracted XML files will not be ready for the next ETL step.  Learned today to pay close attention when attempting to re-install/upgrade VMWare Tools, which is the core of our clock sync solution, as an incorrect re-install attempt can disable it.  With that in mind, here’s the process I went through two years ago, when initially setting up this Linux VM as part of our ETL, and part of which I ran through again today to correct the failed VMWare Tools install.

  1. Checked for updates to VMWare Server
  2. Turned off virtual machine and backed up by copying virtual machine files
  3. Added kernel parameters to boot loader: to all lines in /boot/grub/grub.conf that started with “kernel”, added “clock=pit nosmp noapic nolapic” (per http://kb.vmware.com/KanisaPlatform/Publishing/329/1420_f.SAL_Public.html)
  4. Reset clock in Linux guest
  5. Installed & configured VMWare Tools in Linux guest (from http://www.vmware.com/support/ws4/doc/new_guest_tools_ws.html)

VMware Tools for Linux Guests

  1. Power on the virtual machine.

2.      After the guest operating system has started, prepare your virtual machine to install VMware Tools.

Choose File > Install VMware Tools.

The remaining steps take place inside the virtual machine.

3.      Be sure the guest operating system is running in text mode. You cannot install VMware Tools while X is running.

4.      As root (su –), mount the VMware Tools virtual CD-ROM image, change to a working directory (for example, /tmp), uncompress the installer, then unmount the CD-ROM image.

Note: You do not use an actual CD-ROM to install VMware Tools, nor do you need to download the CD-ROM image or burn a physical CD-ROM of this image file. The VMware Workstation software contains an ISO image that looks like a CD-ROM to your guest operating system. This image contains all the files needed to install VMware Tools in your guest operating system.

Note: Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom, modify the following commands to reflect the conventions used by your distribution.

mount /dev/cdrom /mnt
cd /tmp
tar zxf /mnt/vmware-linux-tools.tar.gz
umount /mnt

5.      Run the VMware Tools installer.

cd vmware-tools-distrib
./vmware-install.pl

6.      Log out of the root account.

exit

7.      Start X and your graphical environment.

8.      In an X terminal, launch the VMware Tools background application.

vmware-toolbox &

Note: You may run VMware Tools as root or as a normal user. To shrink virtual disks, you must run VMware Tools as root (su –).

    6.  After launching VMWare Tools application (vmware-toolbox &), on the Options tab, check the Time synchronization … box.

Had to remind myself how to start Linux in text mode, and found that here: http://www.webmasterforums.com/software-distro-specific/1760-starting-linux-text-mode-rh9.html: “edit /etc/inittab….the line that says id:5:initdefault, make it 3 instead
reboot…”

 

Also noticed that the file vmware-linux-tools.tar.gz from the ISO image actually had a different name, too, in this case.

 

Our Specs:

Host machine: Windows Server 2003

VMWare Server 1.0.6

Linux guest: RHEL 4

 

Advertisements

1 Comment »

  1. Great job Dan! I hope your Google rankings are high and your DDOS attacks low, my friend.

    Comment by Michael the PC Repair Man — November 14, 2008 @ 5:00 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: