Previous page

Next page

Locate page in Contents

Print this page

Connecting Virtual Machines to Virtual Networks

In Virtuozzo, you can connect virtual machines to virtual networks of the following types:

  • Bridged. This type of virtual network allows the virtual machine to use one of the physical server's network adapters, which makes it appear as a separate computer on the network the corresponding adapter belongs to.
  • Host-only. This type of virtual network allows the virtual machine to access only the host and the virtual machines joined to this network.

By default, any newly created adapter is connected to the Bridged network. To join a virtual machine to another network, use the prlctl set command. For example, the following session demonstrates how you can connect the net0 adapter of the MyVM virtual machine to the pcsnet1 virtual network.

Before connecting the MyVM virtual machine to the pcsnet1 virtual network, you may wish to check the network adapter associated with this virtual network. You can do it, for example, using the following command:

# prlsrvctl net list

Network ID Type Bound To

Host-Only host-only

Bridged bridged eth0

pcsnet1 bridged eth1

From the command output, you can see that the pcsnet1 virtual network is attached to the eth1 physical adapter on the host. That means that, after connecting the MyVM virtual machine to the pcsnet1 virtual network, the virtual machine will be able to access all computers on the network where the eth1 adapter is connected.

Now you can run the following command to join the net1 adapter of the MyVM virtual machine to the pcsnet1 virtual network:

# prlctl set MyVM --device-set net0 --network pcsnet1

Creating net0 (+) network=pcsnet1 mac=001C422D7493

The VM has been successfully configured.