Jump to: navigation, search

Difference between revisions of "UnifiedImages"

 
m (Text replace - "NovaSpec" to "NovaSpec")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
* '''Launchpad Entry''': [[NovaSpec]]:foo or [[SwiftSpec]]:foo
+
* '''Launchpad Entry''': NovaSpec:unified-images
* '''Created''':
+
* '''Created''': [[RickHarris]]
 
* '''Contributors''':  
 
* '''Contributors''':  
  
 
== Summary ==
 
== Summary ==
 +
 +
We need the ability in Nova to build an instance from an image that is *completely* configured, meaning, the partition table is present, the kernel is within the image along with the data.  For the [[XenServer]] virt layer, this means we need to be able to build an instance from a VHD.
 +
 +
This blueprint pairs with xs-snapshots-glance from Bexar, where we generated VHD snapshots: with unified-images those snapshots will be usable.
  
 
== Release Note ==
 
== Release Note ==
  
This section should include a paragraph describing the end-user impact of this change.  It is meant to be included in the release notes of the first release in which it is implemented.  (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)
+
* [[XenServer]] driver now able to boot VHD images
  
It is mandatory.
+
== Rationale ==
  
== Rationale ==
+
Our implementation of [[XenServer]] is backing the instances with VHDs which we snapshot and then upload into Glance.  In order to be able to restore these VHD based images, the Nova [[XenServer]] driver will need to be able to understand how to fetch and boot a VHD based image.
  
 
== User stories ==
 
== User stories ==
 +
 +
Alice snapshots a running [[XenServer]] instance.
 +
Alice restores snapshot which fetches the VHD-based image and boots it.
 +
 +
Bob creates a VHD based base-install, in this case a Windows Image.
 +
Bob publishes WinXX image in Glance with is_public=True.
 +
Charlie builds a new instance from WinXX base-install.
  
 
== Assumptions ==
 
== Assumptions ==
Line 20: Line 31:
 
== Design ==
 
== Design ==
  
You can have subsections that better describe specific parts of the issue.
+
We need to add metadata to Glance to support disk_format metadata (see related blueprint [RELATED BLUEPRINT HERE]).
 +
 
 +
In Nova, we need add a _fetch_vhd adapter in the [[XenServer]] virt-layer which will be invoked when Nova detects that the images disk_format == "vhd".
  
 
== Implementation ==
 
== Implementation ==
  
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
+
Implementation should be straightforward. We really just need to respect the disk_format parameter exposed by Glance and then make use of it when selecting the appropriate [[XenServer]] _fetch_image method.
 +
 
 +
The actual _fetch_vhd_image will use the Glance client to pull the image down into the Dom0 storage-repository and then create the appropriate VDI and VBD records to boot from the image.
  
 
=== UI Changes ===
 
=== UI Changes ===
  
Should cover changes required to the UI, or specific UI that is required to implement this
+
None
  
 
=== Code Changes ===
 
=== Code Changes ===
  
Code changes should include an overview of what needs to change, and in some cases even the specific details.
+
For Nova, we really just need to add the _fetch_vhd_image adapter in the [[XenServer]] virt-layer and then have [[XenServer]] _fetch_image dispatch to it when it detects a VHD image.
  
 
=== Migration ===
 
=== Migration ===
  
Include:
+
None in Nova.
* data migration, if any
 
* redirects from old URLs to new ones, if any
 
* how users will be pointed to the new way of doing things, if necessary.
 
  
 
== Test/Demo Plan ==
 
== Test/Demo Plan ==
  
 +
The test strategy is two-fold:
 +
 +
* First and foremost, this will need to be tested functionally. This will be done, first by hand; but we should be able to write a script that snapshots an image and restores from it and verifies that the instance booted.
 +
* Second, we can use unit-tests to test the adapter selection to ensure that we're only using the VHD adapter when appropriate
 
This need not be added or completed until the specification is nearing beta.
 
This need not be added or completed until the specification is nearing beta.
  
 
== Unresolved issues ==
 
== Unresolved issues ==
  
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
+
We still need to discuss exactly how we're going to package and bundle these VHDs. For now, a tarball in Glance which translate into 1 or more VHDs in Nova will work. This is what we currently do; the question is, should we explore better options for image packaging?
  
 
== BoF agenda and discussion ==
 
== BoF agenda and discussion ==
 
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
 
  
 
----
 
----
 
[[Category:Spec]]
 
[[Category:Spec]]

Latest revision as of 23:31, 17 February 2013

  • Launchpad Entry: NovaSpec:unified-images
  • Created: RickHarris
  • Contributors:

Summary

We need the ability in Nova to build an instance from an image that is *completely* configured, meaning, the partition table is present, the kernel is within the image along with the data. For the XenServer virt layer, this means we need to be able to build an instance from a VHD.

This blueprint pairs with xs-snapshots-glance from Bexar, where we generated VHD snapshots: with unified-images those snapshots will be usable.

Release Note

  • XenServer driver now able to boot VHD images

Rationale

Our implementation of XenServer is backing the instances with VHDs which we snapshot and then upload into Glance. In order to be able to restore these VHD based images, the Nova XenServer driver will need to be able to understand how to fetch and boot a VHD based image.

User stories

Alice snapshots a running XenServer instance. Alice restores snapshot which fetches the VHD-based image and boots it.

Bob creates a VHD based base-install, in this case a Windows Image. Bob publishes WinXX image in Glance with is_public=True. Charlie builds a new instance from WinXX base-install.

Assumptions

Design

We need to add metadata to Glance to support disk_format metadata (see related blueprint [RELATED BLUEPRINT HERE]).

In Nova, we need add a _fetch_vhd adapter in the XenServer virt-layer which will be invoked when Nova detects that the images disk_format == "vhd".

Implementation

Implementation should be straightforward. We really just need to respect the disk_format parameter exposed by Glance and then make use of it when selecting the appropriate XenServer _fetch_image method.

The actual _fetch_vhd_image will use the Glance client to pull the image down into the Dom0 storage-repository and then create the appropriate VDI and VBD records to boot from the image.

UI Changes

None

Code Changes

For Nova, we really just need to add the _fetch_vhd_image adapter in the XenServer virt-layer and then have XenServer _fetch_image dispatch to it when it detects a VHD image.

Migration

None in Nova.

Test/Demo Plan

The test strategy is two-fold:

  • First and foremost, this will need to be tested functionally. This will be done, first by hand; but we should be able to write a script that snapshots an image and restores from it and verifies that the instance booted.
  • Second, we can use unit-tests to test the adapter selection to ensure that we're only using the VHD adapter when appropriate

This need not be added or completed until the specification is nearing beta.

Unresolved issues

We still need to discuss exactly how we're going to package and bundle these VHDs. For now, a tarball in Glance which translate into 1 or more VHDs in Nova will work. This is what we currently do; the question is, should we explore better options for image packaging?

BoF agenda and discussion