Instance did not start and its state says error

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux OpenStack Platform 4.0

Issue

  • When an instance is created via the Horizon UI, it fails to start and the only infomration provided by Horizon is that the instance is in an "error" state.
    Horizon error

Resolution

  • The Horizon UI does not give information about why an instance is in error state. The following are the starting places to look at to get more information about why an instance ends up in "error state"
  • Use nova show <servername or UUID> to get more infomratino about the error state.
# nova show test
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| Property                             | Value                                                                                                                          |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
| status                               | ERROR                                                                                                                          |
| updated                              | 2014-04-24T19:06:49Z                                                                                                           |
| OS-EXT-STS:task_state                | migrating                                                                                                                      |
| OS-EXT-SRV-ATTR:host                 | migrate-test-compute-1.openstack.gsslab.rdu2.redhat.com                                                                        |
| key_name                             | None                                                                                                                           |
| image                                | cirros (2f58f826-0dea-410d-9065-b65741de7b65)                                                                                  |
| hostId                               | f3cad3ffcb2416531b9a89fc1c35db03221bcbea00c6a87907586036                                                                       |
| OS-EXT-STS:vm_state                  | error                                                                                                                          |
| OS-EXT-SRV-ATTR:instance_name        | instance-0000001a                                                                                                              |
| OS-SRV-USG:launched_at               | 2014-04-24T19:01:42.000000                                                                                                     |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | migrate-test-compute-1.openstack.gsslab.rdu2.redhat.com                                                                        |
| flavor                               | m1.tiny (1)                                                                                                                    |
| id                                   | b8a4595f-e691-4217-b3ce-7943b7d4a6c8                                                                                           |
| security_groups                      | [{u'name': u'default'}]                                                                                                        |
| OS-SRV-USG:terminated_at             | None                                                                                                                           |
| user_id                              | 1faba7a484c24610a2f52d7e133b8819                                                                                               |
| name                                 | test                                                                                                                           |
| created                              | 2014-04-24T18:59:16Z                                                                                                           |
| tenant_id                            | ccbf225852e740c1a7051dc206154749                                                                                               |
| test network                         | 9.9.9.2                                                                                                                        |
| OS-DCF:diskConfig                    | MANUAL                                                                                                                         |
| metadata                             | {}                                                                                                                             |
| os-extended-volumes:volumes_attached | []                                                                                                                             |
| accessIPv4                           |                                                                                                                                |
| accessIPv6                           |                                                                                                                                |
| fault                                | {u'message': u"Unacceptable CPU info: CPU doesn't have compatibility.                                                          |
|                                      |                                                                                                                                |
|                                      | 0                                                                                                                              |
|                                      |                                                                                                                                |
|                                      | Refer to http://libvirt.org/html/libvirt-libvirt.html#virCPUCompareResult", u'code': 400, u'created': u'2014-04-24T19:06:49Z'} |
| OS-EXT-STS:power_state               | 1                                                                                                                              |
| OS-EXT-AZ:availability_zone          | nova                                                                                                                           |
| config_drive                         |                                                                                                                                |
+--------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+
  • You can also look at the /var/log/nova/scheduler.log
2014-04-23 21:32:02.686 2034 ERROR nova.scheduler.filter_scheduler [req-a772bf8f-fdd0-4fc5-a1fb-1c8979951a48 1faba7a484c24610a2f52d7e133b8819 ccbf225852e740c1a7051dc206154749] [instance: 85914ee6-e86f-4aed-900d-a8f3fbaca85f] Error from last host: migrate-test-compute-2.openstack.gsslab.rdu2.redhat.com (node migrate-test-compute-2.openstack.gsslab.rdu2.redhat.com): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1043, in _build_instance\n    set_access_ip=set_access_ip)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1426, in _spawn\n    LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u'  File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1423, in _spawn\n    block_device_info)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2084, in spawn\n    admin_pass=admin_password)\n', u'  File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 2334, in _create_image\n    fileutils.ensure_tree(basepath(suffix=\'\'))\n', u'  File "/usr/lib/python2.6/site-packages/nova/openstack/common/fileutils.py", line 38, in ensure_tree\n    os.makedirs(path)\n', u'  File "/usr/lib64/python2.6/os.py", line 157, in makedirs\n    mkdir(name, mode)\n', u"OSError: [Errno 13] Permission denied: '/var/lib/nova/instances/85914ee6-e86f-4aed-900d-a8f3fbaca85f/'\n"]

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments