Networking Guide

7 When selecting more than one network for the virtual machine, specify the virtual machines primary
network by click the Primary NIC option for that network. By default, the primary network is set to the
first network you selected for the virtual machine.
8 Click Save.
Connect a Virtual Machine to the Internet
You can connect virtual machines to gateway networks in your virtual data center so that the virtual
machines have access to the Internet.
When you connect a virtual machine to a network, it is assigned an IP address from the network's
predefined private IP address pool.
IMPORTANT By default, gateways are deployed with firewall rules configured to deny all network traffic to
and from the virtual machines on the gateway networks. Also, NAT is disabled by default so that gateways
are unable to translate the IP addresses of the incoming and outgoing traffic. You must configure both
firewall and NAT rules on a gateway for the virtual machines on a gateway network to be accessible.
Attempting to ping a virtual machine on a network after configuring a NAT rule will fail without adding a
firewall rule to allow the corresponding traffic.
Prerequisites
Verify that you have network administrator privileges.
Procedure
1 Locate the virtual machine to be connected.
a If you are a virtual infrastructure administrator, click the virtual data center that contains the
virtual machine and the Virtual Machines tab.
b If you are a end user, in My Virtual Machines, select the virtual machine.
2 If the virtual machine is powered on, select it and click Power Off.
3 Click the virtual machine name.
4 Click the Networks tab.
5 If the virtual machine is not connect to a network, click Add a Network. Otherwise, click Edit Network
Assignments.
6 Select a gateway network from the list of networks.
NOTE You can select more than one network to which to connect the virtual machine.
7 When selecting more than one network for the virtual machine, specify the virtual machines primary
network by click the Primary NIC option for that network. By default, the primary network is set to the
first network you selected for the virtual machine.
8 Click Save.
9 Create a NAT rule to translate the external network address and internal network address of the virtual
machine so that it can receive network traffic from the Internet.
See “Add a NAT Rule,” on page 24 for the steps to create a NAT rule for the virtual machine.
10 Create a firewall rule to allow the gateway to send and receive Internet traffic for the virtual machine.
See “Add a Firewall Rule,” on page 29 for the steps to create a firewall rule allowing Internet access for
the virtual machine.
Chapter 4 Network Connectivity for Virtual Machines
VMware, Inc. 39