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. hdu 5504 GT and sequence

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5504 GT and sequence Time Limit: 2000/1000 MS (Java/O ...

  2. SecureCRT配置显示的字符集

  3. runtime详解2

    Objective-C语言是一门动态语言,它将很多静态语言在编译和链接时期做的事放到了运行时来处理.这种动态语言的优势在于:我们写代码时更具灵活性,如我们可以把消息转发给我们想要的对象,或者随意交换一 ...

  4. Widget only supports Widgets as children

    Widget only supports Widgets as children https://www.baidu.com/s?wd=Widget%20only%20supports%20Widge ...

  5. WinFrom 安装包制作

    1.添加安装向导项目打开文件系统界面,选择应用程序文件夹.在右侧右击->添加->文件,把程序需要的文件都添加进来. 2.右击程序集->创建快捷方式.右击快捷方式->属性窗口-& ...

  6. Using breakpad in cocos2d-x 3.2,dump信息收集

    作者:HU 转载请注明,原文链接:http://www.cnblogs.com/xioapingguo/p/4037268.html 一.基本步骤 1.生成转换工具 2.把breakpad加入到项目 ...

  7. centos上安装jdk环境

    老沙采用的环境是centos 6.5 64位服务器.在linux上安装jdk环境都很多中方式,这里讲解下手工进行安装并进行环境变量配置. 首先需要下载一个64位版本的linux,可以去oracle官网 ...

  8. 在与SQL Server建立连接时出现与网络相关的或特定于实例的错误

    向往前一样.学习牛腩新闻公布系统的视频,写程序,打开数据库.出现一个框框,具体内容例如以下: 数据库连接不上.全部的工作都要歇班,捣鼓了会儿,简单总结一下解决该问题的方法. 首先:第一步,程序--SQ ...

  9. nape.dynamics.InteractionGroup

    (转载http://tomyail.com/blog/1123) 说明: Filter只是Shape的属性,Nape为Interactor类提供了group属性,这个属性是一个InteractionG ...

  10. 重启PHP命令

    php-fpm重启 killall php-fpm 再执行(usr/local/php是php的安装目录)/usr/local/php/sbin/php-fpm & /usr/local/ng ...