Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
What are the limits of running NTP servers in virtual machines?

I was wondering if virtualizing NTP is okay. I have a VMware ESXi 5.0 box, and I want to virtualize my router since the original hardware bit it. The only thing is I have read in places that virtualizing NTP (which my router performed) was not good because you won't be as accurate as a hardware clock. Is this true?

My router was pfSense, it ran the OpenNTPD server and was pointed at tock.usno.navy.mil. Because I am syncing with a higher NTP server is the accuracy of the hardware that important?

share|improve this question

marked as duplicate by ewwhite, Zoredache, Shane Madden, Chris S, mdpc Nov 21 '11 at 22:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers

up vote 3 down vote accepted

This has been addressed before: What are the limits of running NTP servers in virtual machines?

Short answer: Don't do it. The accuracy of your local clock is still important when setting up an NTP server, and there are too many variables when using virtual machines to guarantee reasonable accuracy.

share|improve this answer
    
Well this pretty much answered my question, looks like I will keep running on hardware. Thanks for clearing this up for me. –  Solignis Nov 21 '11 at 22:03
add comment

Depends on how accurate you need the clock to be. The Virtual Clock provided by the VM will have an inconsistent slew; usually this is limited to milliseconds. So your VM may have a hard time keeping track of it's slew in greater accuracy than ~0.1s. For most applications this is plenty accurate enough.

For certain software/hypervisor combinations the inconsistent slew causes problems and the time eventually gets off by a large amount. I've never seen this problem with ESX however.

For all platforms be certain the VM's clock is not synched to the hardware clock. There's an option to disable this as it's normally enabled. The VM will constantly have the wrong time if the hypervisor is overriding NTP.

On a side note: There are restrictions on using the cluster (tick, tock, and ntp) at usno.navy.mil; unless you meet certain qualifications you should not be using it. You should be using Stratum 2 servers, such as the pool.ntp.org project.

share|improve this answer
    
really? I thought using the usno server were the best ones. So pool.ntp.org then? –  Solignis Nov 21 '11 at 21:55
    
@Solignis - The "best" time source is a hardware reference (GPS, Cesium clock, etc.) - Second to that (and within the realm of practicality for most of us) you want a bunch of servers that are topologically close and reliable (low round-trip latency, low jitter) -- Using the appropriate regional pool.ntp.org servers will usually give you that. –  voretaq7 Nov 21 '11 at 21:57
    
I don't need the time to be absolute, it just need to be accurate enough to run basic services. Possibly later on Kerberos but not sure yet. My other option for NTP would be my hardware iSCSI san which is based off of Ubuntu Server. Would that be better? –  Solignis Nov 21 '11 at 21:57
1  
    
@voretaq7 Wow that is news to me, like I said I always thought you could not get better than the usno atomic clock. Well I know what I will be using from now on. Thanks. –  Solignis Nov 21 '11 at 21:58
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.