VMware Horizon Community
paulhackett
Contributor
Contributor

Trouble maintaining snapshots from Vcenter when Horizon pool is attached

Hello,

Our environment:

  • Vcenter 7.0.2 Build 17694817
  • ESXi 7.0.1, 17551050
  • Single ESXi Host
  • Local SSD Storage
  • Horizon is a single server 8.4.0 build - 19067837 Version 2111

We are having trouble maintaining snapshots in our Horizon environment, and VMware support is giving me conflicting information.

I am wondering how others handle this. We want to do the following:
1. Publish an instant clone desktop, but keep the previously published snapshot for a few days to easily rollback if necessary.
2. After a couple of days, we would like to delete the previous snapshot to recover disk space.

We can delete the snapshot's OK through vcenter; however, the redo log (.vmdk file) remains on disk and can't be deleted because the new snapshot is still linked to it.
Support is suggesting that we delete and recreate the desktop pool if we want to recover the disk space.
Does that sound right?
It seems like we have to keep all snapshots forever until the pool is deleted.
Do others experience this same behavior?
How does everyone handle snapshots in their Horizon environment?

Thank you for any assistance you can provide!

0 Kudos
3 Replies
kvmw2130
VMware Employee
VMware Employee

Hello,

This happens when we re-use the same base image for multiple pools

KB: https://kb.vmware.com/s/article/79869

If you have more than one datastore, you can probably start svmotion of parent VM and it will give you an option for consolidation of the snapshot disks left behind. Then you can move the parent vm back to original datastore

0 Kudos
paulhackett
Contributor
Contributor

@kvmw2130 Thank you for the reply.

We do NOT use the same snapshot for multiple pools.  We have 1 snapshot for each pool.

If you create multiple snapshots while using 1 pool and delete them through vcenter are they removed from the datastore as well?

0 Kudos
TechMassey
Hot Shot
Hot Shot

"It seems like we have to keep all snapshots forever until the pool is deleted."

Worry not, that would make for a tricky situation at scale if Horizon worked that way. 

Given the details and your environment not being a typical Horizon Deployment. I can see why it was challenging for VMware Support but I can clear this up for you. 

Your facing three challenges

1. How Horizon interacts with snapshots

An Instant Clone pool only uses one snapshot at a time except for an advanced feature recently released. Horizon will only assign one snapshot on a Gold Image at any time. You are free to add multiple, iterative snapshots, and keep them historically for fallback purposes. You can even clone off to a new VM and move it to cheaper or redundant storage. 

2. Unable to manage/remove Gold Image snapshots

If you remove a snapshot before publishing a new snapshot to the pool it can cause issues both in Horizon and vSphere. Which may be the source of the errors in the VM logs. Ensure that before removing an 'older snapshot' that a Horizon pool is not assigned to it. 

However, a pool can be assigned a Gold Image with snapshot B and snapshot A can be safely removed. 


3. Fundamentals of Snapshot Architecture in regards to disk usage

You don't specify but I'm guessing you are cycling through snapshots in an effort to keep space usage low. Snapshots track changes that would normally be applied to the virtual disk. 

if you take 5 snapshots and install a new app on each snapshot and it totals 20GB in snapshot usage. How much extra space are those snaps taking compared to just installing the 5 applications to the disk? At a high level, its roughly even with some overhead. 

Here is another one, you create two pools. You have two identical Gold Images, you make 20 changes across 20 snapshots on the 1st Gold Image which adds 20GB of snapshot usage. On the second, you make 20 changes in one snapshot which adds 20GB of snapshot usage. 

In the 1st pool, the Instant Clones were made from a Gold Image with 20 snapshots. How much larger are they than Pool 2 with one snapshot? They are virtually identical, the important item here is the changes you make. If 20GB were made over 20 snapshots or one snapshot, the increase in size will still be roughly the same because only 20GB of tracked changes were included. 

To help in familiarizing yourself with Horizon's use of vSphere snapshots. Follow this workflow and everything should meet your requirements. 

1. Power Down the Gold Image VM before taking any snapshots
2. Take Snapshot A and publish the new Gold Image with Snapshot A. 
3. Without deleting Snapshot A, power on the VM. 
4. Login and place a text file on the desktop of the local admin or a folder in C. 
5. Power Down and take Snapshot B. 
6. Publish Snapshot B to the pool. 

Once this is verified, go back and try publishing again. You will have access to either Snapshot A or B. Horizon will even redeploy the same snapshot from scratch even if it is already assigned to the pool, if you desire. 


Please help out! If you find this post helpful and/or the correct answer. Mark it! It helps recgonize contributions to the VMTN community and well me too 🙂
0 Kudos