# How to disable/enable time synchronization

**URL:** <https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864>\
**Category:** SLES Virtualization\
**Created:** [July 16, 2014, 7:35am UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864 "2014-07-16T07:35:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mundlafico](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mundlafico](https://forums.suse.com/u/mundlafico)\
**Post date:** [July 16, 2014, 7:35am UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/1 "2014-07-16T07:35:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 16, 2014, 7:55am UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/2 "2014-07-16T07:55:03Z")

</div>

> [@](#):
>
> On Wed 16 Jul 2014 04:44:02 AM CDT, mundlafico wrote:
> 
> 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;

```auto
chkconfig ntp off
rcntp stop
```

To enable and start

```auto
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!

---

<div class="post-metadata">

**Author:** ![mundlafico](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mundlafico](https://forums.suse.com/u/mundlafico)\
**Post date:** [July 16, 2014, 8:54am UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/3 "2014-07-16T08:54:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 16, 2014, 5:34pm UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/4 "2014-07-16T17:34:12Z")

</div>

> [@](#):
>
> On Wed 16 Jul 2014 06:04:01 AM CDT, mundlafico wrote:
> 
> 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!

---

<div class="post-metadata">

**Author:** ![mundlafico](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mundlafico](https://forums.suse.com/u/mundlafico)\
**Post date:** [July 17, 2014, 8:51am UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/5 "2014-07-17T08:51:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 17, 2014, 4:34pm UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/6 "2014-07-17T16:34:06Z")

</div>

> [@](#):
>
> On Thu 17 Jul 2014 05:54:02 AM CDT, mundlafico wrote:
> 
> 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

```auto
#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!

---

<div class="post-metadata">

**Author:** ![KEVIN1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KEVIN1](https://forums.suse.com/u/KEVIN1)\
**Post date:** [September 1, 2014, 11:24pm UTC](https://forums.suse.com/t/how-to-disable-enable-time-synchronization/25864/7 "2014-09-01T23:24:32Z")

</div>

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](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…
