Let continue from where we left in previous parts
Part 1 – talked about converting sysprep image and create new virtual hard disk
Part 2 – talked about creating VM configuration by using hard disk from Part 1 and configure VM settings.
In our next part, we will discuss about creating high availability virtual machine whereby the created VM has located in Cluster Shared Volume (CSV). Here is the example to guide you in this article
Example:-
VM Name | Priority | Preferred Owner |
Donut | High | Server1 |
Eclair | Low | Server1 |
Froyo | Medium | Server2 |
Gingerbread | Low | Server2 |
HoneyComb | Low | Server2 |
IceCream | Low | Server1 |
Let look into how we should configure using Powershell
1. Add VM as High Availability Virtual Machine
Cmdlet:- Add-ClusterVirtualMachineRole
Add-ClusterVirtualMachineRole -VirtualMachine Donut |
2. Configure Preferred Owner
Cmdlet :- Set-ClusterOwnerNode
Set-ClusterOwnerNode -Group Donut -Owner Server1 |
3. Configure Priority
Cmdlet:- Get-ClusterGroup.Priority
Value for :-
High – 3000
Medium –2000
Low - 1000
(Get-ClusterGroup Donut).Priority=3000 |
4. Automatic Fallback
Cmdlet:- GetpClusterGroup.AutoFailbackType
Set value to 1 will configure as “Immediately” fallback
(Get-ClusterGroup Donut).AutoFailbackType=1 |
In this Part 3, you have learned to add HA Virtual Machine to the cluster, set Preferred Owner, Priority and FallBack.
Now that is the end of this part on how to create virtual machine using Powershell. Hope you have learned a lot.
Relevant Post