Today I finished off a tool which everyone has been asking for, virt-ifconfig – list the IP addresses of your virtual machines:

# virt-ifconfig
Guest                Iface   Family  IP address
CentOS5x32           eth0    inet
CentOS5x32           eth0    inet6   fe80::5652:ff:fe3c:7611

You can grab some very experimental source code from this repository.

Next up will be: virt-ps, virt-uname, virt-route, virt-dmesg, and more …


Filed under Uncategorized

4 responses to “virt-ifconfig

  1. jef spaleta

    Do you have a roadmap concerning the number of commands you’ll be creating in the virt- namespace?

    Perhaps before you go to far down into the rabbit hole would it make more sense to modify the existing programs so that virtual client functionality is appended as an additional set of optional parameters to the existing programs? Just something to consider as an alternative to doubling the size of /sbin/ /bin/ directory listings.


  2. rich


    I would be surprised if it’s more than a dozen commands. Let’s see:

    maybe virt-iptables and virt-kill

    The aim is just to allow users to collect routine statistics and diagnose simple problems. For complex stuff, sysadmins will just have to log into the VM.

    (For comparison, my current /bin and /sbin has 392 files).

    The problem with combining them is that we don’t offer all of the existing options. For example “virt-ps” is very much equivalent to running “ps ax” in the guest, and there is no other option supported (if you want to see fewer processes you have to filter them yourself). The other problem is that these commands require a lot of machinery to work, most of it written in Perl, which isn’t conducive to inclusion in those upstream projects.


  3. Pingback: virt-uname « Richard WM Jones

  4. Pingback: Quick tip: Find the IP address of a virtual machine « Richard WM Jones

Leave a Reply

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

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

Google photo

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

Twitter picture

You are commenting using your Twitter 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.