Can't delete top snapshot or expand HD size in VB 4.0.12

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
SemiTech
Posts: 3
Joined: 10. Sep 2011, 06:08
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Windows 7 x86

Can't delete top snapshot or expand HD size in VB 4.0.12

Post by SemiTech »

I had two snapshots of my Windows 7x86 guest. I succesfully deleted one snapshot from the VB GUI VBoxManager (VM not running). I then tried to delete the one remaining snapshot. The merging seems to start, then fails with the following message:

Failed to delete the snapshot (SnapshotName).

Could not merge the medium (path/VirtualBox/Machines/Windows7x86/Snapshots/{uuid}.vdi
to (path/VirtualBox/HardDisks/Windows7x86.vdi)
<VERR_INVALID_PARAMETER)
VBOX_E_FILE_ERROR (0x80BB0004)


The remaining snapshot icon has an orange square in the lower right corner. (What does that mean?)

I thought that the first snapshot I deleted was the most recent, but now I'm not sure...

The snapshot shows a small allotment to video memory and slightly less RAM (I increased both a bit in the "current state.") Is this difference significant?

This all started because I was trying to expand the size of my Windows Guest from 20 GB to 40 GB. I used VBoxManage modifyhd --resize, seemingly successfully. But when I go inside my Windows guest, it still shows 20 (actually 19)GB. I tried using the Windows DISKPART command line tool:
DISKPART> extend size=40960 //error "There isn't enough room.."
DISKPART> extend filesystem //says it did it, but no changes in Windows "My Computer" for size of C: drive.

So, really two problems.
1.) Can't delete last snapshot
2.) Can't expand or extend the size of the VM hard drive.

I am fairly new to VBox and would be very grateful for any help.

My Host: Mac OS 10.6.8 (Snow Leopard)
My Guest: Windows 7x86 Professional (32 bit)
My VBox: 4.0.12 with extension pack and Guest Additions for 4.0.12
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can't delete top snapshot or expand HD size in VB 4.0.12

Post by Sasquatch »

Issue 2 is related to issue 1. You can expand drives, but it won't work when there are snapshots of it. So you have to remove all the snapshots first. Since you can't do that, you can't increase the size either (well, you can, but it won't be detected).

I haven't used snapshots that extensive to know what is going on here, sorry.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
SemiTech
Posts: 3
Joined: 10. Sep 2011, 06:08
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Windows 7 x86

Re: Can't delete top snapshot or expand HD size in VB 4.0.12

Post by SemiTech »

I finally succeeded in deleting the remaining snapshot and in increasing the size of my Windows 7 virtual hard drive. It was a multi-step process.

First, I used the Mac's Time Machine backup system to restore the files in my VirtualBox folder to a time and state before I attempted to increase my virtual hard drive size. This was also the time before I deleted one of two snapshots.

I restored all snapshots, vdi and xml files to that earlier time.

After these files were restored by Time Machine, I used VBox Manager GUI to delete the newest of the snapshots.( Do not delete the snapshot in the Mac Finder!). Then, from the VBox Manager GUI, I restored the Windows VM to the first, oldest, snapshot. Thus, the new "current state" became that of the first snapshot, which is what I wanted. Result: no snapshots, only a "current state."

With only the "current state" showing in the VirtualBox Manager, I now used the command line tool, VBoxManage, with the modifyhd command. See the discussion of VBoxManage commands in Chapter 8 of the VirtualBox PDF manual.

VBoxManage modifyhd <path to vdi> --resize 40960.

VBoxManage reported success, but the disk size didn't change in Windows itself (as reported in the Computer window).

This is where I had to use the built-in Windows utility called DISKPART. In the Windows search box type "run" to get a command line window, then type DISKPART. Use the DISKPART utility to extend (expand) the volume or partition with focus, and its file system, into the free (unallocated) space on a disk.

Type DISKPART "help extend" for a manual-like help file on using the DISKPART tool. At the end of the help you will see example code for extending (expanding) your disk space.

Example:
EXTEND SIZE=40960 DISK=0
EXTEND FILESYSTEM

You must have previously selected (DISKPART>select volume or disk) a volume or partition for this to work. Use DISKPART>list disk and DISKPART>list disk to see your disks and volumes.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can't delete top snapshot or expand HD size in VB 4.0.12

Post by Sasquatch »

You could also have used the Disk Management tool under Administrative Tools (or right click My Computer, then select Manage). Then you have a GUI to do all the work for you. The diskpart command line utility can be very dangerous.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply