Static IPs for KVM guests (netplan + libvirt)
Last updated: 20 Aug 2025 Why: predictable addressing for allow-lists and audit. Two clean ways: set static IP in the guest (netplan) or pin a DHCP lease in libvirt. 1) In-guest (Ubuntu netplan) # /etc/netplan/01-static.yaml network: version: 2 ethernets: ens3: addresses: [10.0.50.23/24] gateway4: 10.0.50.1 nameservers: addresses: [10.0.50.10,1.1.1.1] sudo netplan apply 2) Libvirt DHCP reservation virsh … Read more