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.
You do this with the nova image-create
command. Here's how it works.
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 |
+----+-----------+--------+-----------------------------------------+
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.
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.