XenAPIRawDiskImages


 * Launchpad Entry: NovaSpec:xenapi-raw-disk-images
 * Created: 2 November 2010
 * Last Updated: 18 November 2010
 * Contributors: Ewan Mellor

Summary
The implementation for NovaSpec:raw-disk-images only covered libvirt. The same feature needs to be implemented for the XenAPI backend.

The API has all been decided as part of the NovaSpec:raw-disk-images work, so we just need to implement the same functionality in the XenAPI compute backend. If the kernel and ramdisk are not set (strictly, set to a "magic" value to indicate their absence) then we will boot the VM in HVM or PV mode, and stream only the disk image to the host.

When the XenAPI compute backend is instructed to spawn an instance without a kernel/ramdisk, it assumes it is a raw image. For this reason, the disk image only is fetched from the image service. A raw image should be already partitioned and ready to be booted; for this reason not partitioning is performed; similarly the MBR for the image is not rewritten. The disk image it is inspected in order to understand whether it has a PV kernel, as in this case the VM should be configured differently. Pygrub (available in Xen's dom0) is used for this purpose.