virsh – how to get IP of your vm

List all VMs:

uvt-kvm list


virsh list --all
Id Name State
- webserver-xenial shut off
  1. If you have uvtool installed you can simply run:
uvt-kvm ip NAME_OF_YOUR_VM

uvt-kvm ip webserver-xenial

For a virsh command we will have to list our networks first to get name and then check dhcp allocation.

virsh net-list
Name State Autostart Persistent
default active yes yes

virsh net-dhcp-leases default
Expiry Time MAC address Protocol IP address Hostname Client ID or DUID
2019-02-15 11:56:56 52:54:00:15:c9:40 ipv4 webserver-xenial


virsh net-dhcp-leases $(virsh net-list --name)

should also give you the same result as long as you have only one network in your lab.