Windows Azure Platform Family of articles Catalog
Please note:
-Azure does not support adding endpoint Range
-Maximum number of endpoint can be increased by 150
http://azure.microsoft.com/zh-cn/documentation/articles/azure-subscription-service-limits/
In the previous chapter, we described how to use Azure PowerShell to set the endpoint for a single VM.
Here we further explain how to use the CSV file to batch set VM Endpoint.
This is divided into two parts:
1. Setting the endpoint of a single virtual machine
2. Set up load balancing for multiple virtual machines endpoint
1. Setting the endpoint of a single virtual machine
Assuming that we have only one virtual machine and need to set up multiple endpoint, it can be cumbersome to use the PowerShell command for one line of input.
We can set a default value by setting a CSV file that will require an open port. Then use Azure PowerShell commands for dynamic configuration.
(1) First, we create a new virtual machine
-ServiceName to Leiazure
-VM name is LeiAzureVM001
-We need to set the LocalPort to 1596,1597 and 1598.
(2) Then, we need to prepare a CSV file template, which can be downloaded here :
, the Servicename,vmname,protocol,localport equivalents are defined.
We save the CSV file in the local computer's D-Packing directory.
(3) Run Azure PowerShell as an administrator
First select the current subscription name, the command is:
Select-azuresubscription-subscriptionname <SubscriptionName>-current
Perform:
(4) Implementing PowerShell to import CSV
' <CSVFilePath> ' foreach {Get-azurevm-servicename $_. Servicename-name $_. VMname
<CSVFilePath> is the path to the local CSV file. Perform:
(5) Return to Azure Management Portal to view the results of the execution:
2. Set up load balancing for multiple virtual machines endpoint
(1) Suppose we have created 2 azure Virtual machines
-ServiceName to Leiazure
-Create 2 VM,VM name for LeiAzureVM001 and LeiAzureVM002
-We need to set the localport of the load balance to 1596,1597 and 1598.
-We also need to create a new load-balanced set name
(2) Then we need to prepare a CSV file template that can be downloaded here . Content
(3) Run Azure PowerShell as an administrator. Select the current subscription name and process slightly.
(4) Perform a PowerShell import into CSV.
' <CSVFilePath> ' foreach {Get-azurevm-servicename $_. Servicename-name $_. VMname
Execution results, such as:
(5) Return to Azure Management Portal to view the results of the execution:
Azure PowerShell (7) Batch setup of virtual machine Endpoint using CSV file