VMware Cloud Community
falken76
Contributor
Contributor

Will deleting older snapshots cause issues for a VM in esxi 6.7?

Hello, I'm just learning how to use ESXI, I have the free version and have had it for about a year so far.  I'm just playing with an ubuntu vm and learning how to do things like setup ssl, run a website, run plex, and other hobby stuff.  This has been a learning process, especially the linux side.  I really like how you can snapshot before you do anything that might break so you can revert right back to the working version.  But now I have a ton of snapshots and I imagine they will eventually consume a lot of diskspace.  Here is a screenshot of my snapshots for this vm:

falken76_0-1661011670982.png

 

If I delete previous snapshots to the current version, will it break anything?  These are not dependent upon each other are they?  I want to delete about 20 of them. 

Tags (3)
Reply
0 Kudos
18 Replies
mbufkin
Enthusiast
Enthusiast

Rules for snapshots:

1. Snapshots are not backups.

2. Snapshots are not backups.

Best practices for using VMware snapshots https://kb.vmware.com/s/article/1025279 

You can delete snapshots independently. No more than 32 in a chain and should not be older than 72 hours. Snapshots are not backups.

Hope this helps. 

 

a_p_
Leadership
Leadership

Snapshots in VMware products work as a chain, where each chain link contains modified data blocks. Losing a single chain link will - in most cases - cause data loss. The illustration in https://kb.vmware.com/s/article/1015180?lang=en_us explains this.

When you delete a single snapshot, its data will be merged into its parent snapshot (.vmdk file).

Although the official support statement mentioned a max. of 32 snapshots, I've seen environments with more than 200 snapshots. Not saying that you should try that! Also the age of a snapshot is not that much important, it's basically the size which could exhaust the datastore. With an increasing number of snapshots, you may also experience slower VM performance, due to the distributed data across many snapshot files. However, if it's a test/lab VM, and not a production VM that may not matter much either.

André

Reply
0 Kudos
falken76
Contributor
Contributor

Oh yes I'm quite aware, I learned that the hard way when I ruined a VM because everything got corrupted.  I tried to save a snapshot and for some reason it had issues saving, and everything broke, I couldn't revert either.  That incident sent me on a venture to see how to backup a VM and I was presented with what appears to be nothing but paid options.  Is there a way to back up for free?  I don't suppose I can just go to the NAS where everything is stored and just copy the entire folder of a vm install and that would work like backing up?  Since there were so many options to pay for a service or package to backup a vm, something tells me you can't just copy a folder and consider it a backup.

That incident with the snapshot that ruined an entire VM makes me terrified to take a snapshot on my current VM.

Reply
0 Kudos
mbufkin
Enthusiast
Enthusiast

This might be something to try for your backups.
Veeam Backup & Replication Community Edition https://www.veeam.com/virtual-machine-backup-solution-f...

Hopefully my input is helpful.

Reply
0 Kudos
falken76
Contributor
Contributor


@a_p_ wrote:

Snapshots in VMware products work as a chain, where each chain link contains modified data blocks. Losing a single chain link will - in most cases - cause data loss. The illustration in https://kb.vmware.com/s/article/1015180?lang=en_us explains this.

When you delete a single snapshot, its data will be merged into its parent snapshot (.vmdk file).

Although the official support statement mentioned a max. of 32 snapshots, I've seen environments with more than 200 snapshots. Not saying that you should try that! Also the age of a snapshot is not that much important, it's basically the size which could exhaust the datastore. With an increasing number of snapshots, you may also experience slower VM performance, due to the distributed data across many snapshot files. However, if it's a test/lab VM, and not a production VM that may not matter much either.

André



Man I am glad I came here to ask this question before I just started messing with vmware files. I would have ruined my current vm.  Apparently with all these snapshots, I'm running on a snapshot right now.  It says this:

falken76_0-1661016224657.png

So if I were to erase any of the children to the parent in that huge list on my original screenshot it would most likely break.  It looks like I would need to consolidate them maybe?  My system isn't showing a warning that I need to consolidate.  I have a ton of HD space on the NAS.

I want to be able to back up the VM before I start messing around with changing the snapshots.  Is there a free option to backing up a VM in ESXi?  I don't even have vsphere which seems to be mentioned repeatedly in most of the tutorials I find.  (Can you use Vsphere with the free ESXi?  I was under the impression that it was for the paid version)

Reply
0 Kudos
mjkvm
Contributor
Contributor

Just be aware that deleting old and/or a lot of shapshots can take a long time, especially if the disks are large.

This had me worried the first time I deleted all of the snapshots of a VM with a 1TB disk as it took hours.

Reply
0 Kudos
jbmiller
Contributor
Contributor

And just in case mbufkin wasn’t perfectly clear, snapshots are not a replacement for backups!  😁

mbufkin
Enthusiast
Enthusiast

Have you considered joining the VMware Users Group (VMUG)? If you become a VMUG Advantage member you get a license to try VMware software in a non production environment for 365 days. It’s a yearly membership fee of $200. There’s always a discount code somewhere that gets a 10% discount so it’s $180 yearly. That will allow you to build a vCenter and really get to learning. Me and several of my colleagues do this for our home labs.

VMUG Advantage - https://www.vmug.com/membership/vmug-advantage-membership/ 

Reply
0 Kudos
falken76
Contributor
Contributor

I will definitely consider joining VMUG when I have $200 I can spend on it.  A career in this field would be nice, but honestly it's the 18 year old nerd me from the past that was into the BBS scene way back before the internet was popular that is enjoying this, it's fun in a way that reminds me of those days.  That's worth $200 to me.  Thank you for the link to Veeam, I'm going to use that for sure.

falken76
Contributor
Contributor


@mjkvm wrote:

Just be aware that deleting old and/or a lot of shapshots can take a long time, especially if the disks are large.

This had me worried the first time I deleted all of the snapshots of a VM with a 1TB disk as it took hours.


Did you do anything specific before you deleted the snapshots?  The document on how they work made it look like there could be dependencies on previous snapshots.  If that's the case, I would expect the vm to break or have problems if there were dependencies on any of the child snapshots.  I'm going to backup with Veeam before I delete any of the snapshots.

Reply
0 Kudos
falken76
Contributor
Contributor

I tried to use Veeam but it requires the use of vsphere.  I'm using the free version of ESXi and I found this snippet while researching:

falken76_0-1661026999857.png

 

Apparently Vmware's stance is free users had it too good for too long on backing up a vm lol.  So this won't work.  Is there really no way to back up a vm  unless you pay for it?  And does everything require the use of Vsphere?  It's always referred to and as far as I can tell, it's not compatible with the free version of ESXi because it requires the use of some tools that are disabled in the free version?  Is there a package that is reasonably priced, does not have a recurrent fee and is compatible with the free version of ESXi?  Not being able to back up really sucks.

Furthermore, does the vmware license say "No company shall provide a path to back up a virtual machine on the free version of ESXi"?  The text of the clip seems to suggest so and that was from 13 years ago.  Is it still up to date?

Reply
0 Kudos
mjkvm
Contributor
Contributor

Backup first to be safe, but no, nothing special.

I use NAKIVO Backup & Replication. There is a free Nakivo version and a version that works with the free version of ESXi, but there are some limitations:

NAKIVO Free ESXi Backup Limitations 

Reply
0 Kudos
falken76
Contributor
Contributor

I'm sorry to post so often... I just shut the VM down and looked at the right click menu options in esxi.  Two options exist to export.  One to OVA and one to OVA with images attached as ISO?  Would this function as a backup?  How would that differ from officially using a package like Veeam to back up?  All I want to do is be able to restore a vm if it gets messed up and I know that snapshots are not a good backup option.  I've had a VM fail on snapshot and ruin the entire thing before.

Reply
0 Kudos
mbufkin
Enthusiast
Enthusiast

Reply
0 Kudos
falken76
Contributor
Contributor


@mjkvm wrote:

Backup first to be safe, but no, nothing special.

I use NAKIVO Backup & Replication. There is a free Nakivo version and a version that works with the free version of ESXi, but there are some limitations:

NAKIVO Free ESXi Backup Limitations 


Thank you so much, I'm going to go check out Nakivo right now

Reply
0 Kudos
falken76
Contributor
Contributor


@falken76 wrote:

@mjkvm wrote:

Backup first to be safe, but no, nothing special.

I use NAKIVO Backup & Replication. There is a free Nakivo version and a version that works with the free version of ESXi, but there are some limitations:

NAKIVO Free ESXi Backup Limitations 


Thank you so much, I'm going to go check out Nakivo right now


You wouldn't be able to share the download link would you?  I went to their site and it wouldn't take a gmail account.  It said "use your corporate email".  I don't have one so I tried my cox.net account and it took that and told me to follow the links in the email.  The problem is they never send the email.  I assume it's because cox.net is an ISP that residence use a lot....  Maybe google has a spoof email address you can make that will allow me to use my domain name.

Reply
0 Kudos
mjkvm
Contributor
Contributor

I don't have any download links, all of the updates are done from the Web client.

Have you thought about manually cloning the VM? I found these instructions: How to clone a virtual machine on VMware-ESXi.

Essentially it's just a copy-paste of all *.vmdk and *.vmx files into a new folder on the data store.

Please note that as you have snapshots you also need to copy .vmsd, and .vmsn files as these are part of the snapshot data, see here: Snapshot Files.

If it all goes wrong you can either switch to the clone or just shut down the broken VM and copy the files back.

Reply
0 Kudos
falken76
Contributor
Contributor

Thank you so much for that link. I can not believe that my original solution was just copying the files like that but I thought surely it's more complicated than this if you can't even do a backup on the free version and the external 3rd party tools don't work with backup because the free esxi is missing tools that will allow those programs to work.  Looks like that should work.  Thank you so much.  I'll just make periodic copies of those folders and store them on a separate network storage drive.

Reply
0 Kudos