Power Off The Machine
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Power Off The Machine
Before Version 7.0, there is a checkbox to auto restore a snapshot when "Power Off The Machine". Has this feature been removed in Version 7.0?
https://www.geekrar.com/wp-content/uplo ... re-min.jpg
https://www.geekrar.com/wp-content/uplo ... re-min.jpg
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Power Off The Machine
Yes, it has been. There were apparently enough users (Oracle's paying customers?) that were using that checkmark wrong and were losing their data that the devs took out the checkbox.
The last snapshot can still be restored through the VM's snapshots page in the main Virtualbox window.
The last snapshot can still be restored through the VM's snapshots page in the main Virtualbox window.
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
Thank You Scott for your confirmation on this.
I wonder if there is a command line to put the checkbox back in? Otherwise, the other option is, I can write a batch file to restore the snapshot rather than navigating on the VM interface with a few more clicks.
The other thing I don't like about version 7 is the progress bar on the right side of the VM. I have been using Virtualbox for almost 10 years and everything has been so good up until these two features.
I wonder if there is a command line to put the checkbox back in? Otherwise, the other option is, I can write a batch file to restore the snapshot rather than navigating on the VM interface with a few more clicks.
The other thing I don't like about version 7 is the progress bar on the right side of the VM. I have been using Virtualbox for almost 10 years and everything has been so good up until these two features.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Power Off The Machine
Unfortunately, no. There was a big discussion in the beta period about this, but the devs have remained firm in not putting it back in. Probably the bosses drew the line.VirtualBox_2019 wrote:I wonder if there is a command line to put the checkbox back in?
This may be a good workaround. Please post what you come up with.VirtualBox_2019 wrote: can write a batch file to restore the snapshot
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
Hi Scott, here is the basic command line code that you can restore a snapshot by clicking on a batch file. Make sure the batch file is encoded as ANSI, not Unicode. Otherwise, it will not run. This goes for all batch files and I am sharing this because NotePad++, etc... sometimes default to Unicode. Took me over weeks to try to understand why it worked on CMD but not in the batch file.
Code: Select all
CD "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe snapshot <Name_of_VM> restore <Name_of_Snapshot>
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
Basically, I add the batch file to my taskbar and it can restart the instance too with one of these:
Code: Select all
VBoxManage.exe list vms
VBoxManage.exe list runningvms
VBoxManage.exe startvm "Your VM"
VBoxManage.exe controlvm "Your VM" acpipowerbutton
VBoxManage.exe controlvm "Your VM" poweroff
VBoxManage.exe controlvm "Your VM" reset
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Power Off The Machine
For an explanation and an alternative to the checkbox, see the two posts of klaus in VM - Snapshot restore on power off (GUI/DiscardStateOnPowerOff).VirtualBox_2019 wrote:I wonder if there is a command line to put the checkbox back in?
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
fth0
Do I need to run this each time I power off the instance? Most likely not right? It is a one set and forget thing right? If that is the case and similar to the checkbox, that is exactly what I am looking for.
Thank You for sharing.
Code: Select all
VBoxManage setextradata "Test" GUI/DiscardStateOnPowerOff 1
Thank You for sharing.
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
BTW... Can I run it to turn on/off when the VM is still running?
-
- Posts: 24
- Joined: 20. Apr 2019, 22:10
Re: Power Off The Machine
The answer is "YES" to both of my previous posts. Thanks.
Re: Power Off The Machine
The checkbox is back! Somewhere between versions 7.0.2 and 7.0.12.
Thanks to those involved.
Thanks to those involved.