fail to boot an instance because of "rbd import" qcow2 disk

Bug #1816686 reported by Boxiang Zhu on 2019-02-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Boxiang Zhu

Bug Description

OpenStack: master branch
Ceph: luminous

Steps to reproduce
1. Upload a qcow2 format image to glance such as a test qcow2 image `cirros`.
2. Use command to create a new instance: `openstack server create <server-name> --image <image-name> --flavor <flavor-name> --security-group <security-group-name> --availability-zone nova --network <network-name>`
3. After instance has been spawn successfully, we run command to get the console url: `openstack console url show <server-name>`
4. Open the browser and enter the console url, I see that the instance fails to boot.

Expected result
The instance succeeds to boot.

Actual result
The instance fails to boot.

When importing rbd volume from _base image file, the format of image file is qcow2. When using a qcow2 as root disk, the instance is spawned but fails to boot because data is accessed as raw.
So try to convent the image format when import it into rbd as raw.

Boxiang Zhu (bxzhu-5355) wrote :

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Boxiang Zhu (bxzhu-5355)
status: New → In Progress
Boxiang Zhu (bxzhu-5355) wrote :

The force_raw_images in nova.conf was False so the issue can be reproduced.

Fix proposed to branch: master

Change abandoned by Boxiang Zhu ( on branch: master
Reason: I just abandon this patch now. If there is something else to discuss, I will re-open it later. Thanks, @Eric.

Matt Riedemann (mriedem) on 2019-05-04
tags: added: libvirt rbd
tags: added: ceph
removed: rbd

Submitter: Zuul
Branch: master

commit 6c6ffc0476b56fe0bf822ddcf3c9a2d543912f38
Author: zhu.boxiang <>
Date: Fri Mar 1 16:16:31 2019 +0800

    Fix failure to boot instances with qcow2 format images

    Ceph doesn't support QCOW2 for hosting a virtual machine

    When we set image_type as rbd and force_raw_images as
    False and we don't launch an instance with boot-from-volume,
    the instance is spawned using qcow2 as root disk but
    fails to boot because data is accessed as raw.

    To fix this, we raise an error and refuse to start
    nova-compute service when force_raw_images and
    image_type are incompatible.
    When we import image into rbd, check the format of cache
    images. If the format is not raw, remove it first and
    fetch it again. It will be raw format now.

    Change-Id: I1aa471e8df69fbb6f5d9aeb35651bd32c7123d78
    Closes-Bug: 1816686

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments