Configuring network interfaces of virtual machines

You can add new network interfaces to your virtual machines, edit IP addresses and security groups for the existing interfaces, and remove network interfaces by detaching them.

Limitations

  • You cannot manage network interfaces of shelved VMs.
  • A VM that is connected to a dual-stack network always receives an IPv6 address, if the IPv6 subnet is in the SLAAC or DHCPv6 stateless mode.

To attach a network interface to a virtual machine

  1. On the Virtual machines screen, click the required virtual machine.
  2. On the Overview tab, click Edit in the Network interfaces section.
  3. In the Network interfaces window, click Add to attach a network interface.
  4. In the Add network interface window, select a compute network to connect to, and then specify MAC address, IPv4 and/or IPv6 addresses, and security groups. By default, MAC and primary IP addresses are assigned automatically. To specify them manually, clear the Assign automatically check boxes, and enter the desired addresses. Optionally, assign additional IP addresses to the network interface in the Secondary IP addresses section. Note that a secondary IPv6 address is not available for an IPv6 subnet that works in the SLAAC or DHCPv6 stateless mode.

    Secondary IP addresses, unlike the primary one, will not be automatically assigned to the network interface inside the virtual machine guest OS. You should assign them manually.

    After specifying the network interface parameters, click Add.

  5. Click Done to finish editing VM network interfaces and save your changes.

To edit a network interface of a virtual machine

  1. On the Virtual machines screen, click the required virtual machine.
  2. On the Overview tab, click Edit in the Network interfaces section.
  3. In the Network interfaces window, click the ellipsis button next to the interface you want to edit, and then click Edit.
  4. In the Edit network interface window, modify the network interface parameters as follows:

    • Change the primary IP address. To update the address inside the VM guest OS, restart the network interface.
    • Add or remove secondary IP addresses.
    • Modify security groups assigned to the VM.

    After updating the required parameters, click Save.

  5. Click Done to finish editing VM network interfaces and save your changes.

To detach a network interface from a virtual machine

  1. On the Virtual machines screen, click the required virtual machine.
  2. On the Overview tab, click Edit in the Network interfaces section.
  3. In the Network interfaces window, click the ellipsis button next to the interface you want to detach, and then click Remove.
  4. Click Done to finish editing VM network interfaces and save your changes.