[ovs-dev] [PATCH 2/4] xenserver: Restore XS5.5 compatibility for vif script.

Ian Campbell Ian.Campbell at citrix.com
Wed Mar 17 16:53:01 UTC 2010


On Wed, 2010-03-17 at 16:50 +0000, Ben Pfaff wrote:
> On Wed, Mar 17, 2010 at 11:32:14AM +0000, Ian Campbell wrote:
> > On Wed, 2010-03-17 at 00:34 +0000, Justin Pettit wrote:
> > > On Mar 12, 2010, at 3:08 PM, Ben Pfaff wrote:
> > > 
> > > > +            # Get UUID for OpaqueRef:.  xe doesn't document any way to do this,
> > > > +            # but it can be made to print the uuid as part of an error message
> > > > +            # on vif-param-get.  The error message takes the form:
> > > 
> > > Yuck!
> > 
> > Yeah ;-)
> > 
> > Given that you know the name is vif${DOMID}.${DEVID} where DOMID and
> > DEVID are already set in the vif script I think you can get at the uuid
> > via xe in a few steps:
> > 
> >         VM=$(xe vm-list --minimal resident-on=$INSTALLATION_UUID dom-id=${DOMID})
> >         VIF=$(xe vif-list --minimal vm-uuid=$VM device=${DEVID}
> >         
> > (plus some error handling perhaps)
> 
> Hmm, we already have the vm-uuid available, so the latter command by
> itself is sufficient.
> 
> Thanks, that's much better.

One thing to note is that $DEVID is not valid for tap devices on 5.5 (it
erroneously counts from 0 the number of emulated devices instead of
reflecting VIF.device from the XenAPI).

$DEVID is correct from 5.6 onwards.

It may be that you aren't worried about this field for a tap device and
we should only call this stuff for vif devices?

Ian.






More information about the dev mailing list