Host OS running out of drive space - VM is using a snapshot

Discussions related to using VirtualBox on Windows hosts.
Post Reply
aspAddict
Posts: 2
Joined: 24. Feb 2013, 07:50

Host OS running out of drive space - VM is using a snapshot

Post by aspAddict »

Okay, here's my setup:
Host OS: Windows XP Pro, ~150GB HDD.
Virtual OS: Windows 2003 Server, initial HDD size 100 GB (Dynamically allocated)
Snapshot VDI size: 40 GB
Oracle VM Version: 4.2.6 r82870

My initial setup worked fine - the OS installed, booted, and was running great. At some point in December, I decided it would be a GRAND idea to take a snapshot of the system, because - hey...it sounds like the responsible thing to do after some configuration changes, right?

In the last week, my host OS has started barking that it is low on disk space. (Some simple math from the numbers above will tell you why... :? )

When I realized that the snapshot was taking up that much space, my first thought was "Well, I don't necessarily need that, do I?" So I renamed it and tried to boot the server. As you may have already guessed, that didn't work.
Secondly, I tried renaming the original "Webserver.vdi" (thinking that maybe the entire VM was running SOLELY from the snapshot) and - you guessed it - same result. The VM doesn't boot if either of these are missing.

I've managed to uninstall a few programs from my host OS to buy some time (I have about 856 MB free right now...) but I need a more permanent solution. I noticed that from the VirtualBox GUI, I have an option of deleting the snapshot - but since that file shows that it was modified today, I don't feel too comfortable just wiping it out for fear that I will lose any changes made in the last 45 days.

At this point, it looks like the VM is grabbing the initial "Webserver.VDI" file as well as the "impossibly_long_and_complicated_name.vdi" file when it boots.

I've read some docs online about running the "vboxmanage" command with a clone option, but since this seems to be running from both VDI's, I'm not sure how that would affect the situation.

I guess my questions at this point are:
A) Can I remove the snapshot from the VirtualBox GUI, free up ~40 GB of space and still have my most recent changes in the main VDI?
B) If not, what other options do I have? How would you proceed in this scenario?
C) How long would VBoxManage take to clone the VDI image to an external hard drive? (I started a robocopy session earlier, but it was going painfully slow...the external drive is about 250GB, with about 216 GB free...)

Thanks in advance for any tips/pointers!
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: Host OS running out of drive space - VM is using a snaps

Post by mpack »

Manipulating snapshots while you are low on disk space is highly likely to run into trouble. So, before you do anything else :-

1. Make sure you have a working VM.
2. Shut down VM (do not just save state), and make a backup of the entire VM folder to secondary storage.

Now you can experiment safely.

A snapshot system is a series of markers on a timeline. Each marker is a point in time that you can revert the image to. If you no longer need the ability to revert to that moment in time then you can delete the marker. Doing so has no effect on the data currently on the guests disk, but does release some host disk space. Just be sure that you delete the marker (the snapshot), and don't choose revert.

Manipulating snapshots requires plenty of working space on the host drive. So it may also be a good idea to free up as much host disk space as possible before doing anything.
aspAddict
Posts: 2
Joined: 24. Feb 2013, 07:50

Re: Host OS running out of drive space - VM is using a snaps

Post by aspAddict »

Okay, so far I've managed to get the VDI and snapshots backed up to external storage. Now, when I launch the VM Manager and go to the Snapshots screen, I see this:

-Snapshot 1 (12/30/2012 10:38:01 PM)
--Current State (changed)

When I click the "Delete snapshot" option, it pops up the usual warning about losing state information and disk data will be merged, etc. Is it safe to proceed at this point?
The reason I ask is because this VM has a database that has had updates over the last couple of months and I don't want to lose them if I don't have to.
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: Host OS running out of drive space - VM is using a snaps

Post by mpack »

You have a complete backup of the VM folder contents of a working VM right? So you should be safe regardless.

Just make sure you are deleting "Snapshot 1" and not the current state. Make sure you have plenty of free disk space on the host, at least equal to the sum of the VDIs, highlight "Snapshot 1" and select "Delete".
Post Reply