QA:Testcase launch an instance on OpenStack

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(mention novarc details)
Line 4: Line 4:
# Follow [[QA:Testcase_download_and_register_tty_images_with_OpenStack]]
# Follow [[QA:Testcase_download_and_register_tty_images_with_OpenStack]]
'''OpenStack in a Virtual Machine'''
If you are ''not'' testing OpenStack in a virtual machine, you may skip this section of the setup.
If you ''are'' testing OpenStack in a virtual machine, everything will have worked up to this point.  However, launching an instance will fail unless you set an additional configuration option.  Edit <code>/etc/nova/nova.conf</code> and add the following text to a new line in the configuration file:
After adding this item, you will need to restart the OpenStack services.
$> sudo service openstack-nova-compute restart
$> sudo service openstack-nova-compute status

Revision as of 09:52, 19 October 2011



Launch an instance on OpenStack.


Optionally include information on preparing the test environment

  1. Follow QA:Testcase_download_and_register_tty_images_with_OpenStack

How to test

Launch an instance of one of the images downloaded and registered in the previous test case.

$> cd ~/novacreds
$> . ./novarc  # note if the address of the host changes (like restarting a DHCP VM) you'll first need to edit this file
$> euca-run-instances ami-tty --kernel aki-tty --ramdisk ari-tty -k nova_key

Expected Results

Verify that the instance has started.

$> euca-describe-instances 
RESERVATION	r-d8wpvydq	rbryant	default
INSTANCE	i-00000003	ami-00000003	pending	nova_key (rbryant, f16)	0		m1.small	2011-10-17T20:31:05Z	nova	aki-00000001	ari-00000002
$> sudo virsh list
 Id Name                 State
 1 instance-00000003    running

Try SSHing into the instance:

$> cd ~/novacreds
$> ssh -i nova_key.priv root@

Get conosle output:

$> euca-get-console-output i-00000003

Finally, terminate the instance:

$> euca-terminate-instances i-00000003