I looked further into the problem of obtaining IP address of the controler
interface from the guest VM. And I'm not sure what's the best solution.
There are the following options:
1) ARP table lookup
I tried this manually, I booted up a VM which was connected to a bridge
together with a physical interface of my laptop connected to RedHat
network. The machine requested an IP, got it, but a record didn't show
up in the ARP table at all.
Am I doing something wrong?
There's also a script that is a part of `arping' which does this
IP resolution using ARP . But this solution seems pretty bad to me.
They try to ping every possible address on the subnet and then see if
the MAC's match.
2) Sniffing DHCP replies
This is (if I understand it correctly) the way autotest does it. The
code is here  (thanks to jzupka for helping me out!). I think this
might not be suitable for LNST, because the tcpdump needs to be running
during the guest startup. LNST is designed to work with machines that
are already running.
3) Setup through serial console
I dug into the beaker task that handles these virtual installs  and
they have script for obtaining a hostname of the guest . It's a
`expect' script that uses serial console via `virsh console' command.
Works ok, but it assumes that the guest systems' language is English
(which might be true in beaker, but outside of that it's not very
Also libvirt's python bindings can open a serial console connection
directly in python , which could be useful. Here's example of it's
usage from libvirt .
What do you think is the best way to do this?
Maybe there's another way I'm not seeing ...