Page 1 of 1

Blocking Restore on close Not Working

Posted: 23. Sep 2013, 15:05
by poncho524
I'm trying to make a VM immutable. So I'm trying to Lock down the UI.

I was looking for a way to force a Close to do a "Power Off + Restore Snapshot". Since that didn't look like an available option, I thought I'd just remove the "Restore" option and everything else so that the only option available would be "Power Off".

I tried this:
> VBoxManage setextradata "VM name" GUI/RestrictedCloseActions SaveState,Shutdown,Restore

But the "Restore" option continues to be present.

This seems to be undesired behavior of this setting. Am I doing something wrong? Or is this a bug?

(VBOX 4.2.18)

Re: Blocking Restore on close Not Working

Posted: 23. Sep 2013, 17:00
by mpack
To be clear: VirtualBox allows you to make a drive immutable. Is that what you've done? I ask because using snapshots on top of that seems to defeat the purpose.

With an immutable drive, VBox automatically creates a differencing file which is discarded next time the VM is started (not when it is closed).

Re: Blocking Restore on close Not Working

Posted: 23. Sep 2013, 17:05
by poncho524
I wanted the VM to act like an immutable saved state... so to avoid the OS boot process/time.

I want it to launch to the saved-state application/utility, in a fresh state, then close the window when done, so that the next time the VM is launched it goes back to the saved-state of a fresh application.

I dont think an immutable disk in VB will act as a saved-state. is that true?

Re: Blocking Restore on close Not Working

Posted: 23. Sep 2013, 17:10
by mpack
I never use saved states so I couldn't tell you what else acts like it. Why not forget the saved state and simply put the application in the guest startup folder (or equivalent).

Re: Blocking Restore on close Not Working

Posted: 23. Sep 2013, 19:40
by poncho524
The point of wanting to use Saved State / Snapshot is to avoid the Boot time of the VM.

So simply putting the app in the guests startup isn't the solution I'm looking for.

The question remains: why "VBoxManage setextradata" isn't working as advertised...

Re: Blocking Restore on close Not Working

Posted: 24. Sep 2013, 11:53
by mpack
Zip up the .vbox file for the VM and post it here. Alternatively, look for yourself in the <ExtraData> section of the file and see if your command "took".

Re: Blocking Restore on close Not Working

Posted: 30. Jan 2014, 00:29
by poncho524
So I'm just now coming back to this task.

I have this line in my .vbox

<ExtraDataItem name="GUI/RestrictedCloseActions" value="SaveState,Shutdown,Restore"/>

When I hit the X to close the window, I still have the check box to restore to snapshot.

Every other combination seems to work fine; i can get rid of SaveState, Shutdown, PowerOff

My goal is to make this VM open in from a saved state (snapshot) and simply close w.o giving the user any options on HOW to close... just power off.

This seems to still be a problem on 4.3.6