Jump to: navigation, search

BootFromISO

Revision as of 14:30, 16 May 2011 by DonalLafferty (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Summary

Boot from ISO allows OpenStack to create VMs that are booted from ISO-based images. A blank harddrive is also attached with parameters consistent with the VMs flavor.

Release Note

Boot from ISO allows OpenStack to create VMs that are booted from ISO-based images. A blank harddrive is also attached with parameters consistent with the VMs flavor. Requires the ISO-image be uploaded with an image of DISK_FORMAT 'iso'.

Rationale

The feature is needed to deal with licensing constraints for commercial operating systems. Redistribution restrictions limit the ability to trade in modified software images. E.g. purchasers of MS Windows licenses may create customized images using the ISO install as a starting point, but they cannot redistribute these images under available licensing schemes. Thus, a feature is required that allows a VM to be booted from an ISO, and prepared for bulk use. Existing OpenStack functionailty allows the resulting disk image to be persisted.

User stories

A user wants to create a Microsoft Windows golden image that can operate in a virtualisation environment. The starting point is an ISO containing the Windows installation that the user is able license. Using Boot From ISO, the Windows Installation can be triggered. The user is then free to guide the installation to completion, install client software necessary for network inject, e.g. XenServer Windows Guest Agent, and then apply sysprep so that subsequent VM boots generate a unique security ID for the operating system.

See Assumptions for additional prerequisites for this user story.

Assumptions

GUI console access is available prior to network injection. Since installs execute before a platform can be customized, a GUI console should be available without the need to modify the guest operating system.

A golden images do not require that a VM is first shutdown. With this assumption, we can use the exiting Create Image functionality that is applied to a running VM in order to create a golden image.

It suffices to implement the feature for XenServer and XCP VMMs at this stage. With this assumption, we greatly simplify the first implementation.

Design

Add the DISK_FORMAT type 'iso' to the acceptable types loaded by Glance. This will signal to Nova that the image is to be attached as a read only cdrom block device, rather than as a read/write harddisk. Extending DISK_FORMAT provides for better parameter checking than custom properties, because DISK_FORMAT values can be screened.

Add code path to existing VM create functionality that places an ISO image in a CDROM block device when the boot image has the DISK_FORMAT 'iso', marks this as the boot media, and attaches a harddisk that meets the VM's flavor specification.

Implementation

Glance Changes

This feature touches on Glance’s DISK_FORMAT enumeration. The ability to label and image as ‘iso’ is required to signal to VM spawn code that image requires a CDROM-like boot device.

Nova Changes

This feature touches on VM spawn code. ‘iso’ images signal that a blank disk given by the VM's instance-type properties is attached to a VM along with a CDROM to which the ISO is attached.

Test/Demo Plan

Unit tests must be introduced as well as a functional test that replicates the use case.

Unresolved issues

Survey of GUI console capabilities of Diablo has not been carried out. Nor has existing snapshot mechanism been examined to see if end of VM life image archiving exists or is easily implemented.