Three forward modes. That is the entire menu Cockpit offers when you create a KVM virtual network, and two of the things people most often come looking for, a routed network and a LAN bridge, are not on it. That is not a bug. Cockpit splits the job across two pages: libvirt networks live under Virtual machines, and anything involving a real host bridge lives under Networking, where NetworkManager owns it.
This guide covers both halves. You will create a libvirt virtual network from the Networks page, pin a guest to a fixed address with a DHCP static host entry, build a host bridge so guests can pull addresses from the physical LAN, and attach interfaces to running and stopped virtual machines. It assumes the machines plugin is already in place, which is covered in managing KVM virtual machines from the Cockpit console, and that KVM itself is installed per the KVM/QEMU install guide for Ubuntu Server. The screenshots, the generated XML and every footgun below come from a live host running cockpit-machines on top of libvirt 12.0.0 and QEMU 10.2.1 on Ubuntu 26.04 LTS, tested in August 2026.
What Cockpit can and cannot change about libvirt networking
Worth settling before you start clicking, because half the frustration with this page comes from expecting parity with virt-manager. It is not there.
| Task | Where it lives | Supported |
|---|---|---|
| Create a NAT, open or isolated network | Virtual machines, Networks tab | Yes |
| Create a routed network | Not exposed | No, use virsh net-define |
| Change an existing network’s subnet or DHCP range | Not exposed | No, use virsh net-update or net-edit |
| Add or remove a DHCP static host entry | Network detail panel | Yes |
| Activate, deactivate, delete, set autostart | Networks table and detail panel | Yes |
| Create a host bridge, bond, team or VLAN | Networking page (NetworkManager) | Yes |
| Attach a guest NIC to a bridge or a virtual network | VM detail, Network interfaces | Yes |
| Change a guest NIC’s model or source | VM detail, Edit on the interface row | Yes, applied at next shutdown |
| Change a guest NIC’s MAC address | VM detail, Edit on the interface row | Only while the guest is shut off |
The missing edit path is the one that stings. Once a network exists, the detail panel is read only apart from autostart and static host entries, so a wrong subnet or a badly chosen DHCP range has to be fixed from the shell. It does not require deleting anything, which matters when guests are already attached. Swapping a DHCP range is two commands, because libvirt allows a range to be added or deleted but never modified in place:
sudo virsh net-update lab-isolated delete ip-dhcp-range "<range start='10.44.0.100' end='10.44.0.200'/>" --live --config
sudo virsh net-update lab-isolated add ip-dhcp-range "<range start='10.44.0.120' end='10.44.0.180'/>" --live --config
Each one prints the same confirmation naming which copies of the definition it touched, and any static host entries you added in Cockpit survive untouched:
Updated network lab-isolated persistent config and live state
Drop --live if the network is not running, which every freshly created one is not. Passing it against an inactive network is refused outright, here against a throwaway network called tmp-inactive:
error: Failed to update network tmp-inactive
error: Requested operation is not valid: network is not running
Changing the subnet itself means virsh net-edit followed by a stop and start of that network, which keeps the network object, its name and its autostart flag intact. Do it with the attached guests shut down. Stopping a network that running guests are plugged into strands them in a way that starting it again does not undo, which is the last section of this guide. Deciding the address plan up front is cheaper than either.
Every virsh command here assumes your user is in the libvirt group, which is what makes an unprefixed virsh connect to qemu:///system rather than your own session. Without that membership the reads fail loudly with Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied, and sudo in front of each one is the quick answer. On distributions that have moved to the modular libvirt daemons the socket in that message is virtqemud-sock instead, but the cause is the same.
One column on the Networks table deserves a note. Connection reads System for everything created here, meaning qemu:///system, and Cockpit hardcodes that. Unprivileged guests on a per-user qemu:///session connection cannot use these networks at all. Their Add interface dialog offers a userspace network stack option instead, and when no session-scoped networks exist it drops the interface type selector entirely. That is a libvirt privilege boundary rather than a Cockpit limitation, but the UI gives no hint it exists. If the machines plugin is not installed yet, the Cockpit install guide covers the base console and the optional add-ons that put these pages there.
Create a KVM virtual network from the Networks page
Open Virtual machines in the sidebar. Above the VM list sit two status cards, one counting storage pools and one counting networks. Click the Networks card. There is no entry for it in the sidebar and no breadcrumb link until you are already there, which is why people miss the page entirely. A stock libvirt install shows one row, the default NAT network on virbr0.

Create virtual network opens a dialog whose field list changes as you pick a forward mode, which is easy to miss because nothing announces it. Here is what each mode actually renders:
| Forward mode | Device selector | IP configuration choices |
|---|---|---|
| NAT | Shown: Automatic, plus every host interface | IPv4 only, IPv6 only, IPv4 and IPv6 |
| Open | Hidden | IPv4 only, IPv6 only, IPv4 and IPv6 |
| None (isolated network) | Hidden | None, IPv4 only, IPv6 only, IPv4 and IPv6 |
Only the isolated mode lets you skip addressing entirely. NAT and Open both insist on at least one address family, so a NAT or Open network with no addressing at all is not something the dialog will let you build. An IPv6-only NAT network it will build quite happily, though libvirt only masquerades IPv6 when the definition carries <nat ipv6='yes'/>, which Cockpit never writes, so what you get is plain forwarding under a NAT label. The Device dropdown in NAT mode lists every interface on the box including lo and the live vnet tap devices, none of which you want. Leave it on Automatic unless the host has more than one uplink and you need traffic pinned to a specific one.

Ticking Set DHCP range reveals Start and End, and both become mandatory. Cockpit does not derive a sensible range from the subnet the way virt-manager does, so leaving them blank fails validation with an inline complaint under each field:
Start
Start should not be empty
End
End should not be empty
Fill both, click Create, and check what libvirt received. Dumping an isolated network built through this dialog shows three things you never typed:
virsh net-dumpxml lab-isolated
A local-only DNS domain named after the network, a PTR zone, and a host record mapping the name gateway to the network’s own address:
<network>
<name>lab-isolated</name>
<uuid>8930441d-90a3-4c49-a107-c5a5f205bea5</uuid>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='52:54:00:96:da:e5'/>
<domain name='lab-isolated' localOnly='yes'/>
<dns>
<host ip='10.44.0.1'>
<hostname>gateway</hostname>
</host>
</dns>
<ip address='10.44.0.1' netmask='255.255.255.0' localPtr='yes'>
<dhcp>
<range start='10.44.0.100' end='10.44.0.200'/>
</dhcp>
</ip>
</network>
A NAT network built through the same dialog gets one extra line and nothing else, a bare forward element:
<forward mode='nat'/>
Worth comparing against the default network libvirt ships, which wraps a masquerade port range in the same element:
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
Cockpit never emits that block, so a Cockpit-built NAT network masquerades over the kernel’s default ephemeral port range instead of a pinned one. It makes no practical difference on a normal host, but it explains why two NAT networks on the same box do not look alike. The only other NAT-specific thing the dialog can add is dev='<interface>' on the forward element, which appears when you pick something other than Automatic in the Device dropdown. UUIDs and bridge MACs are generated, so yours will differ.
Those three DNS extras are useful behaviour rather than noise. Guests on the network can reach the host side by name with ping gateway, and reverse lookups stay inside the segment instead of leaking to upstream resolvers. None of it is documented in the dialog, so if you are comparing against a hand-written definition it is worth reading the libvirt network XML reference to see which of those elements you actually want to keep.
A network created in Cockpit is inactive and will not survive a reboot
The new row appears with state inactive and an Activate button, and autostart is off. Cockpit defines the network without starting it and without marking it to run at boot, which means a host reboot silently drops it and every guest wired to it fails to start.
virsh net-list --all
The difference against the stock network is visible in the Autostart column:
Name State Autostart Persistent
---------------------------------------------------
default active yes yes
lab-isolated inactive no yes
Click Activate, then expand the row and flip the Run when host boots switch. Both are one click and both are easy to walk past. Re-run virsh net-list --all afterwards and confirm the Autostart column reads yes, because a network that only looks right in the browser is exactly the failure you find out about after the next reboot.
Pin a guest to a fixed address with a DHCP static host entry
Expanding a network row exposes the only writable part of the detail panel. Under DHCP Settings there is a Static host entries list with an add entry link.

The dialog takes exactly two values, a MAC address and an IP address. There is no hostname field, which is the one thing virsh net-update gives you that this does not, so if you need dnsmasq to answer for a guest by name you still need the CLI. Grab the MAC from the guest’s Network interfaces table rather than retyping it. The dialog only checks that the fields are non-empty, so a malformed MAC gets bounced back by libvirt with a visible error, but a well-formed MAC belonging to nothing is accepted and simply never matches a guest.
The write lands in both the running network and the on-disk definition, so the reservation survives a network restart:
virsh net-dumpxml --inactive lab-isolated | grep -A2 '<dhcp>'
The host record sits alongside the range in the persistent config:
<dhcp>
<range start='10.44.0.100' end='10.44.0.200'/>
<host mac='52:54:00:aa:bb:cc' ip='10.44.0.50'/>
An address inside the DHCP range is accepted and works correctly: dnsmasq excludes any address that has a host reservation from the pool it hands out dynamically, so there is no collision to worry about. Keeping reservations below the range start is still worth doing for readability, because a glance at the XML then tells you which addresses are pinned without cross-checking every entry against the range.
Build a host bridge so guests get real LAN addresses
NAT is fine until something outside the host has to reach a guest. At that point you need a Layer 2 bridge on the host, and Cockpit builds those on the Networking page rather than the Networks tab. On Ubuntu Server that page usually greets you with nothing to work with.
Interfaces is empty and every NIC sits under Unmanaged interfaces
Cockpit’s Networking page is a NetworkManager front end. Ubuntu Server ships netplan with the systemd-networkd renderer, so NetworkManager is running but owns nothing, and the page renders an empty Interfaces table with every NIC listed below it as unmanaged. On a server install NetworkManager is often present only because cockpit-networkmanager depends on it and pulled it in.

The Add bridge button is still there and still opens, but the Ports list comes up empty, so the dialog cannot do anything useful. Confirm the cause from the shell:
nmcli -t -f DEVICE,TYPE,STATE device status
Every line ending in unmanaged is an interface Cockpit will refuse to touch:
virbr0:bridge:unmanaged
ens19:ethernet:unmanaged
eth0:ethernet:unmanaged
lo:loopback:unmanaged
Hand the interface you want to bridge over to NetworkManager with a small netplan file. Do this per interface rather than globally, so the NIC carrying your SSH session keeps its current owner:
sudo vim /etc/netplan/99-nm-bridge-port.yaml
Name the interface you intend to enslave, not the management one:
network:
version: 2
ethernets:
ens19:
renderer: NetworkManager
dhcp4: true
Netplan will load a file that anyone can read, but it complains every time the config is parsed, so match its own 600 default before applying. The check is stricter than world-readable: group read or write trips it too, so 640 warns as well. If the session you are typing into is the only way onto the box, swap the second command for sudo netplan try, which reverts on its own after 120 seconds unless you confirm it. Its own man page tells you to check afterwards that the revert actually happened.
sudo chmod 600 /etc/netplan/99-nm-bridge-port.yaml
sudo netplan apply
Skip the chmod and netplan apply answers with this, twice, once per parse pass:
** (configure:60398): WARNING **: Permissions for /etc/netplan/99-nm-bridge-port.yaml are too open. Netplan configuration should NOT be accessible by others.
Reload the Networking page and the interface moves out of the unmanaged list into Interfaces. Add bridge now offers it as a port. If your host has only one NIC and it is the one carrying your session, do the bridge conversion from the console instead, or follow the netplan bridge approach which builds the bridge declaratively and never leaves a window where the address is on the wrong device.

Give the bridge a name, tick the port, leave STP off for a single-port bridge, and click Add. Cockpit creates the bridge connection, enslaves the port and moves the port’s IP configuration onto the bridge in one step. The port itself goes address-less, exactly as it should.

Verify from the shell that the port really is enslaved, because a bridge with no members looks identical in the UI:
bridge link show
The port line names its master:
27: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 100
NetworkManager writes the result back into netplan as a generated /etc/netplan/90-NM-<uuid>.yaml pair, one describing the bridge and one re-describing your port with connection.controller: br0. Do not hand-edit those. The one thing worth checking is a reboot, since a bridge that only exists until the next boot is a trap you will hit at the worst moment. On this host the bridge came back with its address and its port still enslaved, and the leftover 99-nm-bridge-port.yaml caused no conflict, but verify it on yours before you put a guest behind it.
Bonds and VLANs use the same dialog pattern from the same page. Add team is also still there, but teamd is deprecated across the enterprise distributions and a bond does the same job with a maintained driver, so reach for Add bond instead. For scripted or repeatable host networking, the nmcli approach and the systemd-networkd approach both cover the same ground without a browser, and Open vSwitch is the answer once you need VLAN trunking or flow rules that a Linux bridge cannot express.
Attach a network interface to a virtual machine
Open a guest from the Virtual machines list and scroll to Network interfaces. Add network interface offers three interface types, and the Source dropdown is repopulated from a different inventory for each one.
| Interface type | What Source lists | Use it for |
|---|---|---|
| Virtual network | libvirt networks by name | NAT and isolated guests, the normal case |
| Bridge to LAN | Every bridge on the host, including virbr0 and virbr1 | Guests that need an address from the physical LAN |
| Direct attachment | Every non-bridge host interface, including lo and live vnet taps | macvtap, with vepa, bridge, private or passthrough mode |
Two of those source lists are wider than they should be. Bridge to LAN enumerates every bridge on the host, which includes the virbr devices belonging to libvirt’s own networks. Picking one still works, because the network’s dnsmasq listens on that bridge and will lease the guest an address, but the guest is now attached to a bare bridge rather than to a libvirt network. You lose libvirt’s network-port bookkeeping, the address drops out of the lease source so Cockpit has to fall back to ARP or the guest agent to show it, and nothing stops the network being deactivated out from under the guest. Choose the network by name under Virtual network instead. Direct attachment listing lo and live tap devices is the same class of problem, so read the list rather than taking the first entry.

Model offers virtio, e1000e, e1000 and rtl8139 on x86_64, with an extra entry on ppc64. Keep virtio for anything modern. The legacy PCI models exist for guests whose installer has no virtio driver, and Windows before the virtio-win drivers are loaded is the usual reason to reach for e1000e.
The NIC vanishes when the guest is shut down
Add an interface to a running guest and the dialog grows an extra field that a stopped guest does not have: Persistence, with an Always attach checkbox that is unchecked by default. Leave it alone and the NIC is hot-plugged into the live domain only. It works immediately, the guest sees the new device almost at once, and it disappears the next time the VM is powered off because it was never written to the persistent XML.
The table gives it away if you know where to look. A transient interface renders with its Edit button greyed out, because Cockpit refuses to edit a NIC that has no persistent definition to edit. A row whose neighbour has a live Edit button and whose own is dead is a NIC you are about to lose. Tick Always attach unless you genuinely want a temporary interface. On a stopped guest the checkbox is absent, since there is nothing live to attach to, and the change is persistent by definition.
From the shell, compare the two views of the domain:
virsh domiflist web01
virsh dumpxml --inactive web01 | grep -c "<interface"
If the live list has one more interface than the persistent XML, the extra one is temporary.
Why the IP address column stays empty
Cockpit asks libvirt for guest addresses from three sources at once: DHCP leases, the host ARP table, and the QEMU guest agent. Leases only exist for libvirt-managed networks, and ARP only helps once the guest has talked to the host, so a freshly booted guest on a bridge routinely shows a blank IP cell while the NAT guest beside it shows an address. In that state the columns read Source, MAC address, IP address, State.
The agent is the one source that works regardless of network type. Confirm first that the domain carries the virtio-serial channel the agent talks over, which comes from whatever created the VM rather than from the guest image:
virsh dumpxml web01 | grep org.qemu.guest_agent
A match means you only need the package inside the guest. No match means the channel has to be added to the domain XML and the guest fully stopped and started before any of this works. Assuming it is there, inside the guest:
sudo apt install -y qemu-guest-agent
sudo systemctl start qemu-guest-agent
Start, not enable --now. The Debian and Ubuntu unit ships with an empty install section on purpose, because a udev rule starts it when the virtio port appears, so enable answers with a paragraph about the unit not being meant to be enabled. Check that libvirt can reach it before going back to the browser:
virsh domifaddr web01 --source agent
Every interface the guest knows about is reported, bridged ones included, with link-local IPv6 on its own row:
Name MAC address Protocol Address
-------------------------------------------------------------------------------
lo 00:00:00:00:00:00 ipv4 127.0.0.1/8
- - ipv6 ::1/128
enp1s0 52:54:00:5f:02:69 ipv4 192.168.122.59/24
- - ipv6 fe80::5054:ff:fe5f:269/64
enp8s0 52:54:00:1f:6a:23 ipv4 192.168.1.129/24
- - ipv6 fe80::5054:ff:fe1f:6a23/64
Reload the VM page and the MAC address column has been replaced by Target, carrying the in-guest interface name, and both IPv4 and IPv6 addresses now appear for every interface including the bridged one. Same table, different columns, purely because the agent is running.

That column swap is the fastest way to tell whether the agent is alive in a guest, and it is worth installing everywhere for that reason alone. A blank IP on a bridged NIC almost never means the networking is broken.
Which interface changes need a full shutdown
Edit on an interface row opens a settings dialog with interface type, source and model all editable while the guest runs. MAC address is the exception: the field renders read-only on a running guest and only becomes an input once the guest is shut off. Change one of the editable fields and a banner appears at the top of the dialog:
Changes will take effect after shutting down the VM
Read that literally. It says shutting down, not rebooting. A reboot inside the guest keeps the same QEMU process alive and the live device configuration with it, so the change appears to have been ignored. Only a full stop and start rebuilds the domain from the persistent XML.

Saving a model change from virtio to e1000e on a running guest makes this concrete. Compare the two definitions afterwards:
virsh dumpxml web01 | grep -A6 "source bridge='br0'" | grep model
virsh dumpxml --inactive web01 | grep -A6 "source bridge='br0'" | grep model
The live domain is untouched while the on-disk definition has already moved:
<model type='virtio'/>
<model type='e1000e'/>
Two of the row’s controls do apply immediately, and they are not the same thing. Unplug drops the virtual link. The device stays attached to the domain, the guest keeps the interface and its address, the row stays in the table with State reading down and the button switching to Plug. What actually changes is one element in the live XML:
<target dev='vnet21'/>
<model type='virtio'/>
<link state='down'/>
That is the right tool for cutting a misbehaving guest off the network without killing it or losing its configuration, and it reverses with one click. Remove, hidden in the row’s overflow menu, is the one that detaches the device for real. It asks for confirmation first, and there is no equivalent undo.
Recovering guests after a network is deactivated
The Deactivate button on the Networks table has no confirmation step and no in-use check. Clicking it on a network with running guests attached tears down the bridge instantly. The guests stay up, their tap devices stay up, and every one of them is off the network.
The part that surprises people is that clicking Activate again does not undo it. libvirt rebuilds the bridge but does not re-enslave taps belonging to domains that were already running, so the bridge comes back with no carrier and the guests stay dark:
ip -br link show virbr0
bridge link show
A bridge in NO-CARRIER with an empty member list is the signature:
virbr0 DOWN 52:54:00:41:db:0b <NO-CARRIER,BROADCAST,MULTICAST,UP>
Restarting each affected guest fixes it properly, because libvirt re-creates the tap and enslaves it during domain startup. When a restart is not acceptable, put the taps back by hand. Find which tap belongs to which guest first:
virsh domiflist web01
Then attach that tap to the rebuilt bridge:
sudo ip link set vnet16 master virbr0
Connectivity came back within about two seconds on this host. Repeat per guest. Existing leases survive a short outage, so nothing inside the guests needs renewing. Do not take your time over it though. A network built through Cockpit carries no <lease> element, so libvirt hands dnsmasq a range with no lease time and dnsmasq falls back to its one hour IPv4 default. Clients start trying to renew at half of that, around the thirty minute mark, and drop the address entirely at the hour if the DHCP server is still down.
Delete sits one click further along. The row’s overflow menu holds exactly one item, Delete, and it stays enabled while the network is active and in use. It does ask “Delete network?” before acting, but the confirmation says nothing about the guests attached to it, so the modal that is meant to stop you gives you no reason to stop. Once it is gone the only way back is the XML, which you no longer have. Take a copy before you touch it:
virsh net-dumpxml --inactive lab-isolated > lab-isolated.xml
That file rebuilds the network exactly, including the DHCP reservations. Three commands, because net-define alone leaves you with the same inactive, autostart-off network the earlier section warned about:
sudo virsh net-define lab-isolated.xml
sudo virsh net-start lab-isolated
sudo virsh net-autostart lab-isolated
Keep that dump somewhere durable for every network you care about. It is also the file you edit when you need to change a subnet, which is the gap the Cockpit UI never fills.
Treat Deactivate as an offline-only operation and the whole problem goes away. Shut the guests down first, or use Delete from the row menu on a network you have already emptied. For the wider set of network operations that never reach this UI, including routed networks and live XML edits, the virsh command reference covers what to type instead, and the same Cockpit layout applies on RPM distributions such as openSUSE Leap where NetworkManager already owns the interfaces and the unmanaged trap never appears.