Merging Snapshots via Vboxmanage

This is for discussing general topics about how to use VirtualBox.
Post Reply
VBLover77
Posts: 3
Joined: 1. May 2011, 18:21
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 3

Merging Snapshots via Vboxmanage

Post by VBLover77 »

Good morning,

i'm gettin a major headache. The last hours i've been working non-stop on solving my little VirtualBox problem.
It all started with a full dynamic vdi. In the process of enlarging it i messed up big time.
Thank goodness i made a backup of ..\Harddisks and ..\Machines.
I want to achieve the following.
Merge all snapshots by starting with the newest one. After merging and writing all the differencing information i'm planning to merge it in a final step with the vdi file in ..\Harddisks.
In ..\Machines i checked the xml file for all the snapshots uuids.
The setup:
Snapshot 1
- Snapshot 2
- Snapshot 3
- Snapshot 4
- Snapshot 5

Now i want to delete Snapshot 5 to trigger integrating of differencing information into Snapshot 4.
But it seems i can't get the command right.
I've created a batch file for more convenience usage.
Contents of .bat:
@ECHO OFF
"c:\program files\oracle\virtualbox\vboxmanage.exe" snapshot "j:\_virtualbox\_Backup\Machines\winxp\snapshots\{2a8c0a36-f146-4ad6-ab63-ebb03ee3dea9}.vdi" delete
Pause

That command appears to be wrong. Says vboxmanage could not find a registered machine named 'j:....vdi'

I hope some1 can pinpoint me in the right direction.
Thanks in advance.

Greetings
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Merging Snapshots via Vboxmanage

Post by mpack »

I suggest you download CloneVDI and try using it to clone the last snapshot (the one you were trying to delete). If it succeeds then the clone will be a merger of the entire snapshot chain. Build a new VM around the cloned VDI, making sure to get all VM settings identical, including settings such as MAC address which are hidden behind an "Advanced" tab.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Merging Snapshots via Vboxmanage

Post by mpack »

And please correct your profile: you are not using "OSE other" on a Win7 host, and I could have answered your questions more thoroughly if I had known what guest OS's you use ("3" is not very useful).
VBLover77
Posts: 3
Joined: 1. May 2011, 18:21
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 3

Re: Merging Snapshots via Vboxmanage

Post by VBLover77 »

Moin,

ok. Here is my solution.
First of all i found a backup of all necessary dirs as of May 1st. It was working flawlessly. In the next step i tried to integrate the missing snapshots. 2 more snapshots created after May 1st i successfully integrated by copying into \Snapshots and editing the xml file. Unfortunately the last snapshot was faulty. Maybe i deleted a file. I can't quite remember.
Now at least my virtual machine dated June 2nd.
After i got rid of the pressure potentially losing a lot of data i deleted all snapshots and ending up with a big vdi file.
That file i enlarged via CloneVDI.
And the best part: I didn't lose any data at all because i use a nifty sync tool which copies important data to my server. :)
And please correct your profile: you are not using "OSE other" on a Win7 host, and I could have answered your questions more thoroughly if I had known what guest OS's you use ("3" is not very useful).
hehe. That is a good one. I would've chosen Windows XP as guest but well.. there is no such option. I figured OSE other might fit my case. Correct me if i'm wrong.

Greetings
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Merging Snapshots via Vboxmanage

Post by BillG »

And please correct your profile: you are not using "OSE other" on a Win7 host, and I could have answered your questions more thoroughly if I had known what guest OS's you use ("3" is not very useful).
hehe. That is a good one. I would've chosen Windows XP as guest but well.. there is no such option. I figured OSE other might fit my case. Correct me if i'm wrong.

Greetings[/quote]

Do you understand the difference between host and guest? The host (primary) OS is the OS which is running on your host (physical) machine. If it is a Windows OS it cannot be OSE. If it is Windows 7, select that. If it is XP, select that.

If you have three vms (guests) running three different OSs, then list them all. See my profile. The host (primary) OS is Windows 7 and the guest OSs are listed.
Bill
Post Reply