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. Turn off your VM.
  2. Open the command prompt. 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.

  3. 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.

  4. 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)

    windows powershell
    Note the TotalMilliseconds value from the output.

    In Linux, the following script can be used:

    secs=$(date --date "2003-06-06" +%s)
    let secs-=$(date +%s)
    msecs=$(( $secs * 1000 )) 
    echo $msecs

    Save it as and execute:
    linux terminal

  5. 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.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:


15 thoughts on “How to set the BIOS date in VirtualBox

  1. vicsar

    Thanks. Very useful.

  2. Bobby

    Does not work. Copied and pasted directly from here, replacing what is needed, but the syntax of the command is wrong.

    1. Sergey Tkachenko Post author

      Which command exactly has wrong syntax?
      I used everything written above weekly. All commands are correct.

      1. thatguy

        C:\Program Files\Oracle\VirtualBox>VBoxManage modifyvm “My Virtual Machine” –biossystemtimeoffset This is mine that does it

        1. AndreStork

          On biossystemtimeoffset is — not –


    ## Inicia a VM sempre na data 30/12/2016

    $tempo = “”+([datetime]”12/30/2016” – [datetime]::Now).TotalMilliseconds
    $tempo = “”+[math]::Round($tempo)
    $nome = “nomeVM”

    & ${env:ProgramFiles}\Oracle\VirtualBox\VBoxManage setextradata $nome “VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled” 1

    & ${env:ProgramFiles}\Oracle\VirtualBox\VBoxManage modifyvm $nome –biossystemtimeoffset $tempo

    & ${env:ProgramFiles}\Oracle\VirtualBox\VBoxManage startvm $nome

  4. tom

    Just a thank you for these instructions.
    After numerous Googles and many failed attempts (over several years), your guidelines work flawlessly.
    Thank you again.

  5. pat

    Thank you, step 3 is all what i need

  6. Carlos Goncalves

    Hello.. And what is necessary to do to set the current time?

  7. Cristian Pachon


    I require my MV to start on January 2017

    My virtual machine is called: W81
    ————————————————– —————————–
    cd c: / Program Files / Oracle / VirtualBox

    VBoxManage setextradata W81 “VBoxInternal / Devices / VMMDev / 0 / Config / GetHostTimeDisabled” 1

    c: \ Program Files \ Oracle \ VirtualBox> VBoxManage modifyvm W81 – biossystemtimeoffset -25477064201

    ————————————————– ——————————–

    After all the procedure, I start my MV but it is dated 2019.

    please help

    1. Sergey Tkachenko Post author

      how did you get the offset value?

  8. skip Nolles

    Is it possible to set a fixed date that no longer changes.


  9. DavidE

    thanks for this tip and the comments above. been looking for this for so long and the other sites were not as helpful as this.
    i had to confront this finally after almost a year and good thing i found this page. this one hit the sweetspot.

  10. AndreStork

    Thank you finally I can install Windows Whistler

  11. Faisal

    Thank you. Very helpful and working perfectly.


Leave a Reply

Your email address will not be published. Required fields are marked *