[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Creating new VBDs


  • To: xen-api <xen-api@xxxxxxxxxxxxx>
  • From: Koldo Aingeru Marcos Fernández <koldo.aingeru@xxxxxxxxxx>
  • Date: Fri, 8 Mar 2013 13:27:11 +0100
  • Delivery-date: Fri, 08 Mar 2013 12:27:38 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

Hello all,

I'm trying to create a new VDB with the xmlrpc api (session.xenapi.VBD.create), and I'm constantly getting an "ErrorDescription" exception.

Is there a minimal config needed for a new VDB? witch I'm trying to do is attach a new VDI to a new VM.


Currently I'm trying to create with this data which I think that is correct:

{'bootable': True, 'userdevice': '0', 'other_config': {}, 'VM': 'OpaqueRef:84a19705-8bfe-22f3-a802-99b2e9a00f39', 'qos_supported_algorithms': [], 'device': 'xvda', 'mode': 'RW', 'VDI': 'OpaqueRef:2371d43b-6736-fc12-49a2-79c803358c7b', 'qos_algorithm_type': '', 'type': 'Disk', 'qos_algorithm_params': {}, 'empty': False, 'unpluggable': True}


And the python code i'm using (I've checked with the one from openstack and a couple of other sources and seems OK to me):


vm = session.xenapi.VM.clone(template, vm_name) <-- this works great an the vm is generated correctly

new_vdi = session.xenapi.VDI.copy(vbd_data["VDI"],destination_sr) <--- this works as well generating a new VDI

<here I resize and rename the VDI>

new_vbd_conf = {}
new_vbd_conf['VM'] = vm
new_vbd_conf['VDI'] = new_vdi
new_vbd_conf['bootable'] = True
new_vbd_conf['type'] = 'Disk'
new_vbd_conf['device'] = 'xvda'
new_vbd_conf['userdevice'] = '0'
new_vbd_conf['mode'] = 'RW'
new_vbd_conf['unpluggable'] = True
new_vbd_conf['empty'] = False
new_vbd_conf['other_config'] = {}
new_vbd_conf['qos_algorithm_type'] = ''
new_vbd_conf['qos_algorithm_params'] = {}
new_vbd_conf['qos_supported_algorithms'] = []
                
new_vbd = session.xenapi.VBD.create(new_vbd_conf)


Kind regards!

PS. This is the actual traceback of the error: http://pastebin.com/ZaQfBC2n



========================================
Koldo Aingeru Marcos Fdez.  
Ingeniería de Sistemas
Sarenet S.A.
944209470
Parque Tecnológico, Edificio 103
48170 Zamudio, Bizkaia
Twitter: @Sarenet
========================================



_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.