cannot create virtual machine with nova boot

Asked by duypd

Hello everybody!

I have problem when creating virtual machine with command "nova boot", all virtual machines have status "ERROR".
Anybody help me?

root@ubuntu:~# nova list
+--------------------------------------+--------+--------+----------+
| ID | Name | Status | Networks |
+--------------------------------------+--------+--------+----------+
| 7d0e4bd1-5969-4184-b445-5ed84732be53 | test05 | ERROR | |
| 9224c35c-ff7b-4421-865f-0c58c6171da3 | test03 | ERROR | |
| cc914489-8962-4f2d-93f5-f924f421e0df | test06 | ERROR | |
| d2cce937-65fa-464e-9bf4-083622a42f2a | test04 | ERROR | |
| eb6647e3-d013-4b47-9bd4-1b1d3bb29047 | tst01 | ERROR | |
+--------------------------------------+--------+--------+----------+

root@ubuntu:~# nova --debug boot --flavor 1 --image b65635c2-f1af-4f43-a251-76fa45dd1f7c test06
connect: (localhost, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: localhost:5000\r\nContent-Length: 100\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Fri, 17 Aug 2012 08:56:35 GMT
header: Transfer-Encoding: chunked
connect: (172.16.15.200, 8774)
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/flavors/1 HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-14a5cf92-7719-4830-84fb-fa4a4d9046bc
header: Content-Type: application/json
header: Content-Length: 353
header: Date: Fri, 17 Aug 2012 08:56:35 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/images/b65635c2-f1af-4f43-a251-76fa45dd1f7c HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-27d0c3bf-1435-41fe-b7a2-eaf32be1bfe2
header: Content-Type: application/json
header: Content-Length: 697
header: Date: Fri, 17 Aug 2012 08:56:35 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/images/b65635c2-f1af-4f43-a251-76fa45dd1f7c HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-60941d4e-96ef-4e62-a227-436dd26afbef
header: Content-Type: application/json
header: Content-Length: 697
header: Date: Fri, 17 Aug 2012 08:56:35 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/flavors/1 HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-1ca76720-efce-4dda-8576-310a31b8458a
header: Content-Type: application/json
header: Content-Length: 353
header: Date: Fri, 17 Aug 2012 08:56:35 GMT
send: u'POST /v2/2326eb5b3d6f4ea5b4f2a973832a9366/servers HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nContent-Length: 132\r\nx-auth-project-id: admin\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\nuser-agent: python-novaclient\r\ncontent-type: application/json\r\n\r\n{"server": {"min_count": 1, "flavorRef": "1", "name": "test06", "imageRef": "b65635c2-f1af-4f43-a251-76fa45dd1f7c", "max_count": 1}}'
reply: 'HTTP/1.1 202 Accepted\r\n'
header: X-Compute-Request-Id: req-09a4f6c4-60e8-474e-b8de-83f5915c2a58
header: Location: http://172.16.15.200:8774/v2/2326eb5b3d6f4ea5b4f2a973832a9366/servers/cc914489-8962-4f2d-93f5-f924f421e0df
header: Content-Type: application/json
header: Content-Length: 400
header: Date: Fri, 17 Aug 2012 08:56:37 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/servers/cc914489-8962-4f2d-93f5-f924f421e0df HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-4c7ba190-54bb-4f4c-8f22-65bdcb9600b8
header: Content-Type: application/json
header: Content-Length: 1278
header: Date: Fri, 17 Aug 2012 08:56:37 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/flavors/1 HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-dd2141de-30c0-4b17-959b-4c7d0dd83c94
header: Content-Type: application/json
header: Content-Length: 353
header: Date: Fri, 17 Aug 2012 08:56:37 GMT
send: u'GET /v2/2326eb5b3d6f4ea5b4f2a973832a9366/images/b65635c2-f1af-4f43-a251-76fa45dd1f7c HTTP/1.1\r\nHost: 172.16.15.200:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 52731c6e3ca943d8bfb2bffc33e1096a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-0c235051-d467-4153-9e58-cc1ed1989b2a
header: Content-Type: application/json
header: Content-Length: 697
header: Date: Fri, 17 Aug 2012 08:56:37 GMT
+-------------------------------------+--------------------------------------+
| Property | Value |
+-------------------------------------+--------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000006 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | wXKau3Z9wMmz |
| config_drive | |
| created | 2012-08-17T08:56:36Z |
| flavor | m1.tiny |
| hostId | |
| id | cc914489-8962-4f2d-93f5-f924f421e0df |
| image | cirros-0.3.0-x86_64 |
| key_name | |
| metadata | {} |
| name | test06 |
| progress | 0 |
| status | BUILD |
| tenant_id | 2326eb5b3d6f4ea5b4f2a973832a9366 |
| updated | 2012-08-17T08:56:37Z |
| user_id | 28137e0f33dd4601953cc6f13a6ad5aa |
+-------------------------------------+--------------------------------------+

root@ubuntu:~# nova-manage service list
2012-08-16 10:28:15 DEBUG nova.utils [req-bf3c88d6-ff1e-49eb-ba76-dd9d4fff8692 None None] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.pyc'> from (pid=8153) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
Binary Host Zone Status State Updated_At
nova-consoleauth ubuntu nova enabled :-) 2012-08-16 03:28:10
nova-scheduler ubuntu nova enabled :-) 2012-08-16 03:28:09
nova-cert ubuntu nova enabled :-) 2012-08-16 03:28:24
nova-compute ubuntu nova enabled :-) 2012-08-16 03:28:24
nova-network ubuntu nova enabled :-) 2012-08-16 03:28:24

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ivar Lazzaro (mmaleckk) said :
#1

There are multiple possible reasons, you should start finding out what is the module generating the error. Run:

#nova show [vm name]

and see what type of error you get (networking, scheduling, so on...) after that, look at the log of that specific module and see if you can spot any exception or error message.

Revision history for this message
Yaguang Tang (heut2008) said :
#2

see the nova-compute log which the instance is schedulerd to

Revision history for this message
duypd (warsaw20062000) said :
#3

Hi maleck!

There are information that I follow you. Maybe scheduler problem and I look at nova-scheduler.log> I saw "Failed to schedule_run_instance: No valid host was found. Is the appropriate service running?", but I run command "nova-manage service list" nova-scheduler has status :-)

root@ubuntu:~# nova show test06
+-------------------------------------+--------------------------------------+
| Property | Value |
+-------------------------------------+--------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000006 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | error |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2012-08-17T08:56:36Z |
| flavor | m1.tiny |
| hostId | |
| id | cc914489-8962-4f2d-93f5-f924f421e0df |
| image | cirros-0.3.0-x86_64 |
| key_name | |
| metadata | {} |
| name | test06 |
| status | ERROR |
| tenant_id | 2326eb5b3d6f4ea5b4f2a973832a9366 |
| updated | 2012-08-17T08:56:37Z |
| user_id | 28137e0f33dd4601953cc6f13a6ad5aa |
+-------------------------------------+--------------------------------------+

In nova-scheduler.log:

2012-08-17 15:56:37 WARNING nova.scheduler.manager [req-09a4f6c4-60e8-474e-b8de-83f5915c2a58 28137e0f33dd4601953cc6f13a6ad5aa 2326eb5b3d6f4ea5b4f2a973832a9366] Failed to schedule_run_instance: No valid host was found. Is the appropriate service running?
2012-08-17 15:56:37 WARNING nova.scheduler.manager [req-09a4f6c4-60e8-474e-b8de-83f5915c2a58 28137e0f33dd4601953cc6f13a6ad5aa 2326eb5b3d6f4ea5b4f2a973832a9366] Setting instance cc914489-8962-4f2d-93f5-f924f421e0df to ERROR state.

root@ubuntu:~# nova-manage service list
2012-08-20 09:23:38 DEBUG nova.utils [req-fa9bc194-bddb-4c00-9b7a-a542fbc2041a None None] backend <module 'nova.db.sqlalchemy.api' from '/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.pyc'> from (pid=3168) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:658
Binary Host Zone Status State Updated_At
nova-consoleauth ubuntu nova enabled :-) 2012-08-20 02:23:44
nova-scheduler ubuntu nova enabled :-) 2012-08-20 02:23:59
nova-cert ubuntu nova enabled :-) 2012-08-20 02:24:10
nova-compute ubuntu nova enabled XXX 2012-08-16 11:51:06
nova-network ubuntu nova enabled :-) 2012-08-20 02:23:59

this is detail of nova-scheduler.log
http://pastebin.com/Rx2kmiw3

Revision history for this message
Ivar Lazzaro (mmaleckk) said :
#4

Hi,

Nova-scheduler is working well and you error, in fact, makes sense:

nova-compute ubuntu nova enabled XXX 2012-08-16 11:51:06

As you can see from the line above, Nova compute service is not running property. For this reason, the scheduler is unable to find a suited host for building the requested VM and raise an error (Because, roughly, only host with nova-compute running in it are the ones in which the VMs will be spawned).

Start nova-compute with the following:

service nova-compute start

then check the service status to see if it crashes at some point. If it does not, then you should probabli see ":-)" near nova-compute service using "nova-manage service list".

Otherwise, if the nova-compute service crashes (and it will most likely happen) you should find out why in happens. To do so read nova-compute logs, or else, run it with "strace -f nova-compute", when it stops read the debug informations and paste them here.

Revision history for this message
duypd (warsaw20062000) said :
#5

I will try again, thank you for your help, Maleck.

Can you help with this problem?

Provide an answer of your own, or ask duypd for more information if necessary.

To post a message you must log in.