部署到虚拟网络后,azure云服务不可用

时间:2016-05-15 11:28:43

标签: azure-cloud-services azure-virtual-network

我的WebPortal托管在虚拟网络中的WebRole中,该虚拟网络将连接到我的公司网络(站点到站点)。但我无法通过http://xxxx.cloudapp.net地址访问它。需要帮助!

请澄清:

  • 如果我的项目未部署到VNet,我可以访问xxx.cloudapp.net(这意味着我从ServiceConfiguration.Cloud.cscfg中删除了NetWorkConfiguration
  • 我的项目在VNet后,我无法访问xxx.cloudapp.net。
    我可以从我的Corp NetWork成功ping webrole实例IP

1)ServiceConfiguration.Cloud.cscfg

  <Role name="WebRole_1">
    <ConfigurationSettings />
    <Instances count="1" />
    <Certificates />
  </Role>
  <NetworkConfiguration>
    <VirtualNetworkSite name="myVNet" />
    <AddressAssignments>
      <InstanceAddress roleName="WebRole_1">
        <Subnets>
          <Subnet name="TenantSubnet" />
        </Subnets>
      </InstanceAddress>
    </AddressAssignments>
  </NetworkConfiguration>

2)ServiceDefinition.csdef

  <WebRole name="WebRole_1" vmsize="ExtraSmall">
    <Imports />
    <Startup>
        <!--omit here, generated <Task> by Add-AzureNodeWebRole -->
    </Startup>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
  </WebRole>

3)我的VNet配置(Get-AzureVNetConfig)

  <VirtualNetworkConfiguration>
    <Dns>
      <DnsServers>
          <!-- omit here <DnsServer> -->
      </DnsServers>
    </Dns>
    <LocalNetworkSites>
      <LocalNetworkSite name="Local Network">
        <AddressSpace>
          <AddressPrefix>172.16.0.0/12</AddressPrefix>
        </AddressSpace>
      </LocalNetworkSite>
    </LocalNetworkSites>
    <VirtualNetworkSites>
      <VirtualNetworkSite name="myVNet" Location="Central US">
        <AddressSpace>
          <AddressPrefix>10.107.235.0/28</AddressPrefix>
          <AddressPrefix>10.107.238.0/28</AddressPrefix>
        </AddressSpace>
        <Subnets>
          <Subnet name="GatewaySubnet">
            <AddressPrefix>10.107.238.0/28</AddressPrefix>
          </Subnet>
          <Subnet name="TenantSubnet">
            <AddressPrefix>10.107.235.0/28</AddressPrefix>
          </Subnet>
        </Subnets>
        <DnsServersRef>
          <!-- omit here <DnsServerRef/>-->
        </DnsServersRef>
        <Gateway profile="Large">
          <ConnectionsToLocalNetwork>
            <LocalNetworkSiteRef name="Local Network">
              <Connection type="Dedicated" />
            </LocalNetworkSiteRef>
          </ConnectionsToLocalNetwork>
        </Gateway>
      </VirtualNetworkSite>
    </VirtualNetworkSites>
  </VirtualNetworkConfiguration>

4)虚拟网络图

0 个答案:

没有答案