Page 1 of 1

How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 10:54
by ALIOP
the title says it all. i used this peace of code ( VBoxManage setextradata 1 "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 ), but i am not sure if it works or not.not. In fact, i'm not sure if i should keep all the quotes or not.So i was looking for a way to check if time synch is disabled or not.

On a side note, i tried accessing the configuration files of my virtual machine named 1 in these folders but i dont seem to find the time synch line related code.

E:\Virtual Machines\1\1.vbox-prev (this is the folder where the Virtual disk is saved also)
C:\Users\Aliop\VirtualBox VMs\1\1.vbox-prev
C:\Users\Ali\.VirtualBox\VirtualBox.xml

opening all these in XML format doesn't show the line code of time synch being enabled or disabled.

Any help is appreciated guys , thank you !

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 15:37
by mpack
Quotes are required around any command line parameter that includes spaces, and is optional around those that don't.

The parameter following the "setextradata" keyword is supposed to be the VM name or UUID. So, the command example you show is wrong unless you have a VM called "1".

VirtualBox.xml stores global settings for the GUI. It has nothing to do with storing settings for your VM. The latter can be found in <userdoc>\"VirtualBox VMs"\<VM name>.vbox. path conventions to be adapted for your choice of host OS.

Actually, rereading your post... it looks like you really do have a VM called "1". That doesn't seem very sensible: VBoxManage has to decide if your supplied VM identifier is a name or a UUID, and a very credible bug would be where a digits-only name is assumed to be a UUID. If I was you I would recreate that VM with a meaningful name - or use the full UUID as an identifier.

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 17:08
by ALIOP
hey, thank you for the reply.
But the problem that i'm having, is how to know if that piece of code actually disabled time synchronization between the host machine and the the guest VM.IS there like a file of some type or a line of some type that says that the time synchronization has stopped ?

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 17:12
by Perryg

Code: Select all

E:\Virtual Machines\1\1.vbox-prev 
The .vbox-prev and .vbox-tmp very well may not show the change since they are not the running config file. Look for the *.vbox file instead.

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 19:01
by mpack
Perryg wrote:Look for the *.vbox file instead.
I'd be willing to risk a small wager that the OP can't see any .vbox files because he has that awful Windows shell feature enabled: Hide extensions for known file types, and that this alone is responsible for some of the confusion.

Moving this discussion to "Windows Hosts", since it's become clear that this issue is not generic.

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 19:40
by ALIOP
Perryg wrote:

Code: Select all

E:\Virtual Machines\1\1.vbox-prev 
The .vbox-prev and .vbox-tmp very well may not show the change since they are not the running config file. Look for the *.vbox file instead.
ok the thing that worked for me:
1)if just import a machine from somwhere else and it wasnt registered (using the oracle launcher) then that piece of code will not work.
2)the settings for the virtual machine is located in "C:\Users\yourusername\VirtualBox VMs",in that folder you will have the folder of your VMs named after your VM obviously, and in that folder you will have the ".vbox-prev".
3)when you use the piece of code [ vboxmanage setextradata "vmname" “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” “1″ ] , it will generate the a line of code inside of the ".vbox-prev" file.
4)that line of code will look like this " <ExtraDataItem name="VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" value="1"/> ".
5)Thats how you know that the option was enabled....
6)Another way to check if the Synchronization was disabled or not is by simply changing your host time.if the synchronization is off , then your Guest machine time will not update along with your Host's time.

Thank you guys for taking time to reply to my question.

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 19:57
by mpack
Please forget the "vbox-prev" file. It's a backup file and has no role in VirtualBox other than as a backup for the previous contents of the .vbox file, which is the actual file you should be looking at if you want to verify a VMs current settings. And see my previous comment above if you can't see that file (hint: go into Windows folder options and disable the feature I mention).

Re: How to check if Time Synch is disabled or not ?

Posted: 4. Nov 2014, 20:46
by ALIOP
mpack wrote:Please forget the "vbox-prev" file. It's a backup file and has no role in VirtualBox other than as a backup for the previous contents of the .vbox file, which is the actual file you should be looking at if you want to verify a VMs current settings. And see my previous comment above if you can't see that file (hint: go into Windows folder options and disable the feature I mention).
strange , it worked perfectly when i edited that file. What does it do exactly ? save the settings for the last launch of the VM ? Whats a good program to open it with ? i used notepad and internet explorer and its still a block of text.

Re: How to check if Time Synch is disabled or not ?

Posted: 5. Nov 2014, 10:50
by mpack
I told you what that file does: nothing. It's a backup copy that VBox makes of the .vbox file right before it replaces the .vbox file. If you found anything of yours in there then it's because you had already made the change using VBoxManage, probably several iterations ago.

The clue is in the name ".vbox-prev".

Re: How to check if Time Synch is disabled or not ?

Posted: 6. Nov 2014, 12:57
by ALIOP
PS: a good way to open that file would be to use notepad ++