Guide · Storage & networking

Configure storage and networking for KVM.

Where a virtual machine's disks live and which networks it reaches are decided once for the cluster, then used by every node. This guide covers storage containers and volumes, the four kinds of network, VLANs, VXLAN overlays and the firewall.

By · Checked against LexiVirt 2.1 on

Storage containers

A storage container is where a VM's disks live on a node: a directory on the node, an NFS export or an LVM volume group.

  1. Open Storage and choose Add container.
  2. Pick the Type: Directory on the node, NFS export or LVM volume group.
  3. For a directory give the Path; for NFS the Server, the Export and optional Mount options; for LVM the Volume group and optional Thin pool.
  4. Under Add it on, choose the nodes, then Add. For high availability, add the same NFS export on every node.
  5. Pick the container under Storage when you create a VM.

Each node shows whether it has a container, is missing it, or has one of the same name pointing elsewhere. Every node checks once a minute that each container still answers; one that does not, is not mounted or went read-only is a critical alert.

LimitNo distributed storage. Shared storage is an NFS export you provide; high availability and off-node backups need one.

Shared volumes

  1. In Storage, choose New volume and give a Name, a Size (GB) and the Container. On an NFS container it is one disk every node sees.
  2. Attach it from the VM's tools: Add New Disk → Shared volume. Repeat for every VM that should share it — a cluster's quorum disk, or shared data.

Networks

  1. Open Networks and choose Create Network.
  2. Pick the Type: NAT (outbound only), Isolated (guests only), LAN (on the nodes' own network) or Bridged (a host bridge, optionally VLAN-tagged).
  3. Give the Name and, for NAT or isolated, the Subnet (CIDR); for bridged, the Host bridge and an optional VLAN id.
  4. Choose Validate to see what each node will do, then Create. The network is made on every node.
  5. To pin a VM to an address, use Fixed addresses on this network on the network's row and choose Reserve.

A NAT network is the default for a new VM: it reaches out, and nothing can open a connection in. Each node's NAT network is its own, so VMs on different nodes reach each other through a bridged, LAN or overlay network instead.

A host bridge for bridged and VLAN networks

A bridged network attaches guests to a bridge that exists on the host. Build it with your distribution's own tools on every node; on Debian or Ubuntu with netplan, a VLAN-tagged bridge for VLAN 100 looks like this:

yaml
# /etc/netplan/01-bridge.yaml
network:
  version: 2
  ethernets:
    eno1: {dhcp4: no}
  vlans:
    eno1.100:
      id: 100
      link: eno1
  bridges:
    br-vlan100:
      interfaces: [eno1.100]
      dhcp4: no

Then create a bridged network on it in the console. The switch port feeding the server has to carry VLAN 100 as a trunk, or nothing passes. Virtual switches (a preview since 1.9.8) do this from the console instead: the same VLAN-aware bridge on every node, on each node's spare NIC or bond, never on the NIC that carries the node's own address, and undone by the node itself if the console cannot reach it within 90 seconds.

Overlay networks across nodes

  1. Open SDN and choose New overlay.
  2. Give a Name and a VNI (the segment number); leave MTU and UDP port at their defaults unless your network needs otherwise.
  3. Save. The console sets up the VXLAN peers on every node, and the overlay appears in the network list when you create a VM.

LimitVXLAN is unencrypted: the network underneath has to be one you trust.

Firewall rules between VMs

  1. Open Firewall and choose Add Rule.
  2. Set the Source and Destination — a VM by name, or Address or range… — the Protocol and the Port or range.
  3. Pick the Action — Allow, Drop (silent) or Reject (reply) — and a Priority (lower runs first), then save.

Names are resolved against the live cluster on every apply and compiled to nftables on each node; the page names any node that could not enforce the rules. A layer-4 load balancer (round-robin or source affinity) spreads one address and port over several backends; it has no health checks.

Go further

The capability behind this guide: Storage for KVM Virtualization. Every console page with its limits: the feature reference. Stuck? Ask the community or get support.

Run it on your own servers.

Free, with no licence per VM, socket or core. One command per server.