[TriLUG] Xen: Identifying Host from Guest

Andrew Ball anball at gmail.com
Fri Jun 8 11:03:14 EDT 2007


I figured out a neat trick to get a domU listing for several different
hosts.  Here's an
example for the setup I use at work

hosts="192.168.46.131 192.168.46.132"
for host in hosts
do
    echo $host
    echo =====================
    ssh -C root@$host xm list
    echo
done

I have to ssh to a dual-home box to get to the 192.168.46.0/24 network, so I
nest
ssh commands, that is

ssh -C andrew at my-dual-home-box ssh -C root@$host xm list

This appears to work when ssh key-based authentication works for all the
hosts
involved.

Peace,
Andrew

On 5/2/07, Ken Mink <ken.mink at gmail.com> wrote:
>
> Hi Folks,
>
>   We've got a number of machines using Xen to host other 'machines'.
> The guests sometimes get moved from one host to another. Is there a
> way to identify the host from inside one of the guests? I've poked
> around in proc and can't seem to find anything.
>
> TIA,
> Ken
>
> --
> ---------------------------------------------
> "They that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety."--Benjamin Franklin
> " 'Necessity' is the plea for every infringement of human liberty; it
> is the argument of tyrants; it is the creed of slaves."--William Pitt
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



-- 
=======================
Andrew D. Ball
勃安足


More information about the TriLUG mailing list