Change BIOS time of a VirtualBox VM

Firstly, go here and tweak this script, adding the date you need. Click run. The result displayed is the number of milliseconds that you need to shave off the current bios time.

// Now
$time = time();
// Date you want
$date = new DateTime('2014-09-18');
$newTime = $date->format('U');
// Copy paste the result into the command below
echo ($time - $newTime) * 1000;

Make sure the box is shut down. Now in your terminal, run these:

VBoxManage setextradata "NAME_OF_VM_HERE" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
VBoxManage modifyvm "NAME_OF_VM_HERE" --biossystemtimeoffset PASTE_NUMBER_HERE

That’s it! VM is now running in the past.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s