From Fedora Project Wiki

(remove from cloud SIG category)
No edit summary
Line 25: Line 25:


It may take a while to transition from the BUILD to the ACTIVE state, as reported by 'nova list'
It may take a while to transition from the BUILD to the ACTIVE state, as reported by 'nova list'
If the instance goes into the ERROR state, then check the nova-compute logs for errors:
$> grep ERROR /var/log/nova/compute.log
If running on a VM as opposed to bare metal, you may see an error like the following:
'libvirtError: unsupported configuration: CPU specification not supported by hypervisor'
In that case, you can work-around the issue by adding the line
libvirt_cpu_mode=none
to /etc/nova/nova.conf, then retsart the nova-compute service:
and repeat the boot step above:
$> sudo service openstack-nova-compute restart
Otherwise:


  $> sudo virsh list
  $> sudo virsh list

Revision as of 08:56, 18 September 2012

Description

Launch an instance on OpenStack.

Setup

Optionally include information on preparing the test environment

  1. Follow QA:Testcase_register_images_with_OpenStack

How to test

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

$> . ./novarc
$> euca-run-instances ami-tty --kernel aki-tty --ramdisk ari-tty -k nova_key

Expected Results

Verify that the instance has started.


$>  nova list
+--------------------------------------+----------+--------+------------------+
|                  ID                  |   Name   | Status |     Networks     |
+--------------------------------------+----------+--------+------------------+
| a47a424a-014b-4b81-97e6-b34d31b5589d | Server 1 | ACTIVE | testnet=10.0.0.2 |
+--------------------------------------+----------+--------+------------------+


It may take a while to transition from the BUILD to the ACTIVE state, as reported by 'nova list'

If the instance goes into the ERROR state, then check the nova-compute logs for errors:

$> grep ERROR /var/log/nova/compute.log

If running on a VM as opposed to bare metal, you may see an error like the following:

'libvirtError: unsupported configuration: CPU specification not supported by hypervisor'

In that case, you can work-around the issue by adding the line

libvirt_cpu_mode=none

to /etc/nova/nova.conf, then retsart the nova-compute service:

and repeat the boot step above:

$> sudo service openstack-nova-compute restart


Otherwise:

$> sudo virsh list
 Id Name                 State
----------------------------------
 1 instance-00000001    running

Get console output and ensure instance is fully started

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

Try SSH-ing into the instance:

$> ssh -i nova_key.priv -o UserKnownHostsFile=/dev/null root@10.0.0.2

Check for new errors in the logs:

$> grep -i error /var/log/nova/*.log

Notes:

  • We use /dev/null for known hosts because the fingerprints associated with these IPs will change when you start over with your testing; updating known hosts gets annoying
  • You've probably got a stale dnsmasq process around if you see:
dnsmasq: failed to create listening socket for 10.0.0.1: Address already in use