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!
======================================== Koldo Aingeru Marcos Fdez. Ingeniería de Sistemas Sarenet S.A. 944209470 Parque Tecnológico, Edificio 103 48170 Zamudio, Bizkaia Twitter: @Sarenet ========================================
|