VMware
1 2 3 Previous Next 41 Replies Last post: Mar 15, 2010 1:01 PM by einstein-a-go…   Go to original post

Re: slight problem with ntpd...

15. Feb 4, 2008 3:52 PM in response to: hicksj
Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006

A work around was applied to all versions. Please redownload!
I also supplied an ESX3 OVF archive.

let me know if other issues arise.

-Mervin Yap

Re: slight problem with ntpd...

16. Feb 4, 2008 11:07 PM in response to: hicksj
Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006
hicksj,

The purpose of the ntpd daemon is to poll the time servers and adjust the clock accordingly. In a real machine, this works fine. However, under vmware, the clock seems to drift a lot. In this case, I force a time adjustment via the ntpdate program instead of the usual ntpd time slewing method. I have the cron daemon sync up every minute. In addition, I wrote a small script that will check to see if ntpd is running. If it is not, it will restart itself (which also kick starts another force time adjustment). This check is also done every minute. One more script was made that sync'd the system clock to the hardware clock (guest vm clock in nvram file?) every 2 seconds. Already part of the original design, the vmx file is configured not to sync the guest virtual machine with the host system clock. All these work arounds should hopefully make the system more stable.

Before the workarounds, the ntpd process may kill itself because the time offset/jitter surpassed a certain millisecond threshold. The windows "net time" command would still work. However, the clock will drift significantly and no clients can communicate with the ntpserver via udp/tcp port 123 since the process is killed.

Other than that, I cleaned up the generation of the ntp.conf file as I noticed duplicate ips from time to time.

So, I hope all these fixes essentially makes the vm app a true "final" release =).

Thanks all for the comments and bug notices!

-Mervin Yap
Click to view loetmann's profile Lurker 3 posts since
Feb 5, 2008

Hi,

first of all, thanks for this small but great virtual app.

Since setting up a reliable NTP-Server is a hard work, I was really exited stumbling upon this VM.

It was my first time install on VMServer 1.0.3:

  • I tried the IDE version first, but several processes complained about read-only access to filesystem
  • So I switched to the SCSI-Version: Everything went great!
  • After syncing some windows machines with their new ntp - Master I tried so with my debian and ubuntu boxes:
bq. ntpdate 172.16.117.226
5 Feb 11:19:35 ntpdate6685: no server suitable for synchronization found

  • So I had a look into shorewall rules and so on
  • But linux boxes obviously not able to speak ntp with this VM


Any ideas ?

Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006
loetmann,

Thanks for the update. I will investigate the ide version today. Since the new versions of VMware supports scsi, I'm wondering if I should just remove the ide version from the page?

Have your tried using the "ntpdate -u" flag? On a few of my linux boxes, the time won't sync unless I use the "-u flag".

Let me know if this works. If not, then I'll have to modify the ntp.conf generation script.

Thanks,
-Mervin Yap
Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006
loetmann,

okay...i think I figured it out. It's like how the windows ntp client will only adjust time with a certain stratum number for the ntp server.

enable the status page and use alt-f12 to view the ntp peer stats. wait until you get an asterisk ( * ), plus ( + ), or minus ( - ) symbol before a server, then you should be able to use the ntpdate program on your linux/unix boxes to sync up the time. preferably wait for an asterisk or plus symbol. the ntpd daemon needs some time to "stabilize" (about 2 minutes) as it figures out what stratum it should configure itself to be.

Hope this helps.
-mervin yap
Click to view loetmann's profile Lurker 3 posts since
Feb 5, 2008
kamphor,
first of all, thanks for your prompt reply and reaction. I had to figure out a lot of issues to get this VM up and running.

Obviously, as allready said before in this thread, RTC under VMWare is a major challenge.
I use to run VMServer 1.0.4 under 32-bit Debian etch with a 2.6.18 Kernel on a quad-XEON machine (Dell 860).
At the time I started evaluating your NTP-VM I ran the standard Server-bigmem kernel. Previously I solved my RTC and clock skew problems with some also debian-based guest systems with migrating to Ubuntu 7.10-JEOS, which is somewhat more performant.

Since I seriously wanted to give NTP-VM a chance I decided yesterday to take the bully by the horns in order to solve this RTC-issue permanently. With a little help of google and friends I figured out that there are two factors to be considered:

1. HPET_EMULATE_RTC has to be activated statical and not as a Module:
2. Changing timer frequency from 250Hz to 1000Hz ( as vmware even propagates, by the way)

This was necessary to avoid the heavy clock skew I encountered in NTP-VM and the boring messages on the server console: kernel: rtc: lost some interrupts at 512Hz.

Now NTP-VM didn't stumble any more behind. But after even waiting for hours ntp to become synchronized (stratum evaluation) I remembered another trick I used some time ago: kernel boot parameters in the guest machine.

After changing following parameters in menu.lst to:
  • clock=pit
+ noapic nolapic nosmp

nearly everything is allright. NTP is evaluating stratum within minutes and the service becomes availlable also for *nix machines. Fine.

But there are three issues left:

I am not able to start up the VM without interacting with the console to give this starting udev thing a hit with CTRL-C. It allways stopped at this point. First I thought this was due to clock skew or clock frequency ratio. But no chance.

After your last update I tried again the scsi version. For me its now brocken. While uncompressing the boot image it dies. So I changed to IDE-version which now works fine with said modifications to server and guest.

Somewhere in your descriptions on vmnet is mentioned that vmware tools should be installed. My Server-console complains about missing vmware tools.

Since this VM doesn't have even a sshd running, I am not able to shut it down by remote scripting.

Excuse my epic description and thanks a lot for your work and support.

Regards
  • Ralf Kuehnbaum-Grashorn
Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006
Thanks for your input. Have you waited longer at boot time? You have to be patient as I have a 10second sleep time at "Starting udev." so you have to wait a little longer. If the system does not continue after 30 seconds or so, hit any key ("i" seems to work good).

I have already compiled the linux kernel in the guest system for 1000hz as well as setting preemption to low latency desktop mode. clock pit is also already set in the guest vm as a kernel boot option.

I'll investigate more on vmtools. it is installed in the guest vm already. if you go to console and do a: "chkconfig --list" it should be listed there, but let me know if it's not working properly.

I may have to redo this vm under a different distro. I've noticed boot lockups at/around "starting udev" in the past.

Thanks again...and I'll try to start converting/updating this system with a newer distro and kernel!

Keep me posted on any bugs you encounter...the more eyes on this appliance the better. and the better for the vm community!

-Mervin Yap
Click to view loetmann's profile Lurker 3 posts since
Feb 5, 2008

Hello kamphor,

yes, I have waited definately more than the requested 10 sec.

Regarding clock pit there was a typo in my posting: I have removed "clock=pit" and added "noapic nolapic nosmp" in menu.lst

The vmware-console complains about missing vmwaretools. chkconfig --list says it should be on for init-levels 2 to 5.

I tried also shutting down the vm: It was a hard one or just pulling the power-cord.

I would apreciate in choosing a more actual distribution. If you are not sticked with mandriva, give ubunto Jeos a try. I ran it allready with a footprint of 32 MB for a secondary DNS.

-Ralf

Click to view Rob_Rowald's profile Lurker 1 posts since
Feb 22, 2008

I am having an issue with the appliance and hopefully you or someone else can help.

I have it imported into my ESX cluster and when i start it up it complains that it cannot find the e1000 adapter and that is is delaying initialization.

I tried changing the adapter type to vmxnet but that did no good, so i switched it back.

I went into the bash console and typed ifup eth0 and got the following response:

/bin/true

e1000 device eth0 does not seem to be present, delaying initialization.

Any help woould be appreciated

Thanks

Rob

Click to view tasuser's profile Lurker 1 posts since
May 30, 2007
Ralf,

It sounds like you have the NTP appliance working well, or possibly have one working under Jeos. If so, would you consider submitting it as an appliance? There just aren't many dedicated NTP appliances to choose from. I would be willing, but I'm still VERY new to Linux.

Note to kamphor - I do appreciate all the work you have done thus far - I just can't seem to get it to work in my environment (ESX 3.02).
Click to view trhoads's profile Lurker 2 posts since
Mar 27, 2007

I just finished working out a few issues with the NTP Appliance on my 3.5.0 ESX server and wanted to share my fixes.

Be sure in your ntpvm_scsi.vmx (or whatever .vmx corresponds to your VM) that you have the line:

ethernet0.virtualdev = "e1000"

I know it's in the original ntpvm_scsi.vmx, but when you bring it into the host it can re-write the file.

-Tom

Click to view trhoads's profile Lurker 2 posts since
Mar 27, 2007
Kamphor,

Thanks for doing this project, the appliance is killer. I looked around quite a bit and found that this udev bug has been around in Mandriva for some time.

In order to get around the hang at "Start udev", since we do not use wireless NIC's in our ESX servers:

edit /etc/modprobe.conf and add the following line:

"alias ipw2200 off"

-Tom

Will it work on Player

27. May 8, 2008 9:38 AM in response to: kamphor
Click to view magnetron's profile Novice 8 posts since
Jun 25, 2007
Kamphor, kudos for getting across a seemingly great product, I have two queries:

Will the NTP work on free VM Player and Current free VM server 2.0 offering, (not the ESX)?

Do I need to install OVL file over the original or will only the OVL file be sifficient?

Pls advise!!

Re: Will it work on Player

28. May 8, 2008 10:46 AM in response to: magnetron
Click to view kamphor's profile Novice 19 posts since
Mar 2, 2006
magnetron,

if you go to the download page, I believe the ide w/vmxnet version should work fine with the free vmplayer. The scsi version w/e1000 should work fine with the free vmware server 1.0.x. I have yet to test it with vmware server 2.0. If anyone has a test environment for vmware server 2.0, it would help greatly if someone can supply feedback on testing it in that version.

respectfully,
Mervin Yap

Re: Will it work on Player

29. May 10, 2008 9:51 AM in response to: kamphor
Click to view magnetron's profile Novice 8 posts since
Jun 25, 2007
Thanks for the reply Kamphor. Do you suggest that if the NTP is hosted on VM
player it would be most resource appropriate and effective on a desktop
class base machine?

Also, if I host NTP server within my DMZ to serve my firewalls and routers
too. I would only need to use single port through my firewall towards
internal LAN on hosting windows 2003 servers, is this the right design?

Pls advise!

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities