OpenStack Compute (Nova)

Glance and xenapi

Asked by Kamil Gardziejczyk on 2012-03-02

Hello,

I can`t run VM because of glance problem...I don`t know whats going on...before, everything works fine...

2012-03-02 09:16:39,377 DEBUG nova.virt.xenapi.vm_utils [-] Created VDI OpaqueRef:362ee549-ce9d-6c03-70f3-d07c9b267c7e (Glance image 3, 524320256, False) on OpaqueRef:5001f4f6-47af-fde8-75db-d10ec4134140. from (pid=767) create_vdi /usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py:313
2012-03-02 09:16:39,397 DEBUG nova.virt.xenapi.vm_utils [-] Creating VBD for VDI OpaqueRef:362ee549-ce9d-6c03-70f3-d07c9b267c7e ... from (pid=767) with_vdi_attached_here /usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py:1038
2012-03-02 09:16:39,421 ERROR nova.virt.xenapi.vm_utils [-] instance 35: Failed to fetch glance image
(nova.virt.xenapi.vm_utils): TRACE: Traceback (most recent call last):
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py", line 570, in _fetch_image_glance_disk
(nova.virt.xenapi.vm_utils): TRACE: lambda dev:
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py", line 1039, in with_vdi_attached_here
(nova.virt.xenapi.vm_utils): TRACE: vbd_ref = session.get_xenapi().VBD.create(vbd_rec)
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/local/lib/python2.7/dist-packages/XenAPI.py", line 229, in __call__
(nova.virt.xenapi.vm_utils): TRACE: return self.__send(self.__name, args)
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/local/lib/python2.7/dist-packages/XenAPI.py", line 133, in xenapi_request
(nova.virt.xenapi.vm_utils): TRACE: result = _parse_result(getattr(self, methodname)(*full_params))
(nova.virt.xenapi.vm_utils): TRACE: File "/usr/local/lib/python2.7/dist-packages/XenAPI.py", line 203, in _parse_result
(nova.virt.xenapi.vm_utils): TRACE: raise Failure(result['ErrorDescription'])
(nova.virt.xenapi.vm_utils): TRACE: Failure: ['INVALID_DEVICE', 'autodetect']
(nova.virt.xenapi.vm_utils): TRACE:
2012-03-02 09:16:39,422 ERROR nova.virt.xenapi.vmops [-] instance 35: Failed to spawn
(nova.virt.xenapi.vmops): TRACE: Traceback (most recent call last):
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py", line 148, in spawn
(nova.virt.xenapi.vmops): TRACE: vdis = self._create_disks(context, instance)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py", line 142, in _create_disks
(nova.virt.xenapi.vmops): TRACE: disk_image_type)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py", line 427, in fetch_image
(nova.virt.xenapi.vmops): TRACE: session, instance, image, image_type)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vm_utils.py", line 602, in _fetch_image_glance_disk
(nova.virt.xenapi.vmops): TRACE: raise e
(nova.virt.xenapi.vmops): TRACE: Failure: ['INVALID_DEVICE', 'autodetect']
(nova.virt.xenapi.vmops): TRACE:
2012-03-02 09:16:39,423 DEBUG nova.virt.xenapi.vmops [-] Instance 35 failed to spawn - performing clean-up from (pid=767) spawn /usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py:155
2012-03-02 09:16:39,424 DEBUG nova.virt.xenapi.vmops [-] Resources to remove:[{'file': None, 'vdi_type': 'os', 'vdi_uuid': '61789950-a024-4fd8-9c71-4c70d770a421'}] from (pid=767) _handle_spawn_error /usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py:411
2012-03-02 09:16:39,437 DEBUG nova.virt.xenapi.vmops [-] Removing VDI OpaqueRef:362ee549-ce9d-6c03-70f3-d07c9b267c7e(uuid:61789950-a024-4fd8-9c71-4c70d770a421) from (pid=767) _handle_spawn_error /usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py:423
2012-03-02 09:16:40,509 INFO nova.virt.xenapi [-] Task [Async.VDI.destroy] OpaqueRef:a4b03bdf-cce4-7dab-856b-d66e79e19c21 status: success
2012-03-02 09:16:40,510 ERROR nova.compute.manager [-] Instance '35' failed to spawn. Is virtualization enabled in the BIOS? Details: ['INVALID_DEVICE', 'autodetect']
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 424, in _run_instance
(nova.compute.manager): TRACE: network_info, block_device_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi_conn.py", line 190, in spawn
(nova.compute.manager): TRACE: self._vmops.spawn(context, instance, network_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/xenapi/vmops.py", line 157, in spawn
(nova.compute.manager): TRACE: raise spawn_error
(nova.compute.manager): TRACE: Failure: ['INVALID_DEVICE', 'autodetect']
(nova.compute.manager): TRACE:

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Armando Migliaccio
Solved:
2012-03-03
Last query:
2012-03-03
Last reply:
2012-03-02

This is baffling.

The XenAPI failure message does not help at all unfortunately...however by looking at what the code is trying to do:

    this_vm_ref = get_this_vm_ref(session)
    vbd_rec = {}
    vbd_rec['VM'] = this_vm_ref
    vbd_rec['VDI'] = vdi_ref
    vbd_rec['userdevice'] = 'autodetect'
    vbd_rec['bootable'] = False
    vbd_rec['mode'] = read_only and 'RO' or 'RW'
    vbd_rec['type'] = 'disk'
    vbd_rec['unpluggable'] = True
    vbd_rec['empty'] = False
    vbd_rec['other_config'] = {}
    vbd_rec['qos_algorithm_type'] = ''
    vbd_rec['qos_algorithm_params'] = {}
    vbd_rec['qos_supported_algorithms'] = []
    LOG.debug(_('Creating VBD for VDI %s ... '), vdi_ref)
    vbd_ref = session.get_xenapi().VBD.create(vbd_rec)

It is possible that your nova-compute is a spurious state, e.g. there are too many VDIs attached to your nova-compute domU.

From the log, you got the Opaque references so you could possibly troubleshoot this by executing the snippet above (with appropriate code around it) in order to gather more information.

Try also:

xe vm-param-list uuid=<uuid of your nova-compute>

and see what it says.

HTH
Armando

BTW, this is DIABLO isn't it? It'd be useful to know, though I put the blame on Launchpad which does not let people TAG the questions

Yes, it`s diablo. You was right, it was problem with too many VDIs...

I have quasstion about networking in XenServer... It`s easy to set flat networking (fixed_ips)for VM in Openstack/KVM configuration. I`m trying do the same in XenServer but it doesn`t work...I can assign static ip from fixed_ip set, but if i want to do it ussing dhcp it failures...

What should I do to set fixed_ips using dhcp?

Can I kindly ask you to discuss networking with another question, as it is going to be a different topic?

Thanks,
Armando

Thanks Armando Migliaccio, that solved my question.