Configure a Virtual Network Using Network Configuration Files
Updated: November 12, 2013
To configure your virtual network, you can use the Management Portal wizard or you can create and import a network configuration file. Windows Azure uses the network configuration file to define your virtual network settings.
You might prefer to use the Management Portal wizard to initially create your virtual network configuration, and then make subsequent changes by direct edits to the configuration file. For example, if you are configuring multiple virtual networks for separate subscriptions, you may want to first create a network configuration file using the Management Portal wizard. You can then export the file to use as a template, edit it to specify different settings, and then import the file back into the Management Portal. This can be an efficient way to create multiple virtual networks when you have more than one subscription. Or, if you want to make changes to your network configuration settings before deploying cloud services or virtual machines to the network, you can export the file, edit it, and then import it back to Windows Azure.
After your virtual network has been configured, you can deploy virtual machines or cloud services. When you deploy virtual machines, they will receive the settings that you specified for the virtual network. When you deploy cloud services, you will additionally use a service configuration file. The service configuration file specifies the number of role instances to deploy for each role in the service, the values of any configuration settings, and the thumbprints for any certificates associated with a role. This file contains other settings that are relevant to Virtual Network.
In order to author a network configuration file, you can create a virtual network by using the Management Portal, export the network configuration file that is created by the wizard, and edit that file in order to create a new virtual network. Alternatively, you can download and edit a virtual network configuration file sample.
For more information about the specific settings contained in the network configuration file, see Windows Azure Virtual Network Configuration Schema.
Some of the Virtual Network settings that you can specify in the network configuration file are:
The IP addresses of DNS servers to use for name resolution.
The IP address space and IP subnet definitions for virtual networks from which cloud service and virtual machines will be deployed.
Your local network site name and address space. Local Network site refers to your on-premises network.
Your VPN Gateway IP Address.
The affinity group with which you want to associate your virtual network. For more information about affinity groups, see About Affinity Groups for Virtual Network.
To edit the network configuration file, you can simply open the file, make the appropriate changes, and save them. You can use any xml editor to make changes to the network configuration file. You should closely follow the guidance for network configuration file schema settings. If you make changes to values in the file that are not compatible with the settings guidelines, your virtual network may not be configured in the way that you intended.
For specific details about the elements and setting guidelines, see Windows Azure Virtual Network Configuration Schema.
The NetworkConfiguration elements of the service configuration file can be used to deploy cloud services into a virtual network that was previously defined in a network configuration file. These settings are optional for cloud services. If you don’t specify settings in the Virtual Network elements section, the cloud service will not be deployed into a virtual network.
For more information about the service configuration file settings, see NetworkConfiguration Schema.
Some of the NetworkConfiguration settings that you can specify in the service configuration file are:
The DNS servers to use for name resolution
The Virtual Network site name
The address space and subnet for the cloud service
ConceptsWindows Azure Virtual Network Overview
About Affinity Groups for Virtual Network
Windows Azure Virtual Network Configuration Tasks
Other ResourcesWindows Azure Virtual Network Configuration Schema
Windows Azure Service Configuration Schema (.cscfg File)
Windows Azure Service Definition Schema (.csdef File)