Previous page

Next page

Locate page in Contents

Print this page

Creating a Virtual Network

Virtual networks serve as binding interfaces between the virtual network adapters in virtual machines and Containers and the physical, VLAN, and virtual network adapters on the host. Using virtual networks, you can connect virtual machines and Containers to different networks.

By default, Virtuozzo creates the following virtual networks on the server:

  • Bridged. This virtual network is connected to one of the physical adapters on the host (as a rule, eth0) and provides virtual machines and Containers included in this virtual network with access to the network behind this physical adapter.
  • Host-only. This virtual network is connected to a special virtual adapter on the server and allows the virtual machines and Containers joined to this virtual network to access only the server and the other virtual machines and Containers on this network.

You can create your own virtual networks using the prlsrvctl or vznetcfg utility. For example, to make a new virtual network with the name of network1, you can run one of the following commands:

# vznetcfg net new network1

or

# prlsrvctl net add network1

By default, both commands create host-only virtual networks. However, you can change their types using the prlsrvctl utility; see Configuring Virtual Network Parameters for details.

In the current version of Virtuozzo, you can create

  • Up to 16 host-only virtual networks.
  • One or more bridged virtual networks. The number of virtual networks depends on the number of physical and VLAN adapters available on the host. One virtual network can be connected to only one physical or VLAN adapter.

Viewing Bridges

A virtual network is associated with a bridge that is automatically made on the host when you create the virtual network and serves as the basis for virtual network operation. To find out what bridge is associated with what virtual network, you can run the following command:

# vznetcfg if list

Name Type Network ID Addresses

eth0 nic Bridged 10.31.252.116/16,fe80::2a9:40ff:fe0f:b6f2/64,dhcp

br1 bridge Bridged fe80::200:ff:fe00:0/64

br0 bridge Host-Only 10.37.130.2/24,fdb2:2c26:f4e4::1/64,fe80::200:ff:fe00:0/64

The bridges existing on the host are listed in the Name column and can be easily identified by the br prefix.

Note: Detailed information on the vznetcfg and prlsrvctl utilities is provided in the Virtuozzo 6 Command Line Reference Guide.