Launch an instance from a non-glance image in OpenStack

573 views Asked by At

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 ?

1

There are 1 answers

1
Rodion On
  • 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.