<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>+1 to the wonder</div><div><br></div><div>We could have more explicit check in Cinder.</div><div>Either check disk_format (it's None for volume-backed images)</div><div>or add to Glance a new container_format type for this kind of images (it's also None currently) and check it.</div><div><br></div><br><div><hr id="stopSpelling">From: sxmatch1986@gmail.com<br>Date: Mon, 27 Jul 2015 10:49:39 +0800<br>To: openstack-dev@lists.openstack.org<br>Subject: Re: [openstack-dev] [nova][cinder] Should we allow this kind of   action?<br><br><div dir="ltr">I wonder why user need to use this kind of image(vm snapshot) to create volume, and then use this volume to create a vm again. It's meaningless I think. On the other hand, if an image size is zero, cinder shouldn't allow to create this volume from image.</div><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">2015-07-27 9:39 GMT+08:00 Zhenyu Zheng <span dir="ltr"><<a href="mailto:zhengzhenyulixi@gmail.com" target="_blank">zhengzhenyulixi@gmail.com</a>></span>:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hi all,<div><br></div><div>Recently, I've been asked to perform this kind of action using OpenStack:<br><br></div><div>1. Launch an volume-backended instance.</div><div>2. Take a snapshot of this instance using nova image-create, an image will be added in glance, the size is zero, and the BDM will be saved in it's metadata.</div><div>3. Create an volume using this image (with Cinder), This volume will be marked with bootable.</div><div>4. Launch an new volume-backended instance using this newly built volume.</div><div><br></div><div>There will be errors performing this action:</div><div>1. Cinder will create an volume with zero size and the BDM saved in metadata is transformed from dict to string and it is not able to be used in nova for instance creation.</div><div>2. The BDM is provided by user with REST API, and it will be conflict with the BDM saved in metadata.</div><div><br></div><div>Now, my question is:</div><div>Should we allow this kind of action in Nova? Or should we only use the image directly for instance creation. </div><div>If this kind of action is not allowed, should we add checks in Cinder to forbid volume creation with an zero-sized image?</div><div><br></div><div>Thanks,</div><div><br></div><div>BR,</div><div>Zhenyu </div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="ecxgmail_signature"><pre>Best Wishes For You!</pre></div>
</div>
<br>__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</div>                                     </div></body>
</html>