Monday, October 5, 2015

Configuring an Availibity Set using PowerSell commands

Currently an availability set can be created using Windows PowerShell only during the process of creating a new VM:

New-AzureVMConfig -Name <VMName>
                  -InstanceSize <InstanceSize>
                  -ImageName <ImageName>
                  -AvailibilitySetName <AvailibilitySetName> |
Add-AzureProvisioningConfig  -Windows
                             -Password <Password>
                             -AdminUserName <UserName> |
New-AzureVM -ServiceName <CloudServiceName>

To provision and Start the VM:

Start-AzureVm -ServiceName <CloudServiceName>
              -Name <VmName>

After creating it, the Availability Set can be changed:

  Get-AzureVM -ServiceName "<CloudServiceName>"
              -Name "<VMName>" |
  Set-AzureAvailibilitySet -AvailibilitySetName "<AvailibilitySetName>" |
Update-AzureVM
                            
                              

No comments:

Post a Comment