Virtualization · KVM / QEMU
NAT Network
Cheat sheet · https://pcornel.dk/topic.php?topic=3800
Answer
Trace guest addressing and default gateway through the virtual network/bridge to host forwarding and NAT, then through host routing/firewall and the external return path.
Remember
- DHCP lease ≠ internet reachability.
- NAT translation ≠ DNS or application health.
- Host internet access ≠ guest NAT path healthy.
- Outbound NAT does not automatically provide inbound reachability.
First checks
virsh net-list --all— networksvirsh net-dumpxml default— NAT configvirsh net-dhcp-leases default— DHCP leases
Verify in this order
VM → virbr0 → NAT → host uplink
Where it usually breaks
First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.
KVM / QEMU → NAT Network reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU → NAT Network definition or configuration is present | Configured state does not prove runtime behavior |
| Runtime | Relevant KVM/QEMU/libvirt object or process is active without matching errors | Runtime state does not prove dependencies or guest outcome |
| Dependency | Host CPU/memory, storage, network or device backend required by this path is healthy | Local success does not prove the next boundary |
| Acceptance | Original guest/application test succeeds after the change or observation | Required for end-to-end closure |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3800