If you're using NFS, the easiest, but longest, way is to SSH to a vSphere host, cd into the datastore's .snapshot directory ("cd /vmfs/volumes/datastore_name/.snapshot/snapshot_name") and do a simple copy back into the volume...for example:
cp -f -R /vmfs/volumes/myFavoriteDatastore/.snapshot/weekly.0/MyvCenterVM/* /vmfs/volumes/myFavoriteDatastore/MyvCenterVM/
Using the NetApp PowerShell Toolkit or the CLI you can create single file FlexClones pretty easily with NFS datastores. You'll need to make sure there is a folder to restore the files into on the volume, then it's just creating FlexClones of the VMX and VMDKs from the snapshot...
$svmName = "mySVM"
$volumeName = "myFavoriteDatastore"
$sourceSnap = "weekly.0"
$files = @("vc.vmx", "vc.vmdk", "vc.vmdk-flat")
$sourceFolder = "/vc1/"
$destinationFolder = "/vc1_restored/"
$files | %{
$sourcePath = "$($sourceFolder)$($_)"
$destinationPath = "$($destinationFolder)$($_)"
New-NcClone -Volume $volumeName -SourcePath $sourcePath -DestinationPath $destinationPath -SpaceReserved:$false -Snapshot $sourceSnap -VserverContext $svmName
}
After that you would simply need to browse the datastore and add the VM to inventory.
You can do the same from the clustershell:
volume file clone create -vserver xxx -volume yyy -snapshot-name zzz -source-path /vm_name/vm_name.vmdk -destination-path /existing_folder/vm_name.vmdk
This is dramatically more difficult with block based storage since you have to do sub-LUN cloning and need to know the block ranges associated with the files. This isn't something I'm familiar with doing, so it would be significantly easier to just create a volume FlexClone, mount it as a new datastore (remember to account for LUN resignature), and then add the VM to inventory and SvMotion it to a new datastore if desired.
Hope that helps.
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.