nova/doc/source/runnova/managing.instances.rst
2011-02-21 14:30:20 -06:00

1.9 KiB

Managing Instances

Keypairs

Images can be shared by many users, so it is dangerous to put passwords into the images. Nova therefore supports injecting ssh keys into instances before they are booted. This allows a user to login to the instances that he or she creates securely. Generally the first thing that a user does when using the system is create a keypair. Nova generates a public and private key pair, and sends the private key to the user. The public key is stored so that it can be injected into instances.

Keypairs are created through the api. They can be created on the command line using the euca2ools script euca-add-keypair. Refer to the man page for the available options. Example usage:

euca-add-keypair test > test.pem
chmod 600 test.pem
euca-run-instances -k test -t m1.tiny ami-tiny
# wait for boot
ssh -i test.pem root@ip.of.instance

Basic Management

Instance management can be accomplished with euca commands:

To run an instance:

euca-run-instances

To terminate an instance:

euca-terminate-instances

To reboot an instance:

euca-reboot-instances

See the euca2ools documentation for more information