Skip to content

Instantly share code, notes, and snippets.

@smuwanga
Forked from ebridges/vbox-change-time.sh
Created July 3, 2017 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smuwanga/dd6411184e3ae90dc3c1c844d99c20a2 to your computer and use it in GitHub Desktop.
Save smuwanga/dd6411184e3ae90dc3c1c844d99c20a2 to your computer and use it in GitHub Desktop.
Change the bios time of a Virtualbox image of `<name>` to be +/- `<msecs>` from current time.
# Disable time synchronization
VBoxManage setextradata <name> "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
# Change time
VBoxManage modifyvm <name> --biossystemtimeoffset <msecs>
# Change time via OS (Ubuntu) to 03/09/2014 at 01:00:00
sudo date 030901002014.00
# update timezone data
sudo apt-get update && sudo apt-get install tzdata
# change timezone
sudo dpkg-reconfigure tzdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment