<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Got a bounce the first time.  Attempting a resend</div><br>On Jun 21, 2011, at 9:55 PM, <<a href="mailto:masumotok@nttdata.co.jp">masumotok@nttdata.co.jp</a>> <<a href="mailto:masumotok@nttdata.co.jp">masumotok@nttdata.co.jp</a>> wrote:<br><br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have a question about nova.virt.libvirt.connection.snapshot().<br></blockquote><blockquote type="cite">In my understandings, this method is currently used for saving(cloning) VM images and upload cloned image to Glance.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Q1) Is there any reason why method name is snapshot() , not image_create or image_save or something?<br></blockquote><blockquote type="cite">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...)<br></blockquote><br>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.<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Q2) In current implementation original disk size is bigger after nova image-create. Please see below.<br></blockquote><br>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.<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">[before image-create]<br></blockquote><blockquote type="cite">root@testhost:/opt/openstack/instances/instance-00000015# ls -l <br></blockquote><blockquote type="cite">total 151580<br></blockquote><blockquote type="cite">-rw-r----- 1 libvirt-qemu kvm       2889 2011-06-23 11:53 console.log<br></blockquote><blockquote type="cite">-rw-r--r-- 1 libvirt-qemu kvm  155189248 2011-06-23 11:56 disk<br></blockquote><blockquote type="cite">-rw-r--r-- 1 libvirt-qemu kvm    6291968 2011-06-23 11:50 disk.local<br></blockquote><blockquote type="cite">-rw-r--r-- 1 root         root      1728 2011-06-23 11:49 libvirt.xml<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[after image-create]<br></blockquote><blockquote type="cite">root@testhost:/opt/openstack/instances/instance-00000015# ls -l<br></blockquote><blockquote type="cite">total 3734664<br></blockquote><blockquote type="cite">-rw-r----- 1 libvirt-qemu kvm        2889 2011-06-23 11:53 console.log<br></blockquote><blockquote type="cite">-rw-r--r-- 1 libvirt-qemu kvm   603979776 2011-06-23 13:02 disk<br></blockquote><blockquote type="cite">-rw-r--r-- 1 root         root     197120 2011-06-23 12:11 disk.diff<br></blockquote><blockquote type="cite">-rw-r--r-- 1 libvirt-qemu kvm    10486272 2011-06-23 12:59 disk.local<br></blockquote><blockquote type="cite">-rw-r--r-- 1 root         root       1728 2011-06-23 11:49 libvirt.xml<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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?<br></blockquote><blockquote type="cite">a) taking diff backup: qemu-img create -b disk -f qcow2 disk.diff<br></blockquote><blockquote type="cite">b) convert : qemu-img convert -f -O qcow2 disk.diff new_img<br></blockquote><br>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?<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Disk size is not bigger this way. In addition, if --use_cow_image=False, this way can be used.<br></blockquote><blockquote type="cite">Any opinion on this? If I misunderstand somehow, please let me know.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Regards, <br></blockquote><blockquote type="cite">Kei<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br></blockquote><blockquote type="cite">Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br></blockquote><blockquote type="cite">Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br></blockquote><blockquote type="cite">More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></blockquote><div><br></div></body></html>