重命名Azure上的虚拟网络


8

是否可以重命名Azure上的现有虚拟网络?例如,通过powershell。

我在门户网站UI中看不到任何选项,并且已经在现有网络中设置了可观的部署。

Answers:


2

2015年8月。仍然无法重命名VNET。解决方案仍然是创建一个新的VNET并将资源迁移到其中。


2

我不确定是否可以真正更改它(尚未尝试),但是如果可以,则通过PowerShell和Set-AzureVNetConfigcmdlet。

<NetworkConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration">
  <VirtualNetworkConfiguration>
    <Dns>
      <DnsServers>
        <DnsServer name="<server-name>" IPAddress="<server-address>"/>
      </DnsServers>
    </Dns>
    <LocalNetworkSites>
      <LocalNetworkSite name="<site-name>">
        <VPNGatewayAddress>gateway-address</VPNGatewayAddress>
        <AddressSpace>
          <AddressPrefix>address-prefix</AddressPrefix>
        </AddressSpace>
      </LocalNetworkSite>
    </LocalNetworkSites>
    <VirtualNetworkSites>
      <VirtualNetworkSite name="<site-name>" AffinityGroup="<group-name>">
        <Gateway profile="Small">
          <VPNClientAddressPool>
            <AddressPrefix>address-prefix</AddressPrefix>
          </VPNClientAddressPool>
          <ConnectionsToLocalNetwork>
            <LocalNetworkSiteRef name="<site-name>"/>
              <Connection type="Dedicated"/>
            </LocalNetworkSiteRef>
          </ConnectionsToLocalNetwork>
        </Gateway>
        <DnsServersRef>
          <DnsServerRef name="<server-name>"/>
        </DnsServersRef>
        <Subnets>
          <Subnet name="<subnet-name>">
            <AddressPrefix>address-prefix</AddressPrefix>
          </Subnet>
        </Subnets>
        <AddressSpace>
          <AddressPrefix>address-prefix</AddressPrefix>
        </AddressSpace>
      </VirtualNetworkSite>
    </VirtualNetworkSites>
  </VirtualNetworkConfiguration>
</NetworkConfiguration>

例如,检索配置:

Get-AzureVNetConfig -ExportToFile "C:\temp\azurenetconfig.netcfg"

修改文件

上传配置:

Set-AzureVNetConfig -ConfigurationPath "C:\temp\azurenetconfig.netcfg"

看到

Set-AzureVNetConfig
使用PowerShell创建Windows Azure网络
Windows Azure虚拟网络配置


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.