Select-AzureSubscription -SubscriptionName “订阅名称"

$serviceName="云服务名称"

$ilbName="内部负载均衡名称"

$subnet=“子网名称"

$IP="IP地址"

Add-AzureInternalLoadBalancer -ServiceName $serviceName -InternalLoadBalancerName $ilbName –SubnetName $subnet –StaticVNetIPAddress $IP

#查看建立的内部负载均衡
# Get-AzureService -ServiceName $serviceName | Get-AzureInternalLoadBalancer

$vmName=“虚拟机名称"

$myVm = Get-AzureVM -ServiceName $serviceName -Name $vmName

$newVMEndpoints =

("LBSetname1","TCP",端口号1),

("LBSetname2","TCP",端口号2),

("LBSetname3","TCP",端口号3)

foreach ($endpointConfig in $newVmEndpoints)

{

$myVm | Add-AzureEndpoint -Name $endpointConfig[0] -Protocol $endpointConfig[1] -LocalPort $endpointConfig[2] -PublicPort $endpointConfig[2]–DefaultProbe -InternalLoadBalancerName $ilbName  -LBSetname $endpointConfig[0]

}
$myVm | Update-AzureVM

@查看建立的内部负载均衡集
# Get-AzureVM –ServiceName $serviceName –Name $vmName | Get-AzureEndpoint | select lbsetname

#2要素sourceIP负载均衡器规则

#–LoadBalancerDistribution 'sourceIP'

#3要素sourceIPProtocol负载均衡器规则

#–LoadBalancerDistribution 'sourceIPProtocol'

#默认的负载均衡器规则

#–LoadBalancerDistribution 'none'

Azure Powershell 创建 Internal Load Balancer的更多相关文章

  1. 在Google的GKE上创建支持Internal Load Balancer的Service

    在Google的Kubernetes Engine上发布service,可以采用除On-Promise相同的Cluster IP和NodePort两种方式外,还可以创建LoadBalaner的Serv ...

  2. 配置Internal Load balancer中VM的外网访问

    当在Azure中部署SQL VM时,处于安全考虑,不会配置VM的Public IP,会禁止外网的进出站访问,只允许从内部VNET,或者特定的内部IP访问.特别是当使用Azure Internal Lo ...

  3. Azure PowerShell (5) 使用Azure PowerShell创建简单的Azure虚拟机和Linux虚拟机

    <Windows Azure Platform 系列文章目录> 本文介绍的是国外的Azure Global.如果是国内由世纪互联运维的Azure China,请参考这篇文档: Azure ...

  4. Azure PowerShell (12) 通过Azure PowerShell创建SSH登录的Linux VM

    <Windows Azure Platform 系列文章目录> 本章将介绍如何使用Azure PowerShell,创建SSH登录的Linux VM 前提要求: 1.安装Azure Pow ...

  5. Azure China (8) 使用Azure PowerShell创建虚拟机,并设置固定Virtual IP Address和Private IP

    <Windows Azure Platform 系列文章目录> 本文介绍的是由世纪互联运维的Windows Azure China. 相比于Global Azure (http://www ...

  6. [New Portal]Windows Azure Virtual Machine (16) 使用Azure PowerShell创建Azure Virtual Machine

    <Windows Azure Platform 系列文章目录> 注:本章内容和之前的[New Portal]Windows Azure Virtual Machine (12) 在本地制作 ...

  7. Azure ARM (22) 使用Azure PowerShell创建Azure RM VM

    <Windows Azure Platform 系列文章目录> 在Azure China获得VM Image,可以执行下面的脚本. Get-AzureRmVMImagePublisher ...

  8. Azure PowerShell 创建虚拟机

    # 指定订阅名称$subscriptionName="订阅名称"# 指定云服务名称$serviceName="云服务名称"# 指定用来保存虚拟机VHD的存储$s ...

  9. Azure Load Balancer : 动态扩展

    笔者在前文<Azure Load Balancer : 支持 IPv6>中介绍了如何通过 PowerShell 脚本创建支持 IPv6 的 Load Balancer.本文我们接着介绍如何 ...

随机推荐

  1. FZU1686 神龙的难题 dancing links 重复覆盖

    分析:每次可以打一个小矩阵的怪,然后把每个怪看成一列,然后每个小矩阵看成一行,枚举左上角就行 注:然后注意总共的节点数是新图的行*列的个数,不是原图 #include<cstdio> #i ...

  2. 2015年10月23日JS笔记

    ECMAScript标准:JavaScript核心语法 微软:Jscript ECMAScript标准:一纸空文 JavaScript和JScritp都号称完全实现了 ECMAScript标准 W3C ...

  3. 在Visual Studio中利用NTVS创建Pomelo项目

    刚看新闻,才知道微软发布了Node.js Tools for Visual Studio(NTVS),受够了WebStorm输入法Bug的困扰,这下终于可以解脱了.以Pomelo为例,运行命令:pom ...

  4. HW5.27

    public class Solution { public static void main(String[] args) { int totalCount = 0; int lineCount = ...

  5. 松下蓄电池与UPS使用和维护

      使用条件及环境1.充电电流(浮充使用):0.15CA以下2.放电电流范围:0.05CA-3CA3.环境温度:0℃-40℃ (适宜的温度是25℃) 4.充电电压:(12V电池推荐值)   周围温度 ...

  6. light oj 1008 - Fibsieve`s Fantabulous Birthday

    1008 - Fibsieve`s Fantabulous Birthday   PDF (English) Statistics Forum Time Limit: 0.5 second(s) Me ...

  7. UIImagePickerController Class 概述

    不能定制界面,不可派生子类. 使用步骤: 检查制定源是否可用. isSourceTypeAvailable:方法.    检查可用媒体(视频还是只能是图片) availableMediaTypesFo ...

  8. UVa123 - Searching Quickly

    题目地址:点击打开链接 C++代码: #include <iostream> #include <set> #include <map> #include < ...

  9. Java/Andriod- 使用Eclipse搭建环境

    从网上找来的,做了一点小修改,我自己试了一下,1.3步骤我没去做,最后也不影响. 在开始Android开发之旅启动之前,首先要搭建环境,然后创建一个简单的HelloWorld.本文的主题如下: 1.环 ...

  10. JS单词形式的运算符

    1.void 运算表达式并忽略其返回值,比如void (1+2),void (0) <html> <head> <meta http-equiv="conten ...