Active IQ Unified Manager Discussions

OCUM 6 - Question about backing up VM without VM snapshots

jonesj
7,859 Views

Hello,

I have a customer who has read the backup instructions for OCUM 6. They do not use VM snapshots and do not want to for the OCUM 6 server. The question is if the OCUM 6 server needs to be shut down or quiesced somehow before performing a snapshot at the storage level only? My thought is yes, but would like some more feedback.

Thanks,

Jason

1 ACCEPTED SOLUTION

venkat3
7,851 Views

Hi Jason,Jones

Thanks for asking this question.

>The question is if the OCUM 6 server needs to be shut down or quiesced somehow before performing a snapshot at the storage level only? My thought is yes, but would like some more feedback.

Yes you are right, VM should be shutdown cleanly before performing storage level snapshot for application consistent

-srinivas

View solution in original post

17 REPLIES 17

venkat3
7,852 Views

Hi Jason,Jones

Thanks for asking this question.

>The question is if the OCUM 6 server needs to be shut down or quiesced somehow before performing a snapshot at the storage level only? My thought is yes, but would like some more feedback.

Yes you are right, VM should be shutdown cleanly before performing storage level snapshot for application consistent

-srinivas

jonesj
7,788 Views

Thank you!

israelmmi
7,788 Views

Hi,

Is there any way though to remotely shutdown the App, so that we can run a pre-script job to shutdown the server, then snap the LUN the VM is sitting on, and then run a post-script to start the VM?

ESX has powershell and other similar plugins but we didn't find a way to cleanly shutdown the host, for example via SSH?

Thanks,
Reuvy

venkat3
7,788 Views

HI Reuvy,

If i got your question right, you want to perform clean shutdown of ocum vapp , then take snapshot of lun the VM is sitting on and start the VM up again.

you can do this achieve this by writing a power shell script using powershell commandlets of ESX and NetApp DataOntap Powershell tool kit ( http://powershell.netapp.com/ )

ESX commandlets

https://www.vmware.com/support/developer/PowerCLI/PowerCLI55R1/html/Stop-VM.html

https://www.vmware.com/support/developer/PowerCLI/PowerCLI55R1/html/Start-VM.html

from NetApp DataOntap Powershell toolkit you may have to use New-NcSnapshot

NOTE: snapshot is volume level only.

please refer to https://communities.netapp.com/docs/DOC-10684 and the command help below.

PS C:\Users\administrator.SOLRTP.000> get-help New-NcSnapshot

NAME

    New-NcSnapshot

SYNOPSIS

    Create a new snapshot on a specified volume.

SYNTAX

    New-NcSnapshot [-Volume] <String> [[-Snapshot] <String>] [-Async] [-Comment <String>] [-SnapmirrorLabel <String>] [-VserverContext <String>] [-Controller <NcController[]>] [<CommonParameters>]

    New-NcSnapshot [-Volume] <String> [[-Snapshot] <String>] [-Comment <String>] -InfiniteVolume [-VserverContext <String>] [-Controller <NcController[]>] [<CommonParameters>]

DESCRIPTION

    Create a new snapshot on a specified volume.

    When run with the InfiniteVolume switch, the cmdlet runs asynchronously.  A job is returned.  The status of the job can be tracked using the Job cmdlets.

RELATED LINKS

    Get-NcSnapshot

    Remove-NcSnapshot

REMARKS

    To see the examples, type: "get-help New-NcSnapshot -examples".

    For more information, type: "get-help New-NcSnapshot -detailed".

    For technical information, type: "get-help New-NcSnapshot -full".

Hope this helps.

-Srinivas

israelmmi
7,788 Views

Yes, you got my question right, but missed the crux - I know how to script a snapshot, but I assume that in order for it to be consistent I need to first shutdown the VM, no? My question was, assuming the above is required, how can I remotely (via a script) shutdown the OC VM and then take a snapshot (with a followup script)?

goodrum
7,788 Views

So there are a couple of options to backing up the UM 6.0 Virtual Machine.  I will lay them all out here and see if this helps.

  1. Leverage NetApp's Virtual Storage Console (VSC 4.2.1), which integrates fully with VMware's Virtual Center, to create backups of Virtual Machines.  This is honestly the 'best' answer because it is a fully supported product and does exactly what you are looking for.  Because it is a value-add product, it is available for no extra license fee.  VSC can create quiesced Virtual Machine backups by first generating a temporary VMware Snapshot of the Virtual Machine's disks.  After the VM is in a 'hot backup' state, a NetApp snapshot of the Datastore is created.  Once the NetApp snapshot is complete, the temporary Virtual Machine snapshot is removed and the UM 6.0 is back to normal state.  (This option is fully supported by NetApp Support.)


  2. Leverage NetApp's Virtual Storage Console to create No-Vm-Snapshot backups which are considered 'crash consistent'.  VSC backup jobs can run Pre-Backup and Post-Backup scripts.  In these scripts you can use VMware's PowerCLI Toolkit to write a call that will either suspend or shutdown the UM 6.0 virtual machine.  The process flow would be a Pre-Script which suspends the Virtual Machine, then VSC will create a backup of the Datastore, and finally the Post-Script will start the UM 6.0 system once again.  A suspend is typically must faster to restart from but UM 6.0 starts pretty fast so shutting down might not be an issue. (Only the VSC backup of the Datastore is supported by NetApp Support custom scripts are community supported.)


  3. Leverage NetApp's DataOntap Powershell Toolkit and VMware's PowerCLI Toolkit in a fully customized script.  This script can be a combination of VMware Virtual Machine stop, followed by NetApp Snapshot (the cmdlet that Srinivas mentioned), then VMware Virtual Machine start.  The restore process would be a little more difficult since it will be fully manual and backup history would have to be tracked along with retention of snapshots.  This is a very manual process but doable.  (This option is not supported by NetApp Support as custom scripts are community supported.)

Ok, so here are the options and the pros and cons.  I would highly advise the first option as when it comes to backups.... Backups are great, but recovery is critical.  This first option also means that you monitoring is never shutdown.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

israelmmi
7,788 Views

Hi Jeremy,

That hit the spot - thanks! We are pretty much Hyper-V based and just started using VMware for OCUM and OCPM which require it. We have no vCenter and are using the free ESX at the moment, so I understand that option 1 is out the window. Still, my original question stands though. I was really already planning on doing step 3 (or 3), but I didn't know if there was a way for me to cleanly shutdown the VM before running the API backup call, or if a suspend to the VM would be enough (I would think that the prior would be better.

When we tried connecting via SSH to the OCUM we only saw an option for restart but no option for shutdown. Is there a remote way to shut it down?

Reuvy

goodrum
7,788 Views

Honestly, I wouldn't even try to mess with SSH and would just go with the Powershell route (especially since you are a heavy Microsoft shop).  Vmware's PowerCLI has a simple cmdlet to stop and start Virtual Machines

Here is an example of what you could do in a script:

  1. Connect-ViServer
  2. Connect-NcController
  3. Get-VM -Name <UM 6.0 VM Name> | Stop-VM
  4. New-NcSnapshot -Volume <volume containing the datastore>
  5. Get-VM -Name <UM 6.0 VM Name> | Start-VM

These are the rudimentary steps and not a complete script.  It should get you on the right track.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

venkat3
7,788 Views

Hi Reuvy,

>When we tried connecting via SSH to the OCUM we only saw an option for restart but no option for shutdown. Is there a remote way to shut it down?

where did you see this option. (can you please post a screenshot)

I find ESX CLI options can help you shutdown VM and power it up again

You can SSH to ESX and run these to remotely shutdown the VM.

  1. vim-cmd vmsvc/power.shutdown VMID
  2. New-NcSnapshot -Volume <volume containing the datastore>
  3. vim-cmd vmsvc/power.on <vmid>

Reference :

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038043

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014165

hope this helps.

-Srinivas

israelmmi
6,855 Views

I figured the VMware CLI is the same as the powershell or if I would just click on the power button. All of the above aren't application consistent.

venkat3
6,855 Views

Hi Reuvy,

Thanks for the posting the screenshot. I am able to make out Shutdown disabled now.

SSH to OCUM isn't right way.

You should cleanly shutdown the OCUM6.X VM (either via ESX CLI - or powershell)  and then proceed to NetApp snapshot.

You can use any of the three ways as Jeremy mentioned above

-Srinivas

israelmmi
6,855 Views

I know, but Jeremy's way isn't application consistent. Is that ok?

venkat3
6,855 Views

Hi Reuvy,

>I know, but Jeremy's way isn't application consistent. Is that ok?

If i understand application consistent snapshot properly.

After you shutdown the VM,

your vm is fully shutdown all running applications are stop due to shutdown operation

all inflight jobs of database are stopped while clean shutdown is done.

A Snapshot taken in this state is Application consistent.

please do correct me !!

why do you think this isn't application consistent?

-srinivas

goodrum
6,855 Views

Yes, you are correct Srinivas.  Can't get more app consistent than a powered off Virtual Machine

By suspending or shutting down the VM, you are stopping all I/O inside of the Virtual Machine's operating system.  Therefore, no I/O makes the VM consistent.  This is a similar process to using VM snapshots.  When a VM snapshot is created, the Guest I/O is quiesced and a new delta file is created.  This new delta file is used for new writes while the original VMDK is consistent and only used for reads.  Once the VM snapshot is removed, the delta file is merged back into the VMDK so the writes are not lost.

TLDR: shutting down the VM before the NetApp snapshot creates an application consistent backup.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

israelmmi
6,855 Views

Sorry about that - I should've been clearer. Of course shutting the VM is consistent... 🙂

I meant a way to shutdown the VM in a consistent fashion - ie. whether or not I should be concerned about that. Sorry again about the lack of clarity.

goodrum
5,277 Views

No worries.  The PowerCLI cmdlet Stop-VM uses the VMware Tools (already inside of the VM) to issue a Guest OS Shutdown.  It is not a Power-Off in the traditional sense. 

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

venkat3
5,277 Views

no issues. Thanks for asking these questions.

glad we could be of some help.

-srinivas.

Public