Category Archives: VMWare

Set / Sync NTP / HWClock on Enterprise Linux (RH/OEL)

Another one of my public notes,

#First Configure your ntp servers for the ntp daemon.
vim /etc/ntp.conf

#Chose the options that are going to work best in your case
#We usualy remove the local clock entry and add two new ntp servers
#Add your local / remote ntp server like this.
#server [server address, either hostname or ip] 
server #or
server hostname.domain.ext
#save the settings.

#next check if the ntp daemon is started during system startup for all levels
#that enable networking (235)
chkconfig --list ntpd
ntpd            0:off   1:off   <strong>2:on    3:on</strong>    4:off    <strong>5:on</strong>    6:off

#If ness. add the ntpd daemon to the required levels using;
chkconfig --level 235 ntpd on

#Next sync the system clock with the ntp daemon. BE CAREFULL BEFORE APPYING!
#If the NTP servers time is in the PAST, this step might cause problems when forced
#Readup on ntp how to solve this situation. (yes there is a way 😉  )
ntpdate #You own addres naturally

#Next enable the ntp daemon to take over the sync task.
service ntpd start #or
/etc/init.d/ntpd start

#To wrap it all up, its nice to sync the hardware clock as well using this step.
hwclock --systohc   (read 'System to Hardwareclock')

#in case you need to manually set the timezone correctly
#You might create the correct link from the 
#usr/share/zoneinfo/?/? to the /etc/localtime Like this
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

#Hope this helps you as much as it helped me in the past
#Check to see if the NTPd is working can be done
#using the following command

Simple VBScript to restart all VMware services

strComputer = “.”
Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\”&strComputer&”\root\cimv2”)
Set colListOfServices = objWMIService.ExecQuery(“Select * from win32_Service where Name Like ‘VM%'”)
IntSleep = 15000
For Each objService in colListOfServices
If UCase(Left(, 1)) > “N” then
WScript.Sleep intSleep
strMsg = strMsg & vbCr & & ” Restarted.”
End If

Wscript.Echo strMsg

Sure you can tweak and modify it as you see fit 🙂

Timekeeping in VMware… o my…

If there is a subject that has many and i realy mean many posts, and with these posts many many readers its timekeeping in vmware. Especially when your Guest OS is of the linux platform. Also there are many suggestions on how to solve this problem. Too give you guys a quick glace of whats happening out there… Some of the suggestions you might encounter.

1. Cron the ntpd refresh command. (put the ntp renew in a task and execute it every second)
    (Not realy an option with 100Servers+ and loads, loads of network traffic)
2. Recompile the kernel using the 100Hz frequency setting instead of the 1000 or 250hz setting.
    (One I want to test before discarding it, he might have a point there)
3. Patch the kernel / NTPD using the latest versions.
     (Should be a standard job and best practice, not an suggestion!)
4. Use a VMWare compatible compiled rpm to reinstall the kernel.
     (Sounds much like option 2 i want to test first, ill go for the manual compile 🙂 )
5. dont even want to mention all these other options 
     (too silly but fun reading 🙂 )

With all respect to the guys searching and finding solutions stated above. There was indeed a time these solutions where the best to apply. But time has gone past, vmware introduced solutions using the VMWare tools (almost the same a the cron solution). And communities responded comitted to solve these problems for their most valued distro. The result is a setting in the kernel that is available for various kernels, and these settings can be found on the VMware site. Even though i commited myself to test these various options before implementing one or the other, the bootloader option looks the savest to suggest too the big audience. So here it is.

Oh always there are people to thank 🙂
• My uncle for paying way more attention then me 🙂 Marco Gralike
• Prutser for breaking open the kernel discussion, good article there.
•  VMware for maintaining there KB so well 🙂
• You for taking the time to read this nonsense 🙂