VMware vSphere

 View Only
  • 1.  Prevent a VM from migration

    Posted Jan 27, 2011 10:38 AM

    Hi!

    Is it possible to prevent a VM from being migrated to an other host in the cluster if the VM has an active snapshot?

    The background:

    Our backupsoftware (CommVault) creates an snapshot of an VM and than the VM will be backed up. If the VM is being migrated while it will be backed up the backup fails because the software can not find the VM anymore on the source host.



  • 2.  RE: Prevent a VM from migration
    Best Answer

    Posted Jan 27, 2011 12:22 PM

    Hi Atzi,

    You can try running a script just before the backup that would modify the DRS virtual machine automation level and set it to Disabled. DRS won't be allowed to move it to another host then. Run your backup and at the end, change the DRS rule back to its original value.

    Good luck.

    Regards

    Franck



  • 3.  RE: Prevent a VM from migration

    Posted Jan 31, 2011 09:06 AM

    Thank you FranckRookie for the hint.

    I wrote a PowerCLI script that set the DRS Automation Level to manual before the VM backup starts and a second one that sets it back to fully automated after the backup has finished.

    This is a workaround until we redesign our backup.

    @pelanchelian: to disable DRS is not an option because I think that would delete all resource pools, there settings, DRS Rules and all DRS settings :smileywink:



  • 4.  RE: Prevent a VM from migration

    Broadcom Employee
    Posted Jan 31, 2011 10:29 AM

    No he means you can set DRS Disabled on a per VM basis. Just disable it for that specific VM,



  • 5.  RE: Prevent a VM from migration

    Posted Jan 31, 2011 10:47 AM

    I'm sorry. I should just reed before I think :smileyhappy:.

    But this is also not possible because all VM's (about 110) should be backed up. Some VM's every day, some every week and the rest every month. The backup software backs up one VM after another. So it is not possible to do this manually. I think the workaround with the pre and post backup script is a good one ant it will do the job until we will redesign our backup strategy.



  • 6.  RE: Prevent a VM from migration

    Posted Jan 28, 2011 07:04 AM

    Goto the DRS settings of the cluster and select 'Disabled' only of the VM that should be backed up.

    Perform the backup.

    Then, change DRS settings as 'Enabled' to the VM again.