In our organization, the storage administrator is completely separate from the VI Administrator. This process requires some coordination with the storage administrator. Here is our process for restoring a VM from our SAN snapshots. A lot of this information was gleamed from Scott Lowe’s posts on FlexClones.

Unfortunately, we do not have SMVI (the jaw dropping video demo is here) at this moment. It appears NetApp has made this process trivial with that application. This is how we’re making it work on a limited budget.

Step 0 - Determine Snapshot to clone from

Working with the VMware admin, determine which Snapshot to clone from based on timestamp and LUN

Step 1 - Create LUN Clone

  • Telnet to the filer

  • Run this command to create LUN clone - lun clone create /vol/volume_name/lun_clone_name -o noreserve -b /vol/volume_name/original_lun_name parent_snapshot_name

  • Verify new LUN is created using FilerView in a browser

Step 2 - Map clone LUN

  • Log into FilerView for the filer

  • In left column click on LUNS, then Manage

  • Click on the name of the new LUN clone

  • Click on Map LUN near the top

  • Click on Add Groups to Map, and add to appropriate group

  • Type a number (we typically use 99) into the box labeled LUN ID and click Apply

Step 3 - Enable Volume Resignature

  • Launch VirtualCenter

  • From VC, select a host

  • Select the configuration tab

  • Select advanced

  • Navigate to LVM

  • Change the value of LVM.EnableResignature to 1 (on, the default value is 0)

Step 4 - Rescan for the new LUN

  • From the Configuration tab on a selected host, Navigate to Storage Adapters

  • Select “Rescan”

  • The recovered VMFS datastore will appear with a name similar to “snap_*”

  • From here, there are two options:

    • Add the virtual machine to inventory and run from the recovered LUN

    • Copy the virtual machine’s folder to another LUN, then add to inventory

  • It is recommended that you copy the virtual machine’s folder to another LUN (non snap_*), and then add the recovered virtual machine to inventory.

Step 5 - Clean up

  • Disable LVM.EnableResignature – repeat step 1 of this document, but change the value back to 0.

  • Ensure all VMs running on the recovery LUN are powered off

  • From VC, select a host

  • Select the configuration tab

  • Select Storage

  • Select the recovery LUN and click Remove

  • Delete the LUN clone after VMware admin has finished removing

The Virtual Machine will be brought up as if it went down from a “dirty” shutdown. In a lot of cases, this is okay. For write intensive applications (like databases) you may have to go a few steps farther in restoring functionality.