- Launchpad Entry: NovaSpec:xs-vm-instance-params
- Created: CoryWright
Currently in Nova there is no way for an image to specify XenServer boot parameters. We should provide a method for images to boot with image-specific boot parameters.
A way is needed to pass different boot parameters to XenServer when booting different operating systems. This is accomplished by defining "bootclasses" with default boot parameters. An image is then configured to use one specific bootclass.
As a Cloud Operator I want to be able to boot various operating systems with specific boot parameters. As an Image Creator I would like to load specific boot parameters into Nova's configuration. As an Image Creator I would like to be able to associate an image with a specific boot parameter configuration.
Images may be uploaded by untrusted sources, and therefore custom boot parameters provided with an image should not be trusted.
All images can be grouped into various "bootclasses". Windows and pygrub would be two such classes.
Each image in Glance will store an additional piece of metadata in its image-properties - a bootclass. The compute service will use this bootclass identifier, along with the hypervisor type, to fetch boot parameters from the Nova database. If boot parameters exist, the compute service will pass those to the hypervisor when booting the instance. The bootclass id will then be stored on the instance record.
When no bootclass is found for an image an error is raised.
A new database table (`bootclasses`) will be added to Nova to store boot parameters. A relationship will be maintained between an instance and a bootclass so that instance snapshots can inherit the bootclass.
Nova needs to be able to fetch an image's bootclass from a Glance image.
Nova needs to be able to locate boot parameters for a given bootclass and hypervisor.
The XenAPI virt driver will need to pass any boot parameters to the hypervisor.
Images now need to provide a bootclass.
We should be able to launch an instance with specific boot parameters from the image's bootclass. After booting we should be able to see that it is running with the correct boot parameters.
No decision has been reached on how to handle custom boot parameters provided with the image. The security implications needed to be given more consideration.