Gentoo Archives: gentoo-user

From: Mike Mazur <mmazur@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] date and gentoo running under vmplayer
Date: Thu, 06 Mar 2008 04:34:24
Message-Id: 184110a70803052034p57778655jb76d3536ea8334d2@mail.gmail.com
In Reply to: Re: [gentoo-user] date and gentoo running under vmplayer by Chris Brennan
1 Hi,
2
3 What could also help in this is installing vmware-workstation-tools[1]
4 in your Gentoo instance.
5
6 Not directly related to your specific problem, but I've been running
7 RHEL 5 x86_64 in a VM on a CentOS 5 i386 host. The time in RHEL flows
8 slowly, and soon the clock is way behind. I have tried setting up ntpd
9 to keep the time in sync with the host machine, but it crashed
10 silently right away.
11
12 To work around this, I have a cron job that sets the correct time with
13 the ntpdate command every 2 minutes. It's good enough for my needs.
14
15 [1] http://gentoo-portage.com/app-emulation/vmware-workstation-tools
16
17 Good luck!
18 Mike
19
20
21 On Thu, Mar 6, 2008 at 1:00 PM, Chris Brennan <xaero@××××××××××.net> wrote:
22 > -----BEGIN PGP SIGNED MESSAGE-----
23 > Hash: SHA1
24 >
25 > you need to make sure ntp-client and ntpd (from openntpd) have been
26 > started, and you have a valid time server.
27 >
28 > Below I have included everything I hope will help you
29 >
30 > - ------------
31 > xaero@Leviathan ~ $ emerge -vp openntpd
32 >
33 > These are the packages that would be merged, in order:
34 >
35 > Calculating dependencies... done!
36 > [ebuild R ] net-misc/openntpd-3.9_p1-r1 USE="ssl (-selinux)" 150 kB
37 >
38 > Total: 1 package (1 reinstall), Size of downloads: 150 kB
39 > xaero@Leviathan ~ $ cat /etc/conf.d/ntpd
40 > # /etc/conf.d/ntpd: config file for openntpd's ntpd
41 >
42 > NTPD_HOME=/var/empty
43 >
44 > # See ntpd(8) man page ... some popular options:
45 > # -s Set the time immediately at startup
46 > NTPD_OPTS=""
47 > xaero@Leviathan ~ $ cat /etc/conf.d/ntp-client
48 > # /etc/conf.d/ntp-client
49 >
50 > # Command to run to set the clock initially
51 > # Most people should just leave this line alone ...
52 > # however, if you know what you're doing, and you
53 > # want to use ntpd to set the clock, change this to 'ntpd'
54 > NTPCLIENT_CMD="ntpdate"
55 >
56 > # Options to pass to the above command
57 > # This default setting should work fine but you should
58 > # change the default 'pool.ntp.org' to something closer
59 > # to your machine. See http://www.pool.ntp.org/ or
60 > # try running `netselect -s 3 pool.ntp.org`.
61 > NTPCLIENT_OPTS="-s -b -u pool.ntp.org"
62 > xaero@Leviathan ~ $ cat /etc/ntp
63 > ntp.conf ntp.conf~ ntpd.conf
64 > xaero@Leviathan ~ $ cat /etc/ntpd.conf
65 > # $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
66 > # sample ntpd configuration file, see ntpd.conf(5)
67 >
68 > # Addresses to listen on (ntpd does not listen by default)
69 > #listen on *
70 > #listen on 127.0.0.1
71 > #listen on ::1
72 >
73 > # sync to a single server
74 > #server ntp.example.org
75 >
76 > # use a random selection of 8 public stratum 2 servers
77 > # see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
78 > servers pool.ntp.org
79 > xaero@Leviathan ~ $ cat /etc/ntp.conf
80 > # NOTES:
81 > # - you should only have to update the server line below
82 > # - if you start getting lines like 'restrict' and 'fudge'
83 > # and you didnt add them, AND you run dhcpcd on your
84 > # network interfaces, be sure to add '-Y -N' to the
85 > # dhcpcd_ethX variables in /etc/conf.d/net
86 >
87 > # Name of the servers ntpd should sync with
88 > # Please respect the access policy as stated by the responsible person.
89 > #server ntp.example.tld iburst
90 >
91 > server pool.ntp.org
92 > netselect -s 3 pool.ntp.org
93 >
94 > ##
95 > # A list of available servers can be found here:
96 > # http://www.pool.ntp.org/
97 > # http://www.pool.ntp.org/#use
98 > # A good way to get servers for your machine is:
99 > # netselect -s 3 pool.ntp.org
100 > ##
101 >
102 > # you should not need to modify the following paths
103 > driftfile /var/lib/ntp/ntp.drift
104 >
105 > #server ntplocal.example.com prefer
106 > #server timeserver.example.org
107 >
108 > # Warning: Using default NTP settings will leave your NTP
109 > # server accessible to all hosts on the Internet.
110 >
111 > # If you want to deny all machines (including your own)
112 > # from accessing the NTP server, uncomment:
113 > #restrict default ignore
114 >
115 >
116 > # To deny other machines from changing the
117 > # configuration but allow localhost:
118 > restrict default nomodify nopeer
119 > restrict 127.0.0.1
120 >
121 >
122 > # To allow machines within your network to synchronize
123 > # their clocks with your server, but ensure they are
124 > # not allowed to configure the server or used as peers
125 > # to synchronize against, uncomment this line.
126 > #
127 > restrict 192.168.1.0 mask 255.255.255.0 nomodify nopeer notrap
128 > xaero@Leviathan ~ $
129 >
130 > - ---------
131 > EOF
132 >
133 >
134 >
135 >
136 > John J. Foster wrote:
137 > | Hi all - it's been awhile
138 > |
139 > | This past week I've set up Gentoo running in a VM built by
140 > | http://www.easyvmx.com/ under a XP host. Installation and configuration
141 > | went fine. I normally leave the VM running when I walk away from the
142 > | machine, but when I return, time is way off. Shutting down Gentoo & the
143 > | VM & rebooting solvles the problem, as vmplayer must initially get the
144 > | date and time from the host, but it sure doesn't keep it right after
145 > | that. I tried openntpd, but it kept setting the time further and further
146 > | off. I live in Fort Collins, Co and my locatime is set correctly
147 > | (America/Denver). This is my 1st time playing with VM's. Is this common?
148 > | Is there any way around it? I'm not really sure why openntpd didn't
149 > | work.
150 > |
151 > | Any and all help appreciated.
152 > |
153 > | Thanks,
154 > | festus
155 > -----BEGIN PGP SIGNATURE-----
156 > Version: GnuPG v2.0.7 (GNU/Linux)
157 > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
158 >
159 > iD8DBQFHz2xd8hUIAnGfls4RAhofAKCKc3nbVbdY7Pu8m7UNu192PuLJ4QCeLpCz
160 > suznhio3Jt+UMeQSE4zOwL4=
161 > =/XSs
162 > -----END PGP SIGNATURE-----
163 >
164 >
165 > --
166 > gentoo-user@l.g.o mailing list
167 >
168 >
169 --
170 gentoo-user@l.g.o mailing list