Bug Reference

CLOUDSTACK-5531

Branch

4.4 (small changes, can be done in a single commit)

Introduction

qemu-img can convert many templates to the target format of KVM primary storages. We can utilize this to allow many template formats to be registered. Start with .vmdk, .vhd, .raw, .img support.

Document History

http://www.mail-archive.com/dev@cloudstack.apache.org/msg19885.html

Feature Specifications

  • Users will register templates in the format of their choice. The template will be stored in that format on secondary storage. This enables future template sharing. When the template is copied to primary storage, it is converted to the format of that primary storage.

  • This will require restart of the secondary storage vm post code installation, which is common for cloudstack upgrades.
  • This will not affect existing templates in any way.

Use cases

Customers have existing virtual machines in various formats. They want to register these as KVM templates.
In the future, we may be able to expand this to allow for a single template to be used by multiple hypervisors, e.g. a single VHD uploaded and used as both a KVM and XenServer template. 

Architecture and Design considerations

  • Currently VmdkProcessor.java handles .ova files. We will add support for .vmdk by moving VmdkProcessor.java to OVAProcessor.java, and creating a new VmdkProcessor.java to accomodate native .vmdk images.
  • raw and vhd types will be handled by their existing processors.