sahara icon indicating copy to clipboard operation
sahara copied to clipboard

Machine datetime is out of sync after roll-back...

Open fatmcgav opened this issue 8 years ago • 8 comments

As per title, when rolling back a VM, the datetime of that VM gets out of sync...

This causes issues when then come to use the rolled back VM...

Is it possible to trigger a datetime update after a rollback?

fatmcgav avatar Feb 09 '16 16:02 fatmcgav

Are you using VirtualBox as the provider? If so, there seems to be two options.

The first one is to use NTP service in your VM. The second one is to install VBoxGuestAddition to your guest when you do not do it yet.

If you've already installed VBoxGuestAddition and the issue continues to happen, I recommend you to check VBoxService settings in your VM as follows.

sudo /usr/sbin/VBoxService --enable-timesync
sudo /usr/sbin/VBoxService --timesync-set-threshold 60000
sudo /usr/sbin/VBoxService --timesync-interval 60

ryuzee avatar Feb 09 '16 22:02 ryuzee

@ryuzee Sorry, should've specified that...

I'm running Parallels provider on OSX...

fatmcgav avatar Feb 10 '16 09:02 fatmcgav

@fatmcgav got it... I do not have any Parallels environment. Please wait for other answer(s). However, using NTP seems to be a easiest solution...

ryuzee avatar Feb 10 '16 09:02 ryuzee

@fatmcgav I guess it could be fixed by enabling "TimeSync" feature in Parallels Desktop. vagrant-parallels plugin v1.5.0+ automatically enables it for VMs running under Parallels Desktop 10.1.2 and higher.

You can also enable it manually: "Actions" -> "Configure" -> "Options" -> "More options" -> "Time: Sync from OSX". Or via CLI:

prlctl set <vm_uuid> --time-sync on

It should sync the VM date/time automatically after the snapshot roll-back.

legal90 avatar Feb 10 '16 10:02 legal90

@legal90 Ah, that's useful to know...

However I'm not sure that vagrant-parallels does enable it by default, at least not for me... As I just checked on the VM's I spotted the issue with, and it's switched off...

prlctl list -i 738584ae-0330-48de-a5f2-69733d3161bc |grep Time
Time Synchronization: off

fatmcgav avatar Feb 10 '16 10:02 fatmcgav

Just to add, I'm running Parallels 10.3.0 with vagrant-parallels 1.6.1...

fatmcgav avatar Feb 10 '16 10:02 fatmcgav

Ah, sorry, that's my mistake. vagrant-parallels enables it only for Parallels Desktop 11+. For earlier versions we keep it disabled by default because of https://github.com/Parallels/vagrant-parallels/issues/186

legal90 avatar Feb 10 '16 11:02 legal90

Ah, damn... Yeh, that screws things up :(

OK, plan b then...

Cheers

fatmcgav avatar Feb 10 '16 11:02 fatmcgav