Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have launched an instance in OpenStack and modified it, and I would now like to save it as a new image. How do I do that?

I'm running the diablo release.

share|improve this question
add comment

1 Answer

You do this with the nova image-create command. Here's how it works.

1. Get the ID of your running instance

Use the nova list command to do this. In the following example, the ID field is 11.

$ nova list
+----+-----------+--------+-----------------------------------------+
| ID |    Name   | Status |                 Networks                |
+----+-----------+--------+-----------------------------------------+
| 11 | Server 11 | ACTIVE | internal_0=172.16.0.10, 199.189.191.183 |
+----+-----------+--------+-----------------------------------------+

2. Create the image

Think of a good name for your image. For example, if you want the image name to be ubuntu-oneiric-test, using ID 11, you would do:

$ nova image-create 11 ubuntu-oneiric-test 

This command will return right away, and will kick off the creation in the background.

3. Check the progress of image creation

Use nova image-list to check progress. Initially, it should look like this:

$ nova image-list 
+----+-----------------------+--------+--------------------------------------+
| ID |          Name         | Status |                Server                |
+----+-----------------------+--------+--------------------------------------+
| 1  | ttylinux-kernel       | ACTIVE |                                      |
| 2  | ttylinux-ramdisk      | ACTIVE |                                      |
| 3  | ttylinux              | ACTIVE |                                      |
| 4  | ubuntu-oneiric        | ACTIVE |                                      |
| 5  | loader-kernel         | ACTIVE |                                      |
| 6  | loader-ramdisk        | ACTIVE |                                      |
| 7  | ubuntu-lucid          | ACTIVE |                                      |
| 8  | ubuntu-oneiric-test   | SAVING | 61054983-e127-4f97-83e0-90b272e95378 |
+----+-----------------------+--------+--------------------------------------+

When it's done, the status should switch from SAVING to ACTIVE.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.