2015 peter van der weerd
Restoring a vm from a Netapp Snapmirror (DP/XDP) destination.
1. List the available snapshots on mirrordestination.
cl1::> cl1::> snap show -vserver nfs1 -volume linvolmir
---Blocks---
Vserver Volume Snapshot State Size Total% Used%
-------- ------- ------------------------------- -------- -------- ------ -----
nfs1 linvolmir
snapmirror.b640aac9-d77a-11e3-9cae-123478563412_2147484711.2015-10-13_075517 valid 2.26MB 0% 0%
VeeamSourceSnapshot_linuxvm.2015-10-13_1330 valid 0B 0% 0%
2 entries were displayed.
2. Create a flexclone.
cl1::> vol clone create -vserver nfs1 -flexclone clonedmir -junction-path /clonedmir -parent-volume linvol -parent-snapshot VeeamSourceSnapshot_linuxvm.2015-10-13_1330
(volume clone create)
[Job 392] Job succeeded: Successful
3. Connect the correct export-policy to the new volume.
cl1::> vol modify -vserver nfs1 -volume linvol -policy data
The rest is done on the ESXi server.
4. Mount the datastore to ESXi.
~ # esxcfg-nas -a clonedmir -o 192.168.4.103 -s /clonedmir
Connecting to NAS volume: clonedmir
clonedmir created and connected.
5. Register the VM and note the ID of the VM.
~ # vim-cmd solo/registervm /vmfs/volumes/clonedmir/linux/linux.vmx
174
6. Power on the VM.
~ # vim-cmd vmsvc/power.on 174
Powering on VM:
7. Your prompt will not return until you answer the question about moving or copying.
Open a new session to ESXi, and list the question.
~ # vim-cmd vmsvc/message 174
Virtual machine message _vmx1:
msg.uuid.altered:This virtual machine might have been moved or copied.
In order to configure certain management and networking features, VMware ESX needs to know if this virtual machine was moved or copied.
If you don't know, answer "I copied it".
0. Cancel (Cancel)
1. I moved it (I moved it)
2. I copied it (I copied it) [default]
Answer the question.
The VMID is "174", the MessageID is "_vmx1" and the answer to the question is "1"
~ # vim-cmd vmsvc/message 174 _vmx1 1
Now the VM is started fully.
Just the commands
cl1::> cl1::> snap show -vserver nfs1 -volume linvolmir
cl1::> vol clone create -vserver nfs1 -flexclone clonedmir -junction-path /clonedmir -parent-volume linvol -parent-snapshot VeeamSourceSnapshot_linuxvm.2015-10-13_1330
cl1::> vol modify -vserver nfs1 -volume linvol -policy data
~ # esxcfg-nas -a clonedmir -o 192.168.4.103 -s /clonedmir
~ # vim-cmd solo/registervm /vmfs/volumes/clonedmir/linux/linux.vmx
~ # vim-cmd vmsvc/power.on 174
~ # vim-cmd vmsvc/message 174
~ # vim-cmd vmsvc/message 174 _vmx1 1