lock VM during migration ?

balu T 41 Reputation points
2020-08-14T11:14:45.347+00:00

Hi,

Is there a way to lock the virtual machine so that it does not get migrated during the backup. Any WMI or VHD call ?

Appreciate your help.

-Balu

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,613 questions
Windows Server Backup
Windows Server Backup
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Backup: A duplicate copy of a program, a disk, or data, made either for archiving purposes or for safeguarding valuable files from loss should the active copy be damaged or destroyed.
464 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 33,376 Reputation points Microsoft Vendor
    2020-08-14T19:24:06.847+00:00

    Hi,
    Is your VM clustered? You could not disable migration for a specific VM in a failover cluster, but you could prevent the VM from moving to other nodes by removing them from the preferred owners of the role. Here are the steps:

    1. Open Failover Cluster Manager and select the role in "Roles".
    2. Open the Properties sheet
    3. Deselect other nodes in the Preferred Owners list.

    17718-annotation-2020-08-15-024941.png

    Or you could disable migration on a host by running the powershell cmdlet Disable-VMMigration

    Best Regards,
    Ian

    ----------

    Please remember to "Accept Answer" and upvote if the reply is helpful.


  2. TimCerling(ret) 1,156 Reputation points
    2020-08-15T12:57:55.313+00:00

    Preferred owners does not mean "never go to another node". It means "when moved, look to go to these nodes first, but if they are not available, go to any available node". Disable-VMMigration is to only way to prevent VM migration for the host.

    0 comments No comments

  3. balu T 41 Reputation points
    2020-08-25T07:08:58.697+00:00

    I am looking at the WMI and VHD functions in combination with RCT where we lock the VMs during the backup so that they are not migrated.

    VMware provides such an option to lock these VMs.