Updated: 3 November 2026 · Applies to: libvirt and virsh, on the KVM host

To find a KVM guest's IP address, run virsh domifaddr <guest-name> on the host, which asks the guest's QEMU agent or the host's DHCP lease records directly. Run all of these commands on the KVM host itself, not inside the guest.

Method 1: domifaddr, the most direct way

List your guests first to get the exact name:

virsh list --all

Then ask for its network interface addresses:

virsh domifaddr web-server-01

If this reports nothing, the guest may not have the QEMU guest agent installed; the next method does not need it.

Method 2: read the DHCP lease from the host's virtual network

List the virtual networks the host manages:

virsh net-list

Show the active leases for a specific network, usually default:

virsh net-dhcp-leases default

This shows every guest currently holding a lease on that network, along with its IP and MAC address, and works even if the guest has no agent installed, as long as it received its address from that network's DHCP server.

Method 3: find the MAC address, then check the host's ARP table

Useful when the guest uses a static IP that did not come from DHCP at all. First get the guest's MAC address from its XML definition:

virsh dumpxml web-server-01 | grep "mac address"

Then look up that MAC in the host's ARP table:

ip neigh | grep 52:54:00:xx:xx:xx

Replace the MAC address with the one from the previous command. ip neigh is the current replacement for the older arp -an command, which still works on most distributions but is deprecated.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $131.99 a month.

Was this answer helpful?

Still stuck? Open a ticket