Previous Topic: dpmhv-setSysprepProperties (Cmdlet) Command--Create a Virtual DiskNext Topic: dpmhv-setVMDisk (Funclet) Command--Create a Drive or Disk on a Drive Controller


dpmhv-setVMClustered (Cmdlet) Command--Set a VM in a Cluster

The dpmhv-setVMClustered command lets you add or remove a VM from the shared cluster resources. In Hyper-V server environment, the VMs in a cluster can either be a shared cluster resource or private resource of the Hyper-V server. If the VM is a cluster shared resource, you cannot enable it for Quick or Live Migration between cluster nodes. Also, you cannot migrate the VM resources located on private storage such as virtual disk on a local hard drive, instead of cluster shared storage.

This command has the following format:

dpmhv-setVMClustered 
-host hostname 
-vm vmname|-vmid vmguid 
-clustered {on,off}[-retval] 
[-silent]
-host hostname

Specifies the name of the Hyper-V server host.

-vm vmname

Specifies the name of the VM.

-vmid vmguid

Specifies the unique ID of the VM.

-clustered {on, off}

Specifies the sharing mode of the cluster.

on

VM is a shared cluster resource.

off

VM is a private resource of the Hyper-V server.

-retval

Returns a value for further processing.

-silent

Specifies not to direct the output to the screen.

Example: Set a VM in a Cluster

This example adds a VM to the shared cluster resources.

dpmhv-setVMClustered -host hvserver -vm TestVM -clustered on