Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Neririn on May 22, 2006, 06:46:58 PM
-
I made reference to this issue in an earlier post,
http:// http://forums.contribs.org/index.php?topic=32138.msg135574#msg135574
but decided that it might do well to have it's own post.
Does anyone know how to best configure SME to keep time as a VM? I have tried running a ntpdate command via cron every 5 min, but when ntpd is running it conflicts, and even if I stop ntpd it starts again eventually and my time deteriorates. Is there a 'best practices' to resolve this? As one can see from the other post, I have tried to install vmware-tools to sync with the host. (issues abound). I have tried Cron, i've tried geting ntpd to sync more frequently. None seem to have been effective for long.
Any help will be GREATLY Appreciated.
Neru
-
Be advised that I'm still evaluating VMware Server for production environments. However, this is what seems to fix the time issue. If there is a better way, please let me know.
Scenario: Centos 4.3 Server with VMware Serer Beta 3 installed - SME 7.0rc1 (testing rc2 now) as guest.
Configure host OS for NTP timekeeping
Configure guest OS for NO NTP timekeeping
Install VMware Tools RPM:
At VMware Console, click VM->Install VMware Tools
At SME host console, enter:
mount /dev/cdrom /media/cdrom
rpm -Uvh /media/cdrom/VMwareTools-*.i386.rpm
If you have a problem with the next step, rem out the pcnet32 module from the /etc/modprobe.conf file and reboot the VM first.
vmware-config-tools.pl
Follow the instructions to implement the vmxnet driver as displayed.
Start VMware Tools at the SME console:
/etc/rc.d/init.d/vmware-tools start
Make tools start on boot
ln -s /etc/rc.d/init.d/vmware-tools /etc/rc7.d/S19vmware-tools
Edit /boot/grub/grub.conf
add 'clock=pit' to appropriate kernel line
Shut down the SME 7 VM
Edit /var/lib/vmware/<vm name>/<vm name>.vmx
change tools.syncTime = "TRUE"
Restart VM
-
I have (tentatively) solved this problem without installing the VMWare Tools as follows:
1. Modify /boot/grub/grub.conf according to these instructions from vmware (http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1420).
I chose to add the following to the end of all of the "kernel" lines in grub.conf:
clock=pmtmr nosmp noapic nolapic
2. Create a template fragment to prevent any reference to the misbehaving virtual hardware clock provided by VMWare:
# mkdir -p /etc/e-smith/templates-custom/etc/ntp.conf
# echo \# Disable the local hardware clock > /etc/e-smith/templates-custom/etc/ntp.conf/10localhost
3. Setup ntpd to use the north american "pool" servers:
# config setprop ntpd NTPServer north-america.pool.ntp.org
(note: I actually used "config setprop ntpd NTPServer "north-america.pool.ntp.org minpoll 4 maxpoll 8", but only to see how expand-template would handle the "minpoll...." part...)
4. Expand the template and reboot to allow the kernel clock options to kick in:
# expand-template /etc/ntp.conf
# signal-event reboot
I'll be back in a few days to report how this worked.
-
So far so good - 12 hours after making the changes above my clock is still doing well.
# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
+192.52.107.241 139.165.26.0 4 u 140 256 377 104.728 14.736 14.256
+205.166.121.66 132.239.1.6 2 u 87 256 377 77.234 17.011 37.068
*198.144.194.12 131.243.64.11 2 u 210 256 377 75.613 10.522 22.949
I'm still synchronized with a time server, and my "jitter" is less than 50 milliseconds...
-
Still looks good.
# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
+192.52.107.241 11.224.206.11 3 u 116 256 377 103.783 -23.869 30.908
*199.103.21.227 192.43.244.18 2 u 230 256 377 15.659 22.545 22.193
+201.137.20.1 200.23.51.205 2 u 6 256 377 112.853 10.149 33.306
-
My first system, configured with
# config setprop ntpd NTPServer "north-america.pool.ntp.org minpoll 4 maxpoll 8"
is still working fine.
I setup another system using only
# config setprop ntpd NTPServer "north-america.pool.ntp.org"
but it keeps losing track of the time servers.
However, the first server is running on VMWare on Windows 2003 Standard, and the second is running on VMWare on Windows XP...
I've reconfigured the WinXP hosted system with "minpoll 4 maxpool 8" to see if it works any better.
-
Some more information can be found here oddly enough:
KB Article describing the use of clock=pit (http://support.microsoft.com/?kbid=918461).
-
Just two comments...
Using clock=pit on a SME 7rc2 VM (under a Centos 4.3 VMware Server host) caused IMAPS to fail. And it was real fun to troubleshoot.
Supposedly (I haven't tested), the vmxnet network driver that is part of VMware-Tools has much better performance than the stock pcnet32 driver. This may not be important in many applications, but it was for me.
G
-
I'm running v7 release on VMWare and have the same issue..
Tried the clock=pit method but POP3S fail for connection.. Other then installing VMtools.. any solutions?
Thanks.
Just two comments...
Using clock=pit on a SME 7rc2 VM (under a Centos 4.3 VMware Server host) caused IMAPS to fail. And it was real fun to troubleshoot.
Supposedly (I haven't tested), the vmxnet network driver that is part of VMware-Tools has much better performance than the stock pcnet32 driver. This may not be important in many applications, but it was for me.
G
-
I wrote this howto mostly for my own benefit:
http://www.sonoracomm.com/index.php?option=com_content&task=view&id=54&Itemid=32
Also, a quick search of the forums ''vmware clock' turns up this:
http://forums.contribs.org/index.php?topic=32113.0
G