Previous page

Next page

Locate page in Contents

Print this page

Configuring Network Settings

To make virtual machines and Containers accessible from the network, you need to assign valid IP addresses to them and configure DNS servers. The session below illustrates setting these parameters for the MyVM virtual machine and Container 101:

  • Assigning IPv4 and IPv6 addresses:

    # pctl set MyVM --device-set net0 --ipadd 10.0.186.100/24

    # pctl set MyVM --device-set net0 --ipadd 1fe80::20c:29ff:fe01:fb07

    # pctl set 101 --ipadd 10.0.186.101/24 --save

    # pctl set 101 --ipadd fe80::20c:29ff:fe01:fb08 --save

    net0 in the commands above denotes the network card in the VM virtual machine to assign the IP address to. You can view all network cards of a virtual machine using the pctl list VM_name -i command.

  • Setting DNS server addresses:

    # pctl set MyVM --nameserver 192.168.1.165

    # pctl set 101 --nameserver 192.168.1.165 --save

When running commands for a Container, you need to use the –-save flag to save the specified parameters to the Container configuration file. If you omit this option, the applied values will be valid only until the Container shutdown. Omit the --save flag when executing commands for a virtual machine; the parameters are automatically saved to the virtual machine configuration file without this flag.

Notes :

1. You can configure the network settings only for virtual machines that have Parallels Tools installed.

2. To assign network masks to Containers operating in the venet0 networking mode, you must set the USE_VENET_MASK parameter in the /etc/vz/vz.conf configuration file to yes .