Skip to main content

Connect a VM to a network

Connect a virtual machine (VM) to a network when it needs one more network interface. Center connects a network only to a powered-off VM.

Before you begin​

  • You need the VDC admin or Vm Developer role in this VDC (virtual data center), or the Cluster master role.
  • The network is assigned to the VDC of this VM — Assign a network to a VDC.
  • The VM is powered off: its status is Offline or Created — Start, stop and restart a VM.
  • The VM has fewer than five network connections.

Connect the network​

  1. In the left menu, select Virtual Data Centers → the VDC → Virtual Machines → the VM. The VM page opens.
  2. Click Add network in the header of the Networks section. The section expands, and a Network N block appears in it.
  3. Select a network in the Name field. The list contains the networks of the VDC; the CIDR of the selected network is shown under the field. If there are no networks, the field hint says No assigned networks.
  4. Click Save network.

Check the result​

The web interface shows the notification NIC was successfully added!, and a connection row appears in the Networks section. The MAC and IP columns show the addresses of the new connection.

Configure the new connection in the guest OS if the image does not do this automatically.

If Center rejects the connection, the web interface shows a notification with the error. Check the VM status and the free addresses of the network — Exclude an address from an IP pool and view used addresses.

More​

  • IP — a VM address of your own from the network subnet, without a mask. An empty field means the address is assigned automatically.
  • MBps limit — the speed limit of the connection. An empty field means no limit. Later you can change it in the connection panel: click the connection row in the Networks section, enter a value in the MBps limit field and click Save. The limit can also be changed for a running VM; this is available to users with the VDC admin, VDC user and Cluster master roles.
  • Slot — the number of the VM network port. By default, the first free one.
  • IP guard — enabled by default. Center allows you to disable it only in an isolated network; in a routed network, the switch is unavailable.
  • To disconnect the VM from a network, click the trash button in the connection row of the Networks section, and then click Remove in the confirmation window. The VM must have the Offline status.

Next​

API methods: vms-add-nic, vm-remove-nic, vm-ratelimit-nic — in the API reference.