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/
With Windows Azure Management Portal, we can open virtual machine's endpoint and borrow pictures from my previous blog post:
But if we need to open a lot of endpoint, it needs to be set manually one by one, very cumbersome.
In fact, we can set up virtual machine endpoint in bulk through Windows Azure Powershell.
Let's say we've created 2 virtual machines, DNS is LeiAzure.cloudapp.net, VMS are LeiAzure001 and LeiAzure002.
Such as:
Suppose I need to set up TCP Endpoint on LeiAzureVM001 this virtual machine
-Endpoint name is TCP80
-Public port is 80
-Public port is 80
1. We run Azure PowerShell as an administrator and enter the following command:
the the
The results of the implementation are as follows:
2. In Azure Management Portal You can view the results of the execution:
The red part is the result of my PowerShell execution in step one.
Think: What should I do if I want to execute endpoint's load Balance on these 2 VMs on LeiAzureVM001 and LeiAzureVM002?
As follows:
1. Because in the above steps, the 80 port is already occupied.
If we need to reset load balancing on port 80, first remove the endpoint Name created above, and for TCP80, execute the following PowerShell command:
2. Execute the following PowerShell script,
-Set the endpoint of the LeiAzureVM001 virtual machine
-Public port is 80
-Private Port is 80
-Endpoint name is VM001_80_LB
-Set the load balance set name at the same time as Lbset
Get-azurevm-servicename"leiazure"-name"LeiAzureVM001"| Add-azureendpoint-name"vm001_80_lb"-protocol"TCP"-publicport the-localport the-lbsetname"Lbset"-probeport the-probeprotocol"http"-probepath'/'| Update-azurevm
Execution results
3. Continue with the following PowerShell
-Set the endpoint of the LeiAzureVM002 virtual machine
-Public port is 80
-Private Port is 80
-Endpoint name is VM002_80_LB
-Set the load balance set name at the same time as Lbset
Get-azurevm-servicename"leiazure"-name"LeiAzureVM002"| Add-azureendpoint-name"vm002_80_lb"-protocol"TCP"-publicport the-localport the-lbsetname"Lbset"-probeport the-probeprotocol"http"-probepath'/'| Update-azurevm
Execution Result:
Bo-Three Stone Blog (hereinafter referred to as Benbow), at the end of this blog article at the bottom of the right is not noted reproduced, source, provenance of the works (content) are the original, the site for the original content of the copyright reserved, do not arbitrarily reproduced, if the need for a friend can send mail contact me; reproduced original works (content ) must also follow the Creative Commons agreement "attribution-non-commercial use-consistent", be sure to indicate or retain the original source of the article and the information of the blogger (Lei Zhang) in the form of a text link, and be sure to keep in mind that the photograph works on this blog (www.cnblog.com/ Threestone) and other relevant watermark copyright information, otherwise deemed to infringe the original Copyright Act; Benbow declined commercial website reprint. All rights reserved, prohibit illegal and malicious plagiarism which violates the copyright protection Law of the People's Republic of China and related laws and Benbow (legal) statement.
Azure PowerShell (6) Setting up virtual machine Endpoint