QA:Testcase Nova Snapshot Volume Backed Instance

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
m
 
(3 intermediate revisions by one user not shown)
Line 10: Line 10:
  
 
  $> nova image-create volume_backed volume_backed_image
 
  $> nova image-create volume_backed volume_backed_image
 +
$> <nowiki>SNAPSHOT_IMAGE_ID=$(glance image-list | awk '/volume_backed_image/ {print $2}')</nowiki>
  
 
Boot the image created from the running volume-backed instance:
 
Boot the image created from the running volume-backed instance:
  
  $> <nowiki>nova boot --flavor 1 --image $(glance image-list | awk '/volume_backed_image/ {print $2}') from_volume_backed</nowiki>
+
  $> nova boot --flavor 1 --image $SNAPSHOT_IMAGE_ID from_volume_backed
  
 
|results=
 
|results=
  
You should be able able to shh into the second volume-backed instance.
+
You should be able able to ssh into the second volume-backed instance.
 +
 
 +
Note that an additional snapshot now exists to back the image:
 +
 
 +
$> cinder snapshot-list
  
 
Note the properties on the new image:
 
Note the properties on the new image:
  
  $> glance image-show <nowiki>$(glance image-list | awk '/volume_backed_image/ {print $2}')</nowiki>
+
  $> glance image-show $SNAPSHOT_IMAGE_ID
  
 
and the lack of image data (as that is taken from the volume snapshot).
 
and the lack of image data (as that is taken from the volume snapshot).
Line 31: Line 36:
 
Also note for each of the two volume-backed instances you've fired up, there is a volume cloned from the corresponding snapshot:
 
Also note for each of the two volume-backed instances you've fired up, there is a volume cloned from the corresponding snapshot:
  
  $> nova volume-list
+
  $> cinder list
  
 
}}
 
}}

Latest revision as of 12:13, 26 October 2012

Contents

Description

Images can be created from running volume-backed nova instances, analogous to an EBS-backed AMI in EC2.

The image data is not stored in glance, rather it is cloned from a snapshot of the backing volume.

Setup

Run previous test case.

How to test

Create an image from the running instance:

$> nova image-create volume_backed volume_backed_image
$> SNAPSHOT_IMAGE_ID=$(glance image-list | awk '/volume_backed_image/ {print $2}')

Boot the image created from the running volume-backed instance:

$> nova boot --flavor 1 --image $SNAPSHOT_IMAGE_ID from_volume_backed

Expected Results

You should be able able to ssh into the second volume-backed instance.

Note that an additional snapshot now exists to back the image:

$> cinder snapshot-list

Note the properties on the new image:

$> glance image-show $SNAPSHOT_IMAGE_ID

and the lack of image data (as that is taken from the volume snapshot).

Note also that the EC2 API reports the image as being EBS-backed as opposed to instance-store:

$> euca-describe-images

Also note for each of the two volume-backed instances you've fired up, there is a volume cloned from the corresponding snapshot:

$> cinder list