This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-API] The method Pool.create_VLAN_from_PIF does not work

To: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] The method Pool.create_VLAN_from_PIF does not work
From: Владислав Григорьев <wadic@xxxxxxxxxxxxx>
Date: Wed, 21 Sep 2011 12:20:43 +0000
Accept-language: ru-RU, en-US
Delivery-date: Wed, 21 Sep 2011 05:21:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acx4WNu6J+U4bmLQSeSeajvNSxZgpw==
Thread-topic: The method Pool.create_VLAN_from_PIF does not work


I’m using XenAPI .NET library to create external interface on XenServer. Here is my code:


// creating session to hypervisor



// creating new network

XenAPI.Network xnet = new XenAPI.Network();

xnet.name_description = this.Domain.Name;

xnet.name_label = "vlan" + vlan.ToString();

XenRef<XenAPI.Network> xnet1 = XenAPI.Network.create(hypervisor.session, xnet);


// get device for new vlan bridging

var eth = PIF.get_all_records(hypervisor.session).Values.Where(v => v.VLAN == -1 && v.device == dev).FirstOrDefault();


// get created network object

var net = XenAPI.Network.get_record(hypervisor.session, xnet1.opaque_ref);


// create vlan interface

List<XenRef<PIF>> pifs = Pool.create_VLAN_from_PIF(hypervisor.session, eth.uuid, net.uuid, (long)vlan);


At this place I have an exception like this:

“Object has been deleted.PIF:a21c28df-d6e8-0980-075d-014bd9cd666e”


I have checked that the objects and eth net have the correct uuid. When I use xe command to create vlan interface with same values  “xe pool-vlan-create pif_uuid=… network_uuid=… vlan=…”  - its works fine.

What’s wrong?


xen-api mailing list
<Prev in Thread] Current Thread [Next in Thread>