Changes to the handling of local storage for the libvirt driver
Posted on March 15, 2012 by Alexander Petrovich
Currently Libvirt and Xen virtualisation drivers for OpenStack Nova handle local storage differently. The amount of of local space reserved for an instance is determined by the instance type (i.e. flavor) and known as local_gb, here comes the difference.
The Libvirt backend:
- Downloads the image from glance
- Tries to resize this image to 10GB (can be adjusted using
--minimum_root_size flag) - Attaches a second disk (known as
disk.local)with the size oflocal_gbto the instance
The Xen driver:
- Downloads the image from glance
- Creates a vdi from this image
- Resizes a vdi to the size of
local_gb
We decided to add to the Libvirt backend optional ability to work the same way as Xen backend does:
- Download image from glance
- Create and resize a new image or LVM volume (depends from local image type, see Using LVM as disk storage for OpenStack )
To enable this strategy you need to add --disable_disk_local=true flag to yournova.conf. The drawback of this strategy is that you cannot use m1.tiny flavor anymore because it has the local_db set to zero. All other flavors work properly.







