Image registering in nova2ools

You (as a cloud client) couldn’t register your own image using python-nova-client  as you could do in euca2ools. But euca2ools is not native client for OpenStack and we decided to add this ability to our own OpenStack client – nova2ools.

Now you can register images for your own needs as a cloud client (not as a cloud admin. In that case you can register images using `nova manage`). There are three options:

  1. You register stand-alone image – that image does not depend on any other images
  2. You register ramdisk, kernel and rootfs images separately (three commands) – you should register ramdisk and kernel images at first. Then you register rootfs depending on these two images
  3. You register ramdisk, kernel and rootfs simultaneously (one command) – it simply registers these images in a single command. The result of this command is the same as in the second option but it is more convenient

For registering image perform the following command:

$ nova2ools-images register --path=<path to image in the local machine> --name=<image name> [--kernel=<kernel id> --ramdisk=<ramdisk id> --public=F]  —  here you can optionally define kernel and ramdisk you want your image be dependent on. Flag “public” determines whether image will be public (accessible by clients of any other projects) or private (accessible only within your project)

For registering images separately you can perform commands:

$ nova2ools-images register-ramdisk --path=<ramdisk path> --name=<image name>  — registering ramdisk image

$ nova2ools-images register-kernel --path=<kernel path> --name=<image name>  —  registering kernel image

$ nova2ools-images register --path=<rootfs path> --name=<image name>
--kernel=<kernel id> --ramdisk=<ramdisk id>
  —  registering final image

You can also do the same things in one command:

$ nova2ools-images register-all --image=<rootfs path> --kernel=<kernel path> --ramdisk=<ramdisk path> --name=<image name>  —  this is a good choice if you know all these three images at the time of image registering

Also there are some special things you should keep in mind to work with images properly:

  1. If your cloud uses Keystone as authentication service you have to specify USE_KEYSTONE=true environment variable in the client machine
  2. If Keystone is not using then you should manually specify GLANCE_URL environment variable

2 thoughts on “Image registering in nova2ools

Leave a reply to apevec Cancel reply