Delete Snapshot

Discussions about using Windows guests in VirtualBox.
Post Reply
tadywankenobi
Posts: 4
Joined: 5. Jan 2012, 00:50
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win7

Delete Snapshot

Post by tadywankenobi »

Hi there,

Apologies if this has already been answered somewhere, but I haven't been able to find it.

I just ran the modifyhd command successfully to increase the HD space on my Win7 guest on my Mac from 20GB to 50GB. Problem is, I can't extend the HD within Windows (free space doesn't appear as available). There's a snapshot on the VirtualBox Machine, I can't delete. I've tried both the GUI and the CLI and neither has worked. I got the following error:

Code: Select all

 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Snapshot operation failed. Error message: Could not merge the medium '/Users/myname/VirtualBox VMs/Win7/Snapshots/{2e8437ac-63ab-48d7-96bf-1e01729e3543}.vdi' to '/Users/myname/VirtualBox VMs/Win7/Win7.vdi' (VERR_INVALID_PARAMETER)
I don't even know how I have a snapshot, but I tried the same commands on a clean Win7 install I have without a snapshot, and it worked fine (extended from 20GB to 30GB, no problem).

Can anyone shed any light on how I can resolve this?

Thanks a million,

T
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Delete Snapshot

Post by Perryg »

In the VirtualBox main manager if you click on the snapshot tab for the guest, what shows in that window?
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: Delete Snapshot

Post by mpack »

In this case "snapshot" is a generic term. You'll have the same problem with any VM which uses any kind of differenced image chain. For example linked clones, VMs with immutable drives, and of course VMs with snapshots.
tadywankenobi
Posts: 4
Joined: 5. Jan 2012, 00:50
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win7

Re: Delete Snapshot

Post by tadywankenobi »

mpack wrote:In this case "snapshot" is a generic term. You'll have the same problem with any VM which uses any kind of differenced image chain. For example linked clones, VMs with immutable drives, and of course VMs with snapshots.
Sure, I understand that, but how do I resolve the issue with it so that I can expand and resize the hd?

T
tadywankenobi
Posts: 4
Joined: 5. Jan 2012, 00:50
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win7

Re: Delete Snapshot

Post by tadywankenobi »

Perryg wrote:In the VirtualBox main manager if you click on the snapshot tab for the guest, what shows in that window?
My account is too young to post a link or screenshot. Have one ready, will ping it on this evening or tomorrow morning.

T
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: Delete Snapshot

Post by mpack »

tadywankenobi wrote:how do I resolve the issue with it so that I can expand and resize the hd?
I have no idea how you can resolve the problem once you've already resized the base VDI (unless you happen to have a backup of it). I hated that VirtualBox introduced an in-place resize, and this is a good example of why I think its a bad idea.

Instead of deleting the snapshot, what you could try instead is cloning it. By that I mean clone the snapshot VDI (from the snapshots folder), not the base VDI. The clone will be a merger of data from the entire snapshot chain. If you clone it with CloneVDI then you can do the disk enlargement in the same step (I'm not sure if you'll need to, i.e. I'm not sure how well CloneVDI will like the fact that the base VDI assumes a different drive geometry than the snapshot).
tadywankenobi
Posts: 4
Joined: 5. Jan 2012, 00:50
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win7

Re: Delete Snapshot

Post by tadywankenobi »

OK. Not entirely too sure how to do all that, but I'll take a look at it again this evening. A few things I read online tempt me to try and do a clone and reinstall, and your points here make sense.

Cheers,

T
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: Delete Snapshot

Post by mpack »

tadywankenobi wrote:OK. Not entirely too sure how to do all that
CloneVDI is a freeware tool available for download here - see the sticky in the "Windows Hosts" forum. I'm sure that once you run it you'll find it simple enough. Just bear in mind that it's principally a cloning tool (even tho VBox v4.1 makes that function largely unnecessary now), with the ability to apply various operations to the clone, such as enlargement or compaction. It's a Win32 app, so to run it on a Mac host you'll need the Wine/WineBottler libs for OS X.

If you don't want to use CloneVDI then you can use "VBoxManage clonehd" (which does cloning only, not the other functions).

There's also the "Copy" feature in VBox v4.1's Media Manager. I have not tried to use this to clone a snapshot (mainly because I don't use snapshots), but I can't think of any reason why it wouldn't work as well as VBoxManage.
Post Reply