Ask Your Question

Can I create a snapshot from a server (vm)?

asked 2013-04-08 08:28:37 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

can i create a snapshot from a server using openstack api? when i create a server it doesn't have "root" volume that i can use its id to create a snapshot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-04-08 11:42:53 -0500

jpichon gravatar image

updated 2013-04-09 04:13:32 -0500

Did you try nova image-create?

$ nova help image-create
usage: nova image-create [--poll] <server> <name>

Create a new image by taking a snapshot of a running server.

Positional arguments:
  <server>  Name or ID of server.
  <name>    Name of snapshot.

Looking at the curl calls details using nova --debug image-create:

curl -i http://<my_ip>:8774/v2/<my_tenant_id>/servers/<my_server_id>/action -X POST -H "X-Auth-Project-Id: demo" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <my_token>" -d '{"createImage": {"name": "mysnapshot", "metadata": {}}}'
edit flag offensive delete link more


thank you for the response, i am talking about the openstack api i.e

inbar stolberg gravatar imageinbar stolberg ( 2013-04-09 03:30:58 -0500 )edit

Running the command with --debug (nova --debug image-create) details the curl requests that are made during a call, perhaps this would be of help to you. I'll edit my answer with the curl call.

jpichon gravatar imagejpichon ( 2013-04-09 04:08:51 -0500 )edit

i am talking about snapshot from vm not image from vm...

inbar stolberg gravatar imageinbar stolberg ( 2013-04-09 05:54:22 -0500 )edit

Technically, an instance snapshot is an image with a few extra properties though, see

jpichon gravatar imagejpichon ( 2013-04-09 06:09:54 -0500 )edit

i know but i need the snapshot specifically.

inbar stolberg gravatar imageinbar stolberg ( 2013-04-09 06:13:14 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-04-08 08:28:37 -0500

Seen: 2,746 times

Last updated: Apr 09 '13