Steps to find the ip address of Linux KVM guest virtual machine

  1. Open the terminal app or log in using ssh to host server
  2. Get the network list: virsh net-list
  3. Type the command: virsh net-dhcp-leases networkNameHere

Let us see steps in details.

Method 1 – Find the IP addresses of VMs in KVM with virsh

Type the following command to list network:

# virsh net-list
# virsh net-info default
# virsh net-dhcp-leases default

Method 2 – Get the IP address of Linux KVM guest using domifaddr

Find network interfaces’ addresses for a running domain called freebsd11.1:

$ virsh list
$ virsh domifaddr freebsd11.1

Method 3 – Use arp command to g a KVM guest’s IP address

Use the virsh command to find out the mac address of domain:

$ virsh list
$ virsh dumpxml VM_NAME | grep "mac address" | awk -F\' '{ print $2}'
$ arp -an | grep 52:54:00:ce:8a:c4
Was this answer helpful? 1 Users Found This Useful (1 Votes)