none
VM Snapshots with Orchestrator RRS feed

  • Question

  • Hello,

    I am currently testing out taking snapshots on VMware with Orchestrator.  I am using PowerCLI as a runbook activity.  I was wondering what is the best practice for taking snapshots through Orchestrator in terms on space usage.  Say if we take snapshots of 100 servers during a maintenance window there could be a chance of the LUN filling up.  Just wanted to see if I should do the snapshots with Orchestrator or go a different route. 

    Apologies in advance if it does not fit in the technet category.

    Thank you.


    Ishan

    Thursday, September 19, 2019 3:41 PM

Answers

  • I fully understand your scenario.

    In this case it shouldn't be any problem to achieve this with Orchestrator, at least not by using PowerCLI.
    I would however still implement some kind of safety, by making sure that you don't fill the datastore / LUN, with something simple such as:

    Get-Cluster "vCenterCL" | Get-Datastore

    Then make a logic to continue creating snapshops if there's XX % of disk space available left, or cancel the snapshot operation if the available free disk space is less than XX %.

    The update process can also be automated, but this is a different topic.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Andreas BaumgartenMVP Friday, September 20, 2019 8:28 PM
    • Marked as answer by ipatel18 Saturday, September 21, 2019 2:23 AM
    Friday, September 20, 2019 5:32 PM

All replies

  • Hello Ishan,

    I think this an interesting subject, although I haven't tested performing snapshots on VMware because I currently don't have a VMware test environment for now unfortunately.

    I'm not really sure if there is a "best practice" for taking snapshots, everyone have different views and opinions about virtual machine snapshots.

    May I ask what is it you're trying to achieve by "automating snapshot creations"?

    Are we talking developer machines that will require snapshots every now and then?

    In general, snapshots should not linger for long, if you ask me then about max a week (depends on the workloads and what it is used for though, as they will start causing more harm than good.

    As for automating this, I would be very careful, as you said the LUN (Logical Unit Number) has a chance of getting full, but there may be other things too.

    If automating the snapshot creation is a must, then you should consider having some kind of checks of the LUN or datastore before creating the snapshots, to make sure they don't get filled up.

    As an example would be something like this:

    Runbook

    [Get Datastore space] --> [If enough space we continue] --> [Create Snapshot of VM] --> [Send status email]
                                     --> [If not enough space we cancel] --> [Send status email]

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Thursday, September 19, 2019 4:16 PM
  • Thanks Leon.

    What I am trying to achieve here is in the near future we will have auto bi weekly patching of servers(VMs and physical). For VMs I would like to take a snapshot before the Windows update run on it automatically.  The snapshot will be used to revert back in case the updates break the OS or the System Analysts find issues running their applications.  We do have a backup solution in place but wanted to utilize VM snapshots for the most recent snapshot.  We don't plan to keep the snapshot for more than 1 week.  These will be developer, test, and prod servers in the auto windows update once in two weeks.


    Ishan

    Thursday, September 19, 2019 4:26 PM
  • I fully understand your scenario.

    In this case it shouldn't be any problem to achieve this with Orchestrator, at least not by using PowerCLI.
    I would however still implement some kind of safety, by making sure that you don't fill the datastore / LUN, with something simple such as:

    Get-Cluster "vCenterCL" | Get-Datastore

    Then make a logic to continue creating snapshops if there's XX % of disk space available left, or cancel the snapshot operation if the available free disk space is less than XX %.

    The update process can also be automated, but this is a different topic.


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Andreas BaumgartenMVP Friday, September 20, 2019 8:28 PM
    • Marked as answer by ipatel18 Saturday, September 21, 2019 2:23 AM
    Friday, September 20, 2019 5:32 PM
  • Thanks Leon.  I like the suggestions.  I will keep them in mind when I am designing the runbook for it.  I know a little off topic here, for automated updates I am planning on using PSWindowsUpdates from PS gallery.  I'd be happy to create a new discussion thread if you have some advice on that as well.

    Thanks.


    Ishan

    Saturday, September 21, 2019 2:30 AM
  • Glad to hear that, I've done many automations by updating Windows Servers & clusters with the help of Orchestrator, but there are many things to think about there ;-)

    Blog: https://thesystemcenterblog.com LinkedIn:

    Saturday, September 21, 2019 9:05 AM