Pages: [1]
Print
Author Topic: Recovering from failed svmotion  (Read 367 times)
esarakaitis
Administrator
Full Member
*****
Posts: 218


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« on: September 24, 2009, 07:15:00 AM »

Step by step:

    * You have a VM with two disks on LUN1 and LUN2 that you want to migrate to LUN3 and LUN4
    * Storage vmotion fails midway for reason X
    * We have a running VM with .vmx and swap on LUN3 and vmdk and dmotion delta files on LUN1 and LUN2. VM is running on the delta files.
    * Log in to the Service Cosnole of the ESX server that has the VM to create a snapshot on VM (its not available via Virtual Center GUI in this state), make sure there is room on LUN3 that holds vmx files.
    * Find the UUID path to your VM with:
Code:
vmware-cmd -l | grep MYSERVER
   * Create a snapshot (of all disks) with:  
Code:
vmware-cmd /vmfs/volumes/datastore/MYSERVER/MYSERVER.vmx createsnapshot snapname snapdescrition 1 1
   * You get files like this on LUN3:

    DMotion-scsi0:00_MYSERVER-000001.vmdk
    DMotion-scsi0:00_MYSERVER-000001-delta.vmdk
    DMotion-scsi0:01_MYSERVER-000001.vmdk
    DMotion-scsi0:01_MYSERVER-000001-delta.vmdk

    * Remove (Commit) the snapshots:
Code:
vmware-cmd /vmfs/volumes/datastore/MYSERVER/MYSERVER.vmx removesnapshots
   * The above commit all delta files, including dmotion files.
    * We have a server running on the original disks with all data intact.
    * Virtual Center still thinks its in dmotion state so you can’t edit settings, perform vmotion or anything via Virtual Center. To fix we need to clear the DMotionParent parameters in the .vmx file with the following command from ESX:

Code:
   vmware-cmd /vmfs/volumes/datastore/MYSERVER/MYSERVER.vmx setconfig scsi0:0.DMotionParent “”

    vmware-cmd /vmfs/volumes/datastore/MYSERVER/MYSERVER.vmx setconfig scsi0:1.DMotionParent “”

    * If we do not do this the only option after VM shut down will be “Complete Migration” in Virtual Center. If you select this option it will try to rerun storage vmotion again (offline) but it will use same destination as the source disks. Not good if we don’t have space on those LUNs.
Logged
Pages: [1]
Print
Jump to: