[ovs-dev] [PATCH 2/4] xenserver: Restore XS5.5 compatibility for vif script.
Ian Campbell
Ian.Campbell at citrix.com
Wed Mar 17 11:32:14 UTC 2010
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)
Otherwise you could write a simple XenAPI client to get the record for
the OpaqueRef and this contains the UUID. It should only be a handful of
lines of python.
Ian.
More information about the dev
mailing list