Page 1 of 1

How to restore .vbox file ?

PostPosted: 31. Mar 2018, 18:38
by svartalf
Hi,

I've got a problem with one of my VMs which appears to be due to a corrupt .vbox file.

I have a .vbox-prev and also ZFS snapshots available but every time I copy an old .vbox file into place, it mysteriously gets overwritten and the original restored.

I have other VMs running which are fine, it is just one that won't start and in the VirtualBox Manager GUI it complains about a missing attribute.

I'm guessing that a VBox process is holding the bad file open and reverting my attempts to overwrite it.

So my question is - is there a procedure for restoring an old .vbox file in an attempt to recover my VM?

Thanks,

Richard

Re: How to restore .vbox file ?

PostPosted: 31. Mar 2018, 19:11
by ChipMcK
know nothing about solaris, but

as I recall the .vbox files are maintained in storage (ram) and are written out during close-down of Vbox.


Vbox needs to be down (not opened) like 20 seconds to flush secondary tasks/jobs.

Re: How to restore .vbox file ?

PostPosted: 31. Mar 2018, 19:44
by svartalf
Thanks. I thought it might be something like that.
Any ideas on how to stop the VirtualBox processes?
I can halt the other VMs but processes are still left running. I'm guessing there must be a more elegant way then sending a kill signal.

Re: How to restore .vbox file ?

PostPosted: 1. Apr 2018, 00:59
by ChipMcK
Quit / Exit
VirtualBox
.

Re: How to restore .vbox file ?

PostPosted: 1. Apr 2018, 13:42
by svartalf
All headless VMs stopped.
/application/virtualbox/zoneaccess disabled.
GUI not running.

I copy the .vbox file into place. Also copy into .vbox-prev just to make double sure.

Then I start VirtualBox and the files get reverted immediately.
There's something in the GUI which recreates or restores these files.

This is a bit annoying. I'm starting to thing I should just recreate the VM.

Re: How to restore .vbox file ?

PostPosted: 1. Apr 2018, 16:30
by mpack
svartalf wrote:There's something in the GUI which recreates or restores these [.vbox] files.

Of course. The vbox file stores the VM settings. It gets resaved every session, with the old file renamed to ".vbox-prev".

Re: How to restore .vbox file ?

PostPosted: 1. Apr 2018, 20:18
by svartalf
Odd that both files revert when the GUI is started. Not sure how to workaround this.

Re: How to restore .vbox file ?

PostPosted: 2. Apr 2018, 09:29
by mpack
It's impossible for them to "revert" using any feature of VirtualBox, since VirtualBox has no access to data needed to do that. However both files will change :-

Code: Select all   Expand viewCollapse view
   old.vbox_prev --> deleted.
   old_.vbox --> new.vbox_prev.
   new_.vbox --> created.