On Fri, Nov 28, 2008 at 01:46:17PM +0000, David Edmondson wrote:

> On Fri, Nov 28, 2008 at 04:07:18PM +0300, Vasiliy Baranov wrote:
> > Is it possible to programmatically determine the VNIC created for
> > and used by a PV guest? From a shell script? I am looking at the
> > /usr/lib/xen/scripts/vif-vnic script but have no ideas so far.
> 
> If you know the domid of the guest then you can find it in xenstore
> (vif-vnic writes it as 'nic').

In particular, courtesy of ~johnlev/bin/dom2vnic:

#!/bin/bash

test -n "$1" || exit 1

id=`virsh domid $1`
backend=`xenstore-read /local/domain/$id/device/vif/0/backend`
echo `xenstore-read $backend/nic`


regards
john
_______________________________________________
xen-discuss mailing list
[email protected]

Reply via email to