An image is a disk and file system template used to create an instance. An image typically contain a boot disk with the operating system that will run on your instance. It can include Linux and Windows operating system, possibly with applications pre-configured. There is a set of images that is centrally managed on the platform and available to any user; plus you can upload your own (private) images to the account.
An instance snapshot is also stored on the platform in form of an image. It can be used either as a mean to back up an instance and to restore it later, or as a way to create an image that later can be used in repetitive deployments.
In order to properly work during the instance creation, the image must meet certain requirements:
- The image must be in one of the supported formats - RAW or QCOW2, and RAW is recommended for the best performance and compatibility. Other images (such as VMDK or VHD) must be converted before they can be used. A popular open source tool called qemu-img supports image conversion between veriety of the formats.
- The image must work under KVM hypervisor, using proper virtual hardware drivers called virtio drivers. For Linux, that is typically not an issue since all modern Linux distributions based on a kernel version 2.6.27 or newer include them by default.
- Finally, the image must include cloud-init package to be able to accept boot time configuration. Again, most Linux versions include it by default; however, when preparing Windows image, this package must be downloaded and installed before moving image to the cloud.
Additionally to the above, while not strictly required, it is a good idea to make sure the image is prepared according to the best practices:
- Prepare the image keeping in mind that it will be cloned multiple times, before uploading it to the cloud. That includes cleaning up all non-system and non-default users or user data. For Windows, there is a special tool called sysprep which is designed for this purpose.
Prepare the image to properly work with the network configuration. A network adapter added during the instance creation will be configured during the boot time with configuration provided via cloud-init; however any adapter added when the instance is up and running will be dynamically added and expected to be configured automatically by the operating system via DHCP. If the image is not prepared accordingly, the instance administrator may need to configure networking manually inside the instance, before the networking will be enabled.
Remove any unnecessary tools and applications (like guest tools for other hypervisors, hardware drivers, tools for hardware management and monitoring, etc.)
Note that many images for popular operating systems are readily available on the Internet for download, including those maintained by the distribution vendors.
You can easily upload your own images via portal. To do that,follow the following steps:
Click on the Images tab in the left-hand pane to expand the menu, and click My Images to open the page.
Click on the "Image upload" button.
In the opened window, enter a descriptive name of your new image, for example "Debian-9". Then click on the file selection button, browse your computer for the image file location, select the file and begin upload.
Note that upload will be performed directly from your computer via the browser. Depending on the image size and your uplink speed, this operation may take a while. Do not close the browser during the process, as the upload will be interrupted.
For the very large files and/or slower connections, upload via command line may be preferred.
The Platform images are provided by the platform administrator. They are shared among all the platform users, and thus are read-only - the users cannot modify, delete or add an image there.
The My images however are fully managed by the user. The user can upload an image at any time, or delete ones which are not used. To delete an image, simply click on the image context menu button, and select "Delete".
API and command line tools provide even more functions for image management. For example, the user can download image to the local computer, rename an image, or specify additional image properties such as amount of memory required to boot this image.