vSphere Snapshot - Configuration Overview

Overview

In this article, we will cover how to setup the SovLabs vSphere Snapshot module and cover a couple of possible scenarios you may come across.


Scenario 1

A major change is happening to upgrade an application across multiple servers.  The change is being implemented on a Saturday so they would like to retain the snapshots for at least a week with an email on the following Thursday that the snapshots will be deleted on the Saturday so they have time to confirm if there are any issues and require any roll back.  Snapshots will be taken the morning of the Saturday at the commencement of the change.

  • Configure Notification group with the appropriate person/team email/distribution list
  • Configure snapshots to be deleted on a specific date which would be approximately a week after creation
  • Configure notifications for
    • Snapshot creation
    • Snapshot about to expire within 48 hours
    • Snapshot deletion 

Scenario 2

Teams control when they take snapshots as part of their changes, however, they don't necessarily clean them up.  As part of company policy there is a mandate to delete snapshots that are older than 5 days. This has been a manual process in the past but since the organisation is comfortable with the process this is to be automated.  You want to let the team responsible for the Virtual infrastructure know 2 days prior of the expiring snapshots for tracking purposes.

  • Configure the notification group for the Virtualization team
  • Configure snapshots to be deleted weekly for snapshots older than 5 days
  • Configure notification for
    • Snapshot expiration
    • Snapshot Deletion


Considerations

  • Have licensed SovLabs vSphere Snapshot module
  • Have licensed SovLabs Notifications module
  • Already have the Prerequisites completed for notifications
    • Configured the SMTP server and tested notification functionality
    • Configured a vRA CAFE Endpoint
    • Configured IaaS Endpoint
    • See additional information for links to notification configuration documentation if you have never setup notifications before


Procedure

Notification setup

The following steps will outline creating notification groups ready for use with a notification.

Create a Notification Email Group for either scenario

  1. In your vRA Catalog search for Notification. Click on request on "Manage Notification Email Group Configuration - SovLabs Modules"


  2. In the action field, select Create


  3. In the Configuration Label field, enter a name that relates to the notification group.  This could be generic if this group may get other notifications, or, can be specific for a change, project or even notification


  4. Enter the email address this notification email group will send messages to.  This could be individuals or distribution lists, and click the green plus to add them




  5. Click on Submit


Configure a notification configuration for either scenario

  1. In your vRA Catalog search for Notification. Click on request on "Add Notification Configuration - SovLabs Modules"


  2. Under Type select "SNAPSHOT"


  3. Provide a Configuration label, something that relates to what you are doing ie; If it relates to a change, or a specific team.


  4. Select the notification you wish to receive.  If it was for Scenario 1, you would have all selected, for scenario 2 you would only select Deleted and Warning


  5. Select the Message Type (Email is default) and Format (Text/Plain  or Text/html).  I will leave them as the defaults


  6. Enter the email address that will send the notification


  7. In the Title, you can amend this if you wanted to (This is the message subject), for this setup I will leave the default


  8. The body can be modified, however, I will be leaving this as the default notification


  9. Click on Message Server Configuration


  10. In the Message Server drop down box, select your SMTP server you will use to send notifications


  11. Under Email Group configuration in the Email Group drop down, select the email group you have created earlier


  12. If you have not created the Notification email group, you can place a check in the New Email Group? check box and fill in the information


  13. Click on Submit


Configure a notification group for either scenario

  1. In your vRA Catalog search for Notification and click request on "Add Notification Group - SovLabs Modules"


  2. Provide a meaningful Configuration Label name


  3. In the drop down, select SNAPSHOT


  4. Next to notifications, select the notification you want to associate to this group


  5. Click on Submit




Scenario 1

  1. Follow the previous steps and create the appropriate notification/email groups based on the requirements of Scenario 1
  2. In your Catalog, search for Snapshot and click Request on Add Snapshot Configuration - SovLabs Modules


  3. Under Snapshot Configuration enter a Configuration Label. In the drop down for SovLabs vRA CAFE Endpoint select your existing endpoint, In SovLabs vRA IaaS Endpoint select your existing IaaS Endpoint


  4. In the notification Group drop down, select the appropriate group you want this snapshot configuration to notify


  5. You can OPT to run this snapshot configuration against ALL vRA Business Groups, or, you can filter against a single Business Group.  In this example I will select my own business group.


  6. Set the lifespan of the snapshot.  In this scenario we want to delete this on the Saturday after, So a snapshot of 7 days would cover us as it could get deleted on the 7th day.  


  7. Set the Expiration warning notifications to 2 days as we are setting the snapshot lifespan to 7, this would give us a 2 day grace on the snapshot being deleted. Click the green plus to add this. 


  8. If you happen to have other snapshot configuration set up, you can choose to exclude VM's by name, or, exclude snapshots by name or part there of.  As I do not have any other snapshots configured these are blank for me.


  9. Click on Scheduler at the top


  10. In the Schedule Type, since this is a once off we will select from the drop down "Run Once"


  11. In the run once schedule, drop down and select the appropriate day to run the clean up.  For example, if this change was happening on the 1st June,  You would select 8th June


  12. In the Time drop down, select the time you want this Snapshot Configuration to run.. For example, 3:00 PM


  13. Click on Submit


  14. What we have configured now is the following:
    1. Snapshot deletion to run on the 8th June at 3:00 PM
    2. It will clean up snapshots that are Older than 6 days for a business group
    3. A notification will be triggered upon snapshot creation
    4. A notification will be triggered 2 days before the snapshot will be deleted
    5. A notification will be tiggered on deletion

NOTE:  If you have other snapshot jobs running that clean up earlier than this, you will have to look at the filters for those snapshot jobs to ensure you are filtering out the newly configured snapshot job OR the virtual machines that will be a part of this change. Failure to do so could see your snapshots deleted prematurely. The alternative is to disable the other snapshot configurations for the interim and enable them after this has run.

Scenario 2

  1. Follow the previous steps and create the appropriate notification/email groups based on the requirements of Scenario 1
  2. In your Catalog, search for Snapshot and click Request on Add Snapshot Configuration - SovLabs Modules


  3. Under Snapshot Configuration enter a Configuration Label. In the drop down for SovLabs vRA CAFE Endpoint select your existing endpoint, In SovLabs vRA IaaS Endpoint select your existing IaaS Endpoint


  4. In the notification Group drop down, select the appropriate group you want this snapshot configuration to notify


  5. You can OPT to run this snapshot configuration against ALL vRA Business Groups, or, you can filter against a single Business Group.  In this example I will select all VMs  for all vRA Business Groups


  6. Set the lifespan of the snapshot.  In this scenario we want to delete snapshots older than 5 days


  7. Set the Expiration warning notifications to 2 days, this would give us a 2 day grace on the snapshot being deleted. Click the green plus to add this. 


  8. If you happen to have other snapshot configuration set up, you can choose to exclude VM's by name, or, exclude snapshots by name or part there of.  As I do not have any other snapshots configured these are blank for me.


  9. Click on Scheduler at the top


  10. In the Schedule Type, since this is to be automated and we want to run this weekly, we will select weekly from the drop down box.


  11. Since we have chosen Weekly, we have to select a Day and Time to run this in the format outlined on the screen.  This format for weekly is the first 3 Letters of the day followed by 24hour time format.  In this instance it is Friday at 5:00 PM. Click on the green plus to add this


  12. If you wanted this to be a non permanent deletion job, you would provide a scheduled end date.  Otherwise leaving this blank will make this never expire


  13. Click on Submit


  14. You have now configured a snapshot schedule based on the following
    1. A check run every week on Friday at 5:00 PM
    2. Will delete snapshots that are older than 5 days automatically
    3. Notifications will be triggered 2 days before expiration
    4. Notifications will be triggered on deletion


NOTE:  If you have other snapshot jobs running that clean up earlier than this, you will have to look at the filters for those snapshot jobs to ensure you are filtering out the newly configured snapshot job OR the virtual machines. Failure to do so could see your snapshots deleted prematurely. The alternative is to disable the other snapshot configurations for the interim.


Additional information

Notification Pre requisites and configuration : http://docs.sovlabs.com/latest/vmware-vra7x-plugin/modules/platform-extensions/notifications/

Snapshot Setup: http://docs.sovlabs.com/latest/vmware-vra7x-plugin/modules/vsphere/snapshot/setup/



Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.