Pcornel
Virtualization · KVM / QEMU

NAT Network

Cheat sheet · https://pcornel.dk/topic.php?topic=3800

Back to the Topic

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 — networks
  • virsh net-dumpxml default — NAT config
  • virsh 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

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → NAT Network definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired 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

Confirmation

Confirm action

Continue?