virsh and guest IP

der.hans PLUGd at LuftHans.com
Wed Nov 2 16:56:47 MST 2011


moin moin,

is there a way from virsh to see actual networking for a qemu/kvm guest?

I can use dumpxml to pull the interface stanza and get the guest's MAC
addy, then look at the arp cache ( ip neighbor show or arp -a ) to find
the address associated with the MAC.

However, what if the guest has dropped from the arp table due to not
actually using the network for a while? I ran into that the other day.

Since the host is setting up the networking it should be able to report
the networking as well.

I think virt-manager will report the networking info, but I need to be
able to work w/out a GUI for this setup.

There are ways to do this by changing the guest, e.g. ping the gateway
every couple of minutes so that the guest stays in the host's arp table.
But, the info comes from the host, so the host should be able to see it.

ciao,

der.hans
-- 
#  http://www.LuftHans.com/        http://www.LuftHans.com/Classes/
#  "Rock 'n' roll might not solve your problems, but it does let you dance
#  all over them." -- Pete Townsend


More information about the PLUG-discuss mailing list