Check VM's IP address from the host
In this post, we talk about how to check the IP address of VM from the host machine.
Guests using NAT
There is a built-in dhcp
server in qemu/virtio. And one can check the guests' IP address from the host machine by running
virsh net-dhcp-leases <network_name>
where the <network_name>
is the name of your virtio network, which can be checked by
virsh net-list -all
Guests using bridged network
One can use the tool dhcpdump
.
sudo apt install dhcpdump
sudo dhcpdump -i br0
The previous part of IP
, and the GIADDR
is the ip address of the DHCP server. The latter part of IP
, and the YIADDR
is the ip address of the guest’s ip address.