Custom time

This is for discussing general topics about how to use VirtualBox.
Post Reply
login
Posts: 4
Joined: 17. Nov 2009, 13:23
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: several

Custom time

Post by login »

Hello,

this may be a stupid question, but I need to change the system time before the operating system starts (boot). I don't know how to get into the bios menu (if there is one at all) and if I try to change the time after the OS has booted, it is automatically resetted to the correct one. Is it possible to disable this "function"?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Custom time

Post by vbox4me2 »

You have to remove the GA in the VM for this.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Custom time

Post by MarkCranness »

The manual (section 9.15) mentions a TSCTiedToExecution option, but I think that may cause clock skew.

Try this (undocumented) setting while the VM is shutdown:

Code: Select all

VBoxManage setextradata "My VM" "VBoxInternal/TM/UTCOffset" <nanoSeconds>
<nanoSeconds> is a signed 64 bit integer being the offset from UTC (I think)
Set it to -86400000000000 to offset the VM time back one day.

The clock ticks will then still be in sync, but with an offset applied.

Edit: This can also be set using:

Code: Select all

VBoxManage modifyvm "My VM" --biossystemtimeoffset <msec>
... this should set the VM clock to be in sync with the host clock, but <msec> (milliseconds) offset. Negative numbers put the VM clock in the past, positive numbers put the VM into the future.
Post Reply