What I just did to successfully "boot from a volume":<div><br></div><div>1- Create a KVM Virtual Machine on top of a LVM Logical Volume of 2.5G as its HD (disk type block - /dev/volgrp0/vmname-disk0);</div><div><br>
</div><div>2- Install your favorite OS;</div><div><br></div><div>3- shutdown it;</div><div><br></div><div>4- make a image of it: dd if=/dev/volgrp0/vmname-disk0 of=myfavorite-os.img;</div><div><br></div><div>5- copy it to your Cinder server: scp myfavorite-os.img to the server where your "cinder-volumes LVM VG" resides;</div>
<div><br></div><div>6- make a volume of ~5G via Openstack Dashboard or CLI;</div><div><br></div><div>7- find your "cloud cinder volume" on the Cinder server: lvdisplay</div><div><br></div><div>8- import your 2.5G image (myfavorite-os.img) into your Cinder volume: dd if=/path/of/myfavorite-os.img of=/dev/cinder-volumes/volume-a2fb85b1-512e-402b-9aaf-6ce1914295a4;</div>
<div><br></div><div>9- start a instance using any image as source (cirros) and choose to boot from this volume (a2fb85b1-512e-402b-9aaf-6ce1914295a4). The image source (cirros) will be ignored, I think...</div><div><br></div>
<div>That's it!</div><div><br></div><div>NOTE: If you can run a KVM VM on the same server of your Cinder, you can shrink part of this procedure, by doing it more directly: "dd if=/dev/volgrp0/vmname-disk0 of=/dev/cinder-volumes/volume-a2fb85b1-512e-402b-9aaf-6ce1914295a4" on step 4 (your cinder volume must be ready on that point).</div>
<div><br></div><div>I prefer to make specific flavors to use with my "boot-from-volume" Instances.</div><div><br></div><div>Best!</div><div>Thiago<br><br><div class="gmail_quote">On 30 January 2013 13:06, Avishay Traeger <span dir="ltr"><<a href="mailto:AVISHAY@il.ibm.com" target="_blank">AVISHAY@il.ibm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lei Zhang <<a href="mailto:zhang.lei.fly@gmail.com">zhang.lei.fly@gmail.com</a>> wrote on 01/30/2013 04:39:22 PM:<br>
<div class="im">> I also have a question. What's the requirement for the image? I<br>
> found nothing int the doc.<br>
<br>
</div>Hi,<br>
The requirements that I can think of off the top of my head are:<br>
1. The image should be bootable<br>
2. The image is converted to raw before being written to the volume, so it<br>
should be a format the 'qemu-img' understands (raw, qcow2, vmdk, vdi)<br>
3. There must be sufficient space to write the raw version of the image<br>
<br>
Thanks,<br>
Avishay<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</div></div></blockquote></div><br></div>