This shows how a disk image is being used -- when nova boot a new virtual machine -- in the context of Openstack. 1/ List current running nova instances #=========# [tuser1@interceptor ~(keystone_user1)]$ nova list +--------------------------------------+-----------+--------+-------------------+ | ID | Name | Status | Networks | +--------------------------------------+-----------+--------+-------------------+ | 08d616a9-87a1-4c0d-b986-7d6aa5ed6780 | fedora-t1 | ACTIVE | net1=10.65.207.50 | | 3e487977-37e8-4f26-9443-d65ecbdf83c9 | fedora-t2 | ACTIVE | net1=10.65.207.51 | | 48d9e518-a91f-48db-9d9b-965b243e7113 | fedora-t4 | ACTIVE | net1=10.65.207.52 | +--------------------------------------+-----------+--------+-------------------+ [tuser1@interceptor ~(keystone_user1)]$ #=========# 2/ Do a "virsh list" too : #=========# [tuser1@interceptor ~(keystone_user1)]$ sudo virsh list Id Name State ---------------------------------------------------- 12 instance-0000000c running 13 instance-0000000d running 17 rhel63-tbox1 running 22 instance-00000012 running [tuser1@interceptor ~(keystone_user1)]$ #=========# 3/ Let's get the block device in use for a guest: #=========# [tuser1@interceptor ~(keystone_user1)]$ sudo virsh domblklist instance-0000000c Target Source ------------------------------------------------ vda /var/lib/nova/instances/instance-0000000c/disk [tuser1@interceptor ~(keystone_user1)]$ #=========# 4/ Let's get qemu-info of the disk in use by the guest -- to find path to its backing file. #=========# [tuser1@interceptor ~(keystone_user1)]$ qemu-img info /var/lib/nova/instances/instance-0000000c/disk image: /var/lib/nova/instances/instance-0000000c/disk file format: qcow2 virtual size: 20G (21474836480 bytes) disk size: 149M cluster_size: 65536 backing file: /var/lib/nova/instances/_base/06a057b9c7b0b27e3b496f53d1e88810a0d1d5d3_20 #=========# 5/ On boot, nova doe two things: [a] convert the qcow2 image to 'raw' sparse image & make it a base image (located in: /var/lib/nova/instances/_base) [b] expands the size of the base-image to 20GB [3] use this base image & instantiate an overlay to boot the instance. #=========# [tuser1@interceptor ~(keystone_user1)]$ qemu-img info /var/lib/nova/instances/_base/06a057b9c7b0b27e3b496f53d1e88810a0d1d5d3_20 image: /var/lib/nova/instances/_base/06a057b9c7b0b27e3b496f53d1e88810a0d1d5d3_20 file format: raw virtual size: 20G (21474836480 bytes) disk size: 740M [tuser1@interceptor ~(keystone_user1)]$ #=========# 6/ This's the original disk image added to glance: #=========# [tuser1@interceptor ~(keystone_user1)]$ ls -lash f17-x86_64-openstack-sda.qcow2 241M -rw-rw-r--. 1 tuser1 tuser1 241M Jan 13 2012 f17-x86_64-openstack-sda.qcow2 [tuser1@interceptor ~(keystone_user1)]$ #=========# Background info: ================ 1/ From nova's git log, the conversion from non 'raw' to 'raw' is tracked down to this commit #=========# commit ff9d353b2f4fee469e530fbc8dc231a41f6fed84 Author: Scott Moser Date: Mon Sep 19 16:57:44 2011 -0400 convert images that are not 'raw' to 'raw' during caching to node This uses 'qemu-img' to convert images that are not 'raw' to be 'raw'. By doing so, it a.) refuses to run uploaded images that have a backing image reference (LP: #853330, CVE-2011-3147) b.) ensures that when FLAGS.use_cow_images is False, and the libvirt xml written specifies 'driver_type="raw"' that the disk referenced is also raw format. (LP: #837102) c.) removes compression that might be present to avoid cpu bottlenecks (LP: #837100) It does have the negative side affect of using more space in the case where the user uploaded a qcow2 (or other advanced image format) that could have been used directly by the hypervisor. That could, later, be remedied by another 'qemu-img convert' being done to the "preferred" format of the hypervisor. #=========# 2/ Padraig Brady also pointed out this bz -- https://bugs.launchpad.net/nova/+bug/932180