I would like to change date in Virtual Machine, but I want to do this by command line. I use this line:
VBoxManage modifyvm MyVirtSystem -biossystemtimeoffset -1209600000
It shoulds change date to two weeks ago, but I get this error message:
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execu
tion failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or
failed to start.
Have you any ideas what I do wrong?
There are a few things to be aware of when fiddling with the BIOS time offset, the first is that you didn't include a double-dash in your command. I tried it with one of my VMs and I needed to have two dashes for that option to work (though I got a different error than you reported). Here is the command I used:
VBoxManage modifyvm MyVirtSystem --biossystemtimeoffset -1209600000
The next thing is to ensure that you have the proper permissions to modify the xml configuration file for your VM. I have seen many times where VirtualBox is launched after installing with elevated (or even a different user entirely) credentials, a VM is created, and then later without the same privileges a regular user is prohibited from changing the configuration due to file permissions.
One last thing to be aware of, you may you need disable any time sync services, possibly even the guest extensions to prevent the guest clock from getting synchronized back to the correct time. For a Windows guest you would want to stop/disable the VirtulBox Guest Additions and Windows Time services.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With