Ask Your Question
0

Create VM snapshot through NOVA API

asked 2012-02-26 09:24:17 -0600

vvbelavin gravatar image

I didn't find this opportunity, so far, so I ask. Is it planned to make instance snapshoting available through NOVA API?

At the moment we use OpenStack as a testing platform in a software development company, sometimes it is convenient to make a snapshot of running instance, prior to testing. We do it through 'virsh snapshot-create', but it isn't convenient, because one need to perform the following actions:

1) euca-describe-instances | grep VM_IP_ADDRESS -> to get EC2 instance ID 2) sudo virsh list -> to get libvirt instance ID 3) sudo virsh snapshot-create ...

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-02-26 13:05:44 -0600

lorinh gravatar image

API page that documents this:

http://docs.openstack.org/api/openstack-compute/2/content/Create_Image-d1e4655.html (http://docs.openstack.org/api/opensta...)

edit flag offensive delete link more
0

answered 2012-02-27 03:33:42 -0600

lorinh gravatar image

I believe the image-create command also creates a snapshot as a side-effect of creating a new image.

edit flag offensive delete link more
0

answered 2012-02-26 13:05:03 -0600

lorinh gravatar image

In diablo, you can do this with create_image, which is how Horizon creates snapshots. With the python novaclient code, it looks like:

client.servers.create_image(instance_id, name)

where "name" is an arbitrary name you give the snapshot

Using the nova command-line client, it would be:

nova image-create [instance-id] [name]

edit flag offensive delete link more
0

answered 2012-02-27 02:55:22 -0600

vvbelavin gravatar image

Yes, I know. But this creates a new image, based on the running instance. I was talking about snapshoting instance. With 'virt snapshot-create' I can do several snapshots of the running instance and revert instance to the previous state with 'virsh snapshot-revert'.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-02-26 09:24:17 -0600

Seen: 194 times

Last updated: Feb 27 '12