Uploading an Image

You will need a boot medium from which your virtual machine boots. This is called an image. We already have provisioned a number of ready made images that you can use, but you can of course add your own images.

Create an Image

To do this, select the Images  tab in the user interface 

 

 

and click on Create Image. You will be presented with the following dialog:

 

 

 

Enter a Name for the image (for example "Ubuntu Cloud 14.04")

Optionally add a Description.

Select the image File you want to upload.

Select the Format. We strongly recommend you use RAW images and that the images you use are using are using Cloud Init (Ubuntu Cloud-Init, Redhat Cloud-Init). Using QCOW2 images will work (but our system is optimized for RAW images and will be able to spawn instances from RAW images much faster than from QCOW2 images). ISO images (Installation CD Roms) generally don't work!

You will then specify the minimum size of the boot disk in GigaBytes and the amount of Minimum RAM. These settings control what size a virtual machine needs to boot from this image.

By selecting Public you make this image available to other all other users and projects. In general, you should NOT create public images.

By selecting Protected you prevent this image from being deletable.

After clicking on Create Image the upload will take place, the image will be imported and will be ready after a few minutes (depending on the size)

Uploading an Image Using CLI

openstack image create --file [raw image file] [private image name]

Share your Image with the S3 Object Storage

You can also share your image by storing it in the S3 object storage. When you select the Image Source (as described above), you have to specify the URL for the Image Location. The URL can be an object stored in the SWITCHengines S3 object storage.

Upload your Image into the S3 Object Storage

Using the s3cmd (as described here) command you can upload your image file in the S3 storage. In S3 every object can be stored as public, and accessed using a simple URL.

First create a bucket (e.g. my_images_bucket):

$ s3cmd mb s3://my_images_bucket

Then upload your image file (e.g. image_file.raw) as public object into the bucket:

$ s3cmd put --acl-public image_file.raw s3://my_images_bucket/

The public ACL means that everyone can read the file you just uploaded.

Notice: sometimes the s3cmd put command will display a wrong, unusable public URL like http://s3.amazonaws.com/my_images_bucket/... that you can not use. Please see below for the correct public URL. 

Use the Public URL

The public URL to your S3 object can be used as Image Location URL when you create an image.

If you uploaded your image into the S3 in region LS, then the public URL for your file should be: 

https://os.unil.cloud.switch.ch/my_images_buckets/image_file.raw

If you uploaded your image in the S3 in region ZH, then the public URL for your file should be:

https://os.zhdk.cloud.switch.ch/my_images_buckets/image_file.raw