Undertsanding the image related operations while spawning nova instance ?

In this article I am going to show how the image conversion took place in background while launching the instance. I have seen recently couple of issue in which instance is getting stuck in spawned status because conversion process of image from qcow2 to raw is taking hell amount of time.

Scenario 1 : qcow2 image stored in ceph pool. Launch an instance using that image.

  • qcow2 image will be downloaded.
  • Convert the image from qcow2 to raw format.
  • Boot the instance from raw image.

Scenario 2 : raw image stored in ceph pool. Launch an instance using that image.

  • Create a RBD (raw block device) point of image for this VM in ceph.
  • Boot an instance from that rbd pointer.

Remember to change the parameter (show_image_direct_url) to take the advantage of scenario 2, on all controller nodes.

grep -i show_image_direct_url /etc/glance/glance-api.conf

After changing the parameter from False to True you need to restart the glance-* service.

In scenario 2, we are saving the download and conversion time but the space taken by raw image is much higher than the qcow2 image. It’s kind of trade-off but still performance matters more than space in most of the environments.


Note : There are some discussion in upstream community to convert the qcow2 image to raw automatically while uploading the image to ceph pool.


References :




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s