Private networks

Create a private network and connect your VMs so they can talk to each other privately.

A private network is a private 10.x connection between your VMs on the same provider and region. It belongs to your account, not to one VM. Traffic on it never leaves the provider's private network.

You can connect a VM from either side: from the network on the Network page, or from the VM's own Network tab. Both do exactly the same thing.

Create a network

  1. Open the Network page and find the Private networks card.
  2. Choose the provider, pick the region from the list, and optionally give the network a name.
  3. Choose Create network. The network shows Creating and becomes Active when the provider has built it.
  4. A prompt asks Connect it to a VM right now? Pick one or more VMs, or skip it and do it later.

Connect a VM that already exists

From the Network page: on the network choose Connect VM, tick the VMs you want, then Connect. Only VMs that are running or stopped, on the same provider and in the same region, and not already connected, appear in the list.

From the VM: open the VM's Network tab, then under Private networks pick a network and choose Connect to private network. You can also create a new network there; it is created for this VM's region and the VM joins it automatically as soon as it is ready.

The membership shows Connecting and then Connected. The VM gets an extra network interface with a private address (for example 10.1.1.40), shown on its Network tab. No reboot is needed.

A VM created recently sets up the new interface by itself within about 30 seconds. On an older VM the interface may stay down. Then run these commands on the VM (replace ens7 with the name of the new interface; the first command shows the name and MAC address of the interface that is DOWN, and the last one can take about 30 seconds):

ip -br link sudo ip link set ens7 up sudo dhclient -v ens7

To keep it after a reboot, create /etc/netplan/60-private.yaml as shown below, then reboot. Do not run netplan apply on a live OVH VM. Match the interface by its MAC address, not by its name: the name can change after the VM is stopped and started again (tested: ens7 became ens4), the MAC address does not.

network:
  version: 2
  ethernets:
    private0:
      match:
        macaddress: fa:16:3e:00:00:00   # the MAC address of the new interface
      dhcp4: true
      dhcp4-overrides:
        use-routes: false
        use-dns: false

After creating the file run sudo chmod 600 /etc/netplan/60-private.yaml, otherwise netplan warns that the permissions are too open.

You can also pick a network while ordering: Join private network in the order form. The join happens when the new VM reaches Running. If it cannot be completed, the membership is shown as Failed on the network so you can see what happened.

Disconnect a VM or delete the network

  • Disconnect removes a connected VM from the network (from the Network page or the VM's tab). Its private interface is removed and no reboot is needed.
  • Delete network removes the network itself. It must be Active and have no VMs connected.

Each of these takes a moment to finish. The page refreshes every few seconds while anything is still pending.

A network is tied to its provider and region, so a VM on a different provider or in a different region can't join it; the dashboard tells you so.