Ask Your Question
0

"qcow2" image with Openstack in Multi Node System

asked 2014-03-24 13:40:52 -0600

bo-zhang gravatar image

updated 2014-03-25 05:39:15 -0600

Hello everyone,

In fact, I have posted a question here

And after I tried several times, I found it's just problem with "qcow2" image.

It's meaning that, I can't create an instance in a compute node with a "qcow2" image in Openstack environment.

My openstack is stable version havanna.

Has anyone else also meet this problem? Or give me some suggestion.

Thanks in advance. :-)

I download the image from here

I upload this "QCOW2" image to Glance by command

glance image-create --name ubuntu-13.04 --disk-format=qcow2 --container-format=bare --is-public=True < savanna-0.3-vanilla-1.2.1-ubuntu-13.04.qcow2

And in the terminal, it show this information

+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 9ab37ec9a13bb005639331c4275a308d     |
| container_format | bare                                 |
| created_at       | 2014-03-25T10:16:03                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 82a9dd69-9be1-4384-926f-13ee1069c483 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | ubuntu-13.04                         |
| owner            | 416f5d41e7df446b825b83dd12dc4a38     |
| protected        | False                                |
| size             | 897532416                            |
| status           | active                               |
| updated_at       | 2014-03-25T10:16:30                  |
+------------------+--------------------------------------+

And I confirm by nova image-list, it show

+--------------------------------------+---------------------------------+--------+--------+
| ID                                   | Name                            | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| 43a1675a-b2f6-42f5-8c59-75a8640a3e65 | cirros-0.3.1-x86_64-uec         | ACTIVE |        |
| 98b23ef1-7de6-4003-b45a-ff6d916f6543 | cirros-0.3.1-x86_64-uec-kernel  | ACTIVE |        |
| 1900383e-67f3-441e-aea0-e293898bf292 | cirros-0.3.1-x86_64-uec-ramdisk | ACTIVE |        |
| 82a9dd69-9be1-4384-926f-13ee1069c483 | ubuntu-13.04                    | ACTIVE |        |
+--------------------------------------+---------------------------------+--------+--------+

I think I have successed to create an image of type "QCOW2".

Then I'm going to create an instance in compute node:

+----+-----------------------------+
| ID | Hypervisor hostname         |
+----+-----------------------------+
| 1  | HP-Z400-Workstation         |
| 2  | spirals-HP-Z400-Workstation |
+----+-----------------------------+

"HP-Z400-Workstation" is contorller node, and other is compute node.

Now, I began to create instance in compute node by bellow command:

nova boot --flavor cluster --image 82a9dd69-9be1-4384-926f-13ee1069c483 --availability-zone nova:spirals-HP-Z400-Workstation ubuntu-13.04

(cluster is a flavor created by my self.) It show:

+--------------------------------------+-----------------------------------------------------+
| Property                             | Value                                               |
+--------------------------------------+-----------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                              |
| OS-EXT-AZ:availability_zone          | nova                                                |
| OS-EXT-SRV-ATTR:host                 | -                                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                   |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000009                                   |
| OS-EXT-STS:power_state               | 0                                                   |
| OS-EXT-STS:task_state                | scheduling                                          |
| OS-EXT-STS:vm_state                  | building                                            |
| OS-SRV-USG:launched_at               | -                                                   |
| OS-SRV-USG:terminated_at             | -                                                   |
| accessIPv4                           |                                                     |
| accessIPv6                           |                                                     |
| adminPass                            | tRttT349Kwn9                                        |
| config_drive                         |                                                     |
| created                              | 2014-03-25T10:33:28Z                                |
| flavor                               | cluster (bfb71d38-2065-4387-9490-0e64a8ef5997)      |
| hostId                               |                                                     |
| id                                   | 6ab84f26-94bf-4e8d-b153-7138626ef1ce                |
| image                                | ubuntu-13.04 (82a9dd69-9be1-4384-926f-13ee1069c483) |
| key_name                             | -                                                   |
| metadata                             | {}                                                  |
| name                                 | ubuntu-13.04                                        |
| os-extended-volumes:volumes_attached | []                                                  |
| progress                             | 0                                                   |
| security_groups                      | default                                             |
| status                               | BUILD                                               |
| tenant_id                            | 416f5d41e7df446b825b83dd12dc4a38                    |
| updated                              | 2014-03-25T10:33:28Z                                |
| user_id                              | 2ce751dcb5cb473791ab58107ce8b9ee                    |
+--------------------------------------+-----------------------------------------------------+

But in nova list, it show:

+--------------------------------------+--------------+--------+------------+-------------+----------+
| ID                                   | Name         | Status | Task State | Power State | Networks |
+--------------------------------------+--------------+--------+------------+-------------+----------+
| 6ab84f26-94bf-4e8d-b153-7138626ef1ce | ubuntu-13.04 | ERROR  | -          | NOSTATE     |          |
+--------------------------------------+--------------+--------+------------+-------------+----------+

I check the detail information by nova show. It give me the bellow information:

+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property                             | Value                                                                                                                                                                                                               |
+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                                                                                                                                                                              |
| OS-EXT-AZ:availability_zone          | nova                                                                                                                                                                                                                |
| OS-EXT-SRV-ATTR:host                 | spirals-HP-Z400-Workstation                                                                                                                                                                                         |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | spirals-HP-Z400-Workstation                                                                                                                                                                                         |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000009                                                                                                                                                                                                   |
| OS-EXT-STS:power_state               | 0                                                                                                                                                                                                                   |
| OS-EXT-STS:task_state                | -                                                                                                                                                                                                                   |
| OS-EXT-STS:vm_state                  | error                                                                                                                                                                                                               |
| OS-SRV-USG:launched_at               | -                                                                                                                                                                                                                   |
| OS-SRV-USG:terminated_at             | -                                                                                                                                                                                                                   |
| accessIPv4                           |                                                                                                                                                                                                                     |
| accessIPv6                           |                                                                                                                                                                                                                     |
| config_drive                         |                                                                                                                                                                                                                     |
| created                              | 2014-03-25T10:33:28Z                                                                                                                                                                                                |
| fault                                | {"message": "'ascii' codec can't encode character u'\\xe8' in position 28: ordinal not in range(128)", "code": 500, "details": "  File \"/opt/stack/nova/nova/compute/manager.py\", line 258, in decorated_function |
|                                      |     return function(self, context, *args, **kwargs)                                                                                                                                                                 |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1630, in run_instance                                                                                                                                      |
|                                      |     do_run_instance()                                                                                                                                                                                               |
|                                      |   File \"/opt/stack/nova/nova/openstack/common/lockutils.py\", line 246, in inner                                                                                                                                   |
|                                      |     return f(*args, **kwargs)                                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1629, in do_run_instance                                                                                                                                   |
|                                      |     legacy_bdm_in_spec)                                                                                                                                                                                             |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 968, in _run_instance                                                                                                                                      |
|                                      |     notify(\"error\", msg=unicode(e))  # notify that build failed                                                                                                                                                   |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 952, in ...
(more)
edit retag flag offensive close merge delete

Comments

As far as I can see, you correctly import image into glance.

Did you try to redownload the image? I've seen images which didn't boot because they were corrupted. Though the errors were never that strange. In my case instances simply hung with message 'Booting from hard drive'

dmitrymex gravatar imagedmitrymex ( 2014-03-25 16:18:05 -0600 )edit

In these days, I have tried for several times, redownload the image, or create image by myself. But it doesn't work.

But in the error log, I found "'ascii' codec can't encode character u'\\xe8' ", normally there should be u'\xe8'. I found there is two "\". May be it's not the cause

bo-zhang gravatar imagebo-zhang ( 2014-03-28 10:11:49 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-03-24 15:50:04 -0600

larsks gravatar image

You will need to provide us with more information to properly diagnose the problem. Start by showing us exactly the command you use to upload the image to OpenStack. Do not type this information, copy and paste the exact command that you use. Show us the output of the command as well. When uploading the image, make sure that you correctly specify the image format:

glance image-create --disk-format qcow2 --container-format bare --is-public True \
  --name cirros --copy-from http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img

Now, show us the exact command you use to boot an instance from that image.

Look in /var/log/nova/compute.log on the compute host. Are there any error messages in the log that were logged in response to booting the image? Show us those errors (not the whole log file).

There are many people successfully using qcow2 images with OpenStack, both with Havana and with earlier versions. With appropriate diagnostic information from your environment we can probably figure out what's going on.

edit flag offensive delete link more

Comments

I have modified my question, I think maybe you can get more information from that. For the information of flavor "cluster", I create it from dashboard, and I can use it to create instance in Controller Node, I think it won't be a problem. Thanks a lot :-)

the information from nova flavor-list is :

+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID                                   | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1                                    | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 2                                    | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3                                    | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4                                    | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 42                                   | m1.nano   | 64        | 0    | 0         |      | 1     | 1.0         | True      |
| 5                                    | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
| 84                                   | m1.micro  | 128       | 0    | 0         |      | 1     | 1.0         | True      |
| bfb71d38-2065-4387-9490-0e64a8ef5997 | cluster   | 2047      | 20   | 0         |      | 2     | 1.0         | True      |
+--------------------------------------+-----------+-----------+------+-----------+------+-------+-------------+-----------+
bo-zhang gravatar imagebo-zhang ( 2014-03-25 05:44:03 -0600 )edit
0

answered 2014-03-31 09:52:57 -0600

bo-zhang gravatar image

updated 2014-03-31 09:54:00 -0600

Hello everyone,

I have solved my problem.

It's caused by different system language. (My controller node install ubuntu 12.04 english, but my compute node install ubuntu 12.04 french!!)

When I use another english compute node, there is no this problem.

i have tried for several times.

But I don't understand why it just give the problem to "qcow2".

Then I reinstall my french node to english. The problem has gone.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-03-24 13:40:52 -0600

Seen: 427 times

Last updated: Mar 31 '14