Link to home
Start Free TrialLog in
Avatar of Michael Knight
Michael KnightFlag for United States of America

asked on

Virtual Box - Delete all snapshots and use only "Current State"

I have an Ubuntu Server Guest that I staged as a web server and built a PHP app in. I would periodically save the state of the machine as I installed new packages and tweaked the Server config. Likewise as the code tree grew I would take a snapshot of the machine when I was happy.
This is now a production server and I want to free up disk space by deleting all of the snapshots and keep only the Current State, so I can get a backup routine going on the VDI.
I've read way too many conflicting posts to blow 4 months worth of programming and configuration to end up with a fractured disk image.
Looking at the attached image, can someone please verify the correct way to remove the snapshots so that the VM is always running in it's "Current State"?
User generated image
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

you want to revert to the original vm configuration and get rid of all snapshots
.?
so do you want to time travel and go back in time or keep existing state to use in future.

if this is the case just select delete snapshot at the top of the tree, warning this operation could take many hours to merge all snapshots into the main disk as committed before they are removed from the main disk.
Avatar of Michael Knight

ASKER

I want the existing state to be the only state. As though it were a real machine.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, just to verify, on my setup I would be right clicking "Fresh Server" and deleting snapshot I should be fine. Do I need to stop the VM first?
Sorry dude I'm paranoid.
If you dont neec the server on, power off it could be quicket.
WHile in theory that is correct, I have had some issues with this.

for safety, i would consider doing a backup of the VM via one of the free tools so that you have a preserved state in a standard format.

Ghost, StorageCraft and others have tools ( free and pay ) for doing this, or use any backup software.

thank you SySExpert, I exported the appliance before performing the deletion.
On an interesting note, deleting the root snapshot does not in fact 'collapse' the tree, so it was a matter of actually deleting the first root, then waiting , then deleting the next (new) root, then the next and so on. Thankfully, the VM is running only in the current state now and there were no ill side effects to the operation.
My server is now running in the clean current state. Thanks guys.

-mk