vmip : Get the IP address of a KVM virtual machine

I’ve added a short bash script that will return the IP address of a running KVM virtual machine. I needed this because I usually ssh into my physical host from a laptop while sitting on my couch and then ssh over into my VMs. This script automates my usual of dumping of the VM’s xml to get its MAC address and then checking that MAC with my physical host’s arp table. Now all I need to do is run ‘virsh list’ and send the server name into vmip to get its IP address.

The script is available at !LH’s GitHub page at: github.com/linuxhistoryblg

Cheers! dcd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.