How to disable/enable time synchronization

Hi All,
I am using Windows 2012 R2 with hyper-V configured.In this environment i created the SLES 11 SP3 VM.

Now my Host is windows 2012 R2 and my guest is SLES 11 SP3.

I have a application on running on my guest(SLES 11 SP3),there we have date/time settings feature enabled. User can chose either NTP timesync or host machine timesync.

I guess in SLES 11 sp3 by default your guest is sync with your host time.

Suppose use selected as NTP time sync,how i can disable the host time sync in my guest system(SLES 11 sp3) through some shell/linux commands.

What i know is that, i can disable the host and guest time from the hyper-v settings–>integration services–>deselect time synchronization.

I am looking the solution from the linux guest machine(i mean through some linux commands)

Thank you
Regards,
Sankar

Hi
You can enable the ntp service via YaST and add the remote ntp servers
your wanting to sync to, then enable the service etc.

If you then wanted to disable, you can either use YaST runlevel, or via
the command line;

chkconfig ntp off
rcntp stop

To enable and start

chkconfig ntp on
rcntp start


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi Malcolm,
Thank you for the quick response. i guess this is for ntp enable and disable right?. Suppose if ntp is enable in my guest VM(linux VM),it is always sync with npt irrespective of your host time sync is enable or not?

I want a solution like if ntp is enable,my guest VM time sync should be disable.If i disable ntp,it should enable to host time sync.

Regards,
Sankar

Hi
I have no idead how the timesync to the Win server works, is there a
client running on the host?

If so, should be a matter of a simple script(s) to run and check which
one is running and the flip things over.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

No client running.Just one more quick question suppose if i have ntp enabled in my guest(linux VM),that means linux VM always looks ntp system for timesync between ntp server and linux VM right?

Hi
Yes, it will run and sync with the ntp server(s) defined via udp port
123.

Once you have it running as per your requirement, have a read of the
CVE and link and add to ntpd.conf

#With respect to CVE-2013-5211 and
#http://lists.opensuse.org/opensuse-security-announce/2014-01/msg00005.html
restrict default noquery


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

mundlafico wrote:
[color=blue]

I guess in SLES 11 sp3 by default your guest is sync with your host
time.

Suppose use selected as NTP time sync,how i can disable the host time
sync in my guest system(SLES 11 sp3) through some shell/linux
commands.[/color]

Time sync in VMs can be problematic. This TID contains some good
background information:
TID 7015560: NTP Time sync abruptly changes from NTP time server on
Virtual server
https://www.suse.com/support/kb/doc.php?id=7015560


Kevin Boyle - Knowledge Partner
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…