Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"qcow2" image with Openstack in Multi Node System

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. :-)

"qcow2" image with Openstack in Multi Node System

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 _run_instance                                                                                                                                      |
|                                      |     instance, image_meta, legacy_bdm_in_spec)                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1043, in _build_instance                                                                                                                                   |
|                                      |     set_access_ip=set_access_ip)                                                                                                                                                                                    |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1426, in _spawn                                                                                                                                            |
|                                      |     LOG.exception(_('Instance failed to spawn'), instance=instance)                                                                                                                                                 |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1423, in _spawn                                                                                                                                            |
|                                      |     block_device_info)                                                                                                                                                                                              |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 2084, in spawn                                                                                                                                         |
|                                      |     admin_pass=admin_password)                                                                                                                                                                                      |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 2389, in _create_image                                                                                                                                 |
|                                      |     project_id=instance['project_id'])                                                                                                                                                                              |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 174, in cache                                                                                                                                    |
|                                      |     *args, **kwargs)                                                                                                                                                                                                |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 337, in create_image                                                                                                                             |
|                                      |     copy_qcow2_image(base, self.path, size)                                                                                                                                                                         |
|                                      |   File \"/opt/stack/nova/nova/openstack/common/lockutils.py\", line 246, in inner                                                                                                                                   |
|                                      |     return f(*args, **kwargs)                                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 303, in copy_qcow2_image                                                                                                                         |
|                                      |     disk.extend(target, size, use_cow=True)                                                                                                                                                                         |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/api.py\", line 141, in extend                                                                                                                                               |
|                                      |     if not is_image_partitionless(image, use_cow):                                                                                                                                                                  |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/api.py\", line 181, in is_image_partitionless                                                                                                                               |
|                                      |     fs.setup()                                                                                                                                                                                                      |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/vfs/localfs.py\", line 83, in setup                                                                                                                                         |
|                                      |     LOG.debug(_(\"Failed to mount image %(ex)s)\"), {'ex': str(e)})                                                                                                                                                 |
|                                      | ", "created": "2014-03-25T10:34:16Z"}                                                                                                                                                                               |
| flavor                               | cluster (bfb71d38-2065-4387-9490-0e64a8ef5997)                                                                                                                                                                      |
| hostId                               | 6c2e7ef556187148241f30f0f490b70541ab85f0c7c45c5c3d29668d                                                                                                                                                            |
| 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 | []                                                                                                                                                                                                                  |
| security_groups                      | default                                                                                                                                                                                                             |
| status                               | ERROR                                                                                                                                                                                                               |
| tenant_id                            | 416f5d41e7df446b825b83dd12dc4a38                                                                                                                                                                                    |
| updated                              | 2014-03-25T10:34:16Z                                                                                                                                                                                                |
| user_id                              | 2ce751dcb5cb473791ab58107ce8b9ee                                                                                                                                                                                    |
+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

If you need another information again, please tell me.

Thanks in advance. :-)