I have VM images stored locally on my system. Is there any way I could launch the instances without uploading them to glance or using them as Cinder volumes ?
Asked
Active
Viewed 516 times
1 Answers
0
First, you must check type of existing VM image, you can use
qemu-img info {image_path}
for that purpose, and then create cinder volume with size of RAW image (qemu-img info show it).Second, if image type has RAW type, run:
dd if={image_path} of={volume_path-volume_id}
,
if image has other format do:
qemu-img convert -O raw {image_path} {volume_path-volume_id}.
Third, you must set bootable flag for this volume (with command-line or horizon).
Fourthly, boot instance from this volume.
{image_path}
- is path to VM image on file system, like:
/tmp/images/my-vm-image.iso
{volume_path-volume_id}
- is path to cinder volume on file system, like:
/dev/mapper/data-volume--blabla--cinder--volume--id
for LVM or /mnt/nfs/volume-blabla-cinder-volume-id
for NFS.

Rodion
- 1
- 1
-
Thanks. This is exactly what I did. However, I do not want to "dd" to the volume. Is there any way could tweak the cinder/nova code so directly pick up the images located locally ? – Manoj Hirway Jun 24 '15 at 06:52