【问题标题】:Is it possible to add a Scale Set to existing VNET是否可以将规模集添加到现有 VNET
【发布时间】:2016-05-22 08:47:48
【问题描述】:

我已经创建了一个 VNet 和子网。为此 Vnet 添加了其他资源。现在我需要向这个子网添加一个规模集。这可能吗?

当我从 Azure 门户创建 VM 规模集时,它不会请求 VNet,而是创建自己的 VNet/子网。

【问题讨论】:

    标签: azure azure-vm-scale-set


    【解决方案1】:

    假设您拥有规模集配置所需的所有资源,以下是创建虚拟机规模集的步骤。

    #IP configuration
    $ipName = "IP configuration name"
    
    #create the IP configuration
    $ipConfig = New-AzureRmVmssIpConfig -Name $ipName -LoadBalancerBackendAddressPoolsId $null -SubnetId $vnet.Subnets[0].Id
    
    $vmssConfig = "Scale set configuration name"
    
    #create the configuration for the scale set
    $vmss = New-AzureRmVmssConfig -Location $locName -SkuCapacity 3 -SkuName "Standard_A0" -UpgradePolicyMode "manual"
    
    #Add the network interface configuration to the scale set configuration
    Add-AzureRmVmssNetworkInterfaceConfiguration -VirtualMachineScaleSet $vmss -Name $vmssConfig -Primary $true -IPConfiguration $ipConfig
    
    $vmssName = "scale set name"
    
    #create the scale set 
    New-AzureRmVmss -ResourceGroupName $rgName -Name $vmssName -VirtualMachineScaleSet $vmss
    

    请参阅https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-windows-create/ 以获取分步指导。

    请注意,您使用的是最新版本的 Azure Powershell,否则您会错过一些 Powershell cmdlet。

    希望这会有所帮助。

    【讨论】:

    • 我可以把这个添加到流量管理器吗?所以我正在考虑 3 个不同子网中的 3 个 vmss,然后将它们附加到我的流量管理器以进行 HA?
    猜你喜欢
    • 2019-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-15
    相关资源
    最近更新 更多