Subscribe
Accepted Solution

OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

Thank you!

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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)?

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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

Re: OCUM 6 - Question about backing up VM without VM snapshots

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