Image Registration

Hi,
I just want to ask, if I’am registering Image with Opennebula and I select “Path in OpenNebula server” and point to stored Qcow Image. What operations will start after submit ? It will just register Image or there will be copy process started in order to copy image to selected datastore…

Is there some way to create/copy image to datastore location (let’s say over ssh) and then register it within sunstone or CLI ?

Thanks.

The “Path in OpenNebula server” is path in the front end that is whitelisted for de selected datastore to import image to. Check the SAFE_DIRS variable in the datastore configuration template. Defaults to /var/tmp/. After hitting submit /var/lib/one/remotes/datastores/<datastore mad>/stat is called to determine the size of the image that needs to be allocated in the datastore. Then /var/lib/one/remotes/datastores/<datastore mad>/cp is called to do the “import” of the image. It depends on the datastore_mad for the given datastore.

You could do the reverse - first create an empty image in the given datastore and then replace the image with the file you like.

Hope this helps.

Best Regards,
Anton Todorov

1 Like

Great, this is what I’m looking for. I will try it. Opennebula will recognize new image size automatically ?

Thanks,
BR!
Martin

I don’t think so. The image size is detected during the import. When you skip the import you must set the image size to be the same as the size of the image you are replacing with.

BR,
Anton

1 Like