[Openstack] snapshot question

Vishvananda Ishaya vishvananda at gmail.com
Wed Jun 29 18:17:06 UTC 2011


Got a bounce the first time.  Attempting a resend

On Jun 21, 2011, at 9:55 PM, <masumotok at nttdata.co.jp> <masumotok at nttdata.co.jp> wrote:

> Hello,
> 
> I have a question about nova.virt.libvirt.connection.snapshot().
> In my understandings, this method is currently used for saving(cloning) VM images and upload cloned image to Glance.
> 
> Q1) Is there any reason why method name is snapshot() , not image_create or image_save or something?
> I am just wondering if there will be additional work to add VMWare-like snapshotting(meaning taking snapshot many times, user can select one of them, and VM state can get back...)

This is solely because of the definition of rackspace in the OS api which is take an instance and back it up externally into glance.
> 
> Q2) In current implementation original disk size is bigger after nova image-create. Please see below.

This is actually a bug imo.  The snapshot in the kvm driver creates an internal snapshot, then exports it using qemu-img.  This should delete the internal snapshot after it is done exporting.  Also we should probably switch to using qemu-img snapshot instead of libvirt driver savevm because we don't need to be saving the memory to disk.

> 
> [before image-create]
> root at testhost:/opt/openstack/instances/instance-00000015# ls -l 
> total 151580
> -rw-r----- 1 libvirt-qemu kvm       2889 2011-06-23 11:53 console.log
> -rw-r--r-- 1 libvirt-qemu kvm  155189248 2011-06-23 11:56 disk
> -rw-r--r-- 1 libvirt-qemu kvm    6291968 2011-06-23 11:50 disk.local
> -rw-r--r-- 1 root         root      1728 2011-06-23 11:49 libvirt.xml
> 
> [after image-create]
> root at testhost:/opt/openstack/instances/instance-00000015# ls -l
> total 3734664
> -rw-r----- 1 libvirt-qemu kvm        2889 2011-06-23 11:53 console.log
> -rw-r--r-- 1 libvirt-qemu kvm   603979776 2011-06-23 13:02 disk
> -rw-r--r-- 1 root         root     197120 2011-06-23 12:11 disk.diff
> -rw-r--r-- 1 libvirt-qemu kvm    10486272 2011-06-23 12:59 disk.local
> -rw-r--r-- 1 root         root       1728 2011-06-23 11:49 libvirt.xml
> 
> That means if any sensitive users do "nova-image create", compute node original image size is bigger and compute node disk size available is decreasing. So I would like to ask, the below operation is inappropriate here?
> a) taking diff backup: qemu-img create -b disk -f qcow2 disk.diff
> b) convert : qemu-img convert -f -O qcow2 disk.diff new_img

This is another option.  I think this is functionally equivalent to the above option using qemu-img snapshot except it uses an external file.  There might be a performance penalty to converting from a backing file that is still active though?
> 
> Disk size is not bigger this way. In addition, if --use_cow_image=False, this way can be used.
> Any opinion on this? If I misunderstand somehow, please let me know.
> 
> Regards, 
> Kei
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20110629/6451939a/attachment.html>


More information about the Openstack mailing list