Start a Conversation

Unsolved

This post is more than 5 years old

2118

April 26th, 2011 23:00

Powershell scripts for VMware NFS storage array offloads for file based snaps and fast clones

Within the Unified platform and starting with version 5.6.48.701, EMC has supported offload features via NFS for certain things such as FastClones, FullClones, Compress, Decompress, and other things (see VSI Unified Storage Plugin for VMware).  One of the requests that I have heard from customers is the ability to programatically access this functionality instead of from a GUI.

The scripts attached are just that!  The zip files include dotNet assemblies (some open source, some EMC, one VMware) that enable the Unified plugin to work and also are leveraged in our Powershell scripts for similar interfacing to the NFS datamover.  By utilizing this interface (DHSM) in our scripts we are now able to create FastClones via command line.  See screenshots below and scripts.  Refer to FastClone documentation with the Unified plugin for more details as we are leveraging the exact same technology under the covers as the Unified plugin as well as DHSM configuration info.

The technology behind the FastClones are file based snapshots (versioning) within the NFS datamover.  We are getting to this functioality via DHSM API calls to the datamover.  However, a new twist on leveraging the FastCloning methods is to use them for protection of a virtual machine.  This was traditionally done via snapshots to whole datastores and really brought out scaling challenges in this method for any vendor.  The versioning capability in EMC Unified arrays allows EMC customers to take snapshots at the file level thus creating file level snapshots of VMDK files that are immediately available for use (FastClone), or saved for future use (traditional snapshot but at file level).

One more script that is included is a reporting script where we can report on the usage per snapshot.  Lot's of promising things for this in the future!

The scripts are pretty basic at the moment and are v1.0.  They are all going to be improved and cleaned up, the cleanest example at the moment is the FastClone script.  Lot's of good things in store all.  Feel free to reach out with questions!

Install and use

Install the EMC VSI plugin framework, and the Unified Storage snapin

Install PowerCLI

Configure per the documentation and online demos and ensure FastClones work via the GUI/VMware vCenter Plugin

Once it works, then give it a shot with the scripts

*The current version requires that you login to vCenter first via PowerCLI*

File Based Snap Process (vm_dhsm_snap.ps1)

Discover which NFS datastore VM lives on

Mount NFS datastore via Powershell

VM snapshot (quiesce)

FastClone to /snapshots directory

Remove oldest fastclones based on X number existing at one time (count)

Un-VM snapshot

FastClone Process (vm_dhsm_fastclone.ps1)

Discover which NFS datastore VM lives on

Mount NFS datastore via Powershell

Ensure VM not powered on and that there is no VMware snapshot

FastClone to /fastclones directory

Register new VM

More to come on this post, but for now here are the scripts and the screenshots of them in action.  Very exciting stuff!

Limitations/Requirements

These scripts are examples, and lab use only =)

Scripts expect one vmdk per vm (can be more, but are currently hard coded for first disk)

64,000 possible versions/snapshots of one file

Currently cannot version a versioned file (no snapshotting a snap, or an existing fastclone)

DART 5.6.48.701

Powershell v2

PowerCLI 4.1.1

Possible use cases

Orchestrated use of versioned files for VMs

Quickly spin up VMs to get them online, then SVmotion them (another NFS datatore, tier 1 datastore) to hydrate them to full copies

Protect virtual machines at the VM level via array based mechanisms in a scalable manner

NOTE: These scripts are meant to serve as an example of the capabilities around DHSM.  They are provided as is and are expected for lab use only.

MD5: F363735197EAC21637B083A17271FFE6

4 Attachments

No Responses!
No Events found!

Top