2

I have a time server running on a server PC that is meant to change the times of various guest PCs as a result of a TCP/IP command on port 9000 issued by a control application running on an integrated controller. I have everything running the way I would like except that every time I try to set the time on my clients or my server PC using the following:

sudo hwclock --set --date="2014-01-30 12:00:00"
sudo hwclock --hctosys

the time changes to my issued value and then moments later the time reverts back to what it was initially. I've tried using these commands on a guest pc with ntp stopped, and no network connectivity with the /etc/localtime file deleted and it still does this. I'm using the latest version of Lubuntu currently. Does anyone know why this might be happening?

By the by, when I say "PC" I am referring to virtual machines I have running in VirtualBox. Eventually this will go onto real PCs but for now I'm working virtually.

2 Answers2

1

Figured it out. Thank you for directing me towards VirtualBox as the issue. If anyone runs into this problem the solution is simple. It is the time sync feature from VirtualBox Guest Additions that is causing time to revert back to its original state. To prevent time sync in a linux guest VM, follow the below instructions:

disable time sync instructions

Simply change line

daemon $binary > /dev/null to daemon $binary --disable-timesync > /dev/null

in "/etc/init.d/vboxadd-service"

Cheers

0

Maybe you enabled the time synchronisation between host and guests?

See here: Using virtual box is it possible to set your virtual machine time to be different from host time

Just a thought.

I appologize if that doesn't suffice as an answer - it seems I cannot add comments (not yet, or not because I'm using the smartphone version of the site).

Marlon
  • 101