Unable to change date on Guest: Host:win7,guest:winXP

Discussions about using Windows guests in VirtualBox.
Post Reply
hajonnes
Posts: 2
Joined: 24. Jul 2021, 18:00

Unable to change date on Guest: Host:win7,guest:winXP

Post by hajonnes »

Hi,
I would like to have 2013 as year on my windows XP installation,
I used:

Code: Select all

VBoxManage setextradata VM-name "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
which resulted in the line .vbox file:

Code: Select all

<ExtraDataItem name="VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" value="1"/> 
I changed the year in the guest and shut down the guest from the start menu in the guest.

Each time I change the date to 2013 in guest and restart the vm I'm back in 2021.

What is wrong?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unable to change date on Guest: Host:win7,guest:winXP

Post by mpack »

hajonnes wrote: What is wrong?
What's wrong is that XP, like most Operating Systems of the last 25 years, gets it's current time from a hardware RTC or network time server on startup. If you had a physical XP machine that you last shut down in 2013, would you expect it to still say 2013 when it finished a boot? Obviously not. So why expect different behaviour from XP when it runs on virtual hardware?

Have a look in the user manual, at the "VBoxManage modifyvm --biossystemtimeoffset <ms>" command. This allows you to apply a fixed time offset (expressed in ms) between the host time and the virtual RTC that XP will see when it boots. Note however that it's the guest OS that decides what time sources it wants to use, so if you give XP a choice of time sources, i.e. if you give it access to a network time server, then it might still revert to actual wall clock time.
Post Reply