How to restore .vbox file ?

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
svartalf
Posts: 7
Joined: 31. Mar 2018, 18:32

How to restore .vbox file ?

Post 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
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, OSX
Location: U S of A

Re: How to restore .vbox file ?

Post 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.
svartalf
Posts: 7
Joined: 31. Mar 2018, 18:32

Re: How to restore .vbox file ?

Post 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.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, OSX
Location: U S of A

Re: How to restore .vbox file ?

Post by ChipMcK »

Quit / Exit
VirtualBox
.
svartalf
Posts: 7
Joined: 31. Mar 2018, 18:32

Re: How to restore .vbox file ?

Post 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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to restore .vbox file ?

Post 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".
svartalf
Posts: 7
Joined: 31. Mar 2018, 18:32

Re: How to restore .vbox file ?

Post by svartalf »

Odd that both files revert when the GUI is started. Not sure how to workaround this.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to restore .vbox file ?

Post 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

   old.vbox_prev --> deleted.
   old_.vbox --> new.vbox_prev.
   new_.vbox --> created.
Post Reply