Hi everybody,
based on blogposts by John Savill and Ben Armstrong I developed two small scripts to configure Livemigration on Hyper-V Hosts and Cluster to save some time for configuration. I will no provide my whole script but I think the two snipes will help you too 🙂
First one you run on all Hyper-V Hosts.
1 2 3 4 5 6 7 8 9 10 |
$LMNet = "10.11.45.0" #Your Livemigration Network $authentic = "Kerberos" #Kerberos or CredSSP $LMMCount = "4" #Maximum Number of Livemigrations $LMSMCount = "4" #Maximum Number of Storagemigrations Enable-VMMigration Set-VMMigrationNetwork $LMNet Set-VMHost -VirtualMachineMigrationAuthenticationType $authentic Set-VMHost -MaximumVirtualMachineMigrations $LMMCount Set-VMHost -MaximumStorageMigrations $LMSMCount |
The next one you run on the cluster its self. You only need to run one, depending on what suits you best.
1 2 |
$LMNNName = "Livemigration" #Your Livemigration Network name in Failover Cluster Manager Get-ClusterResourceType -Name "Virtual Machine" | Set-ClusterParameter -Name MigrationExcludeNetworks -Value ([String]::Join(";",(Get-ClusterNetwork | Where-Object {$_.Name -ne $LNNName}).ID)) |
1 2 |
$LMNet = "10.11.45.0" #Your Livemigration Network Get-ClusterResourceType -Name "Virtual Machine" | Set-ClusterParameter -Name MigrationExcludeNetworks -Value ([String]::Join(";",(Get-ClusterNetwork | Where-Object {$_.Address -ne $LMNet}).ID)) |