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:
- Turn off your VM.
- Open the command prompt. If you are using Windows, open it in the following folder:
If you are using Linux, just open the terminal app.
- Type the following command:
VBoxManage setextradata "My Virtual Machine" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
Replace the "My Virtual Machine" string with the actual name of the virtual machine you are using.
- 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 2003-06-06.
In Windows, open the PowerShell console and type the following command:
([datetime]"06/06/2003" - [datetime]::Now)
In Linux, the following script can be used:
#!/bin/sh secs=$(date --date "2003-06-06" +%s) let secs-=$(date +%s) msecs=$(( $secs * 1000 )) echo $msecs
- Using the milliseconds value you calculated, execute the following command:
VBoxManage modifyvm "My Virtual Machine" --biossystemtimeoffset <your milliseconds value>
Now you can start your VM. Its BIOS date will be 2003-06-06 and will not be set from the host OS any more.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: