0% found this document useful (0 votes)
134 views

How To Set The BIOS Date in VirtualBox

This document provides instructions for setting a custom BIOS date in a VirtualBox virtual machine. It explains that by default VirtualBox uses the host machine's date and time, but it is possible to override this by first disabling automatic time syncing in the guest OS, calculating the offset between the desired date and current date in milliseconds, and using the VBoxManage command to modify the VM with the offset value, which will set the BIOS date without syncing from the host. The steps are: 1) disable time sync in guest OS, 2) power off VM, 3) use VBoxManage to disable host time sync, 4) calculate date offset in ms, 5) use VBoxManage to modify VM with offset

Uploaded by

spidyhero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

How To Set The BIOS Date in VirtualBox

This document provides instructions for setting a custom BIOS date in a VirtualBox virtual machine. It explains that by default VirtualBox uses the host machine's date and time, but it is possible to override this by first disabling automatic time syncing in the guest OS, calculating the offset between the desired date and current date in milliseconds, and using the VBoxManage command to modify the VM with the offset value, which will set the BIOS date without syncing from the host. The steps are: 1) disable time sync in guest OS, 2) power off VM, 3) use VBoxManage to disable host time sync, 4) calculate date offset in ms, 5) use VBoxManage to modify VM with offset

Uploaded by

spidyhero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

How to set the BIOS date in VirtualBox

VirtualBox is my virtualization software of choice. It is free and feature-rich, so all my virtual


machines are created in VirtualBox. In this article, we will see how to set the BIOS date for a
VirtualBox VM.

You might have a number of reasons to set a custom date for a VirtualBox VM. For example, when
you want to try some outdated Windows build or some time-limited trial software. By default,
VirtualBox uses the host machine's time and date and synchronizes it when you open your VM.
To set a custom date, you need to perform these steps:

1. Disable the clock’s “Automatic sync with a Time server” inside the OS
2. Turn off your VM.
3. Open the command prompt as Administrator. If you are using Windows, open it in the
following folder:

C:\Program Files\Oracle\VirtualBox

If you are using Linux, just open the terminal app.

4. Type the following command:

VBoxManage setextradata "My Virtual Machine"


"VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

Es.: VBoxManage setextradata "WinXP_Mode2"


"VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

Replace the "My Virtual Machine" string with the actual name of the virtual machine you
are using.

5. Now, you need to calculate the offset between the current date and the desired BIOS date
for the VM, in milliseconds.
For example, let's set it to 2019-01-01.
In Windows, open the PowerShell console and type the following command:

([datetime]"01/01/2019" - [datetime]::Now)

Note the TotalMilliseconds value from the output, and keep the integer part with the sign.
In our example “-174190590“

https://winaero.com/blog/how-to-set-the-bios-date-in-virtualbox/
In Linux, the following script can be used:

#!/bin/sh
secs=$(date --date "2019-01-01" +%s)
let secs-=$(date +%s)
msecs=$(( $secs * 1000 ))
echo $msecs

Save it as datetime.sh and execute:

6. Using the milliseconds value you calculated, execute the following command:

VBoxManage modifyvm "My Virtual Machine" --biossystemtimeoffset <your


milliseconds value>

Es. VBoxManage modifyvm "WinXP_Mode2" --biossystemtimeoffset -174190590

Now you can start your VM. Its BIOS date will be 2019-01-01 and will not be set from the host OS
any more.

https://winaero.com/blog/how-to-set-the-bios-date-in-virtualbox/

You might also like