← Back to team overview

openstack team mailing list archive

Re: Suspend/Stop VM

 

On 07/30/2012 12:13 PM, George Reese wrote:
Thanks, but I am looking for how this is done via API.

You can determine from the CLI what APIs are called by running with --debug. For example:

nova --debug list

You will see:

send: u'GET /v2/cdc204424fdf4f428ca27cc3d65ea583/servers/detail HTTP/1.1\r\nHost: 10.16.184.54:8774\r\nx-auth-project-id: demo\r\nx-auth-token:..."

REQ: curl -i http://10.16.184.54:8774/v2/cdc204424fdf4f428ca27cc3d65ea583/servers/detail -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token:...."




-George

On Jul 30, 2012, at 11:11 AM, Pengjun Pan <panpengjun@xxxxxxxxx <mailto:panpengjun@xxxxxxxxx>> wrote:

I never tried to stop a VM using api. But run a "nova help", it has
pause, reboot, resume, etc.

To bypass nova api, you can use virsh to stop instances. Do a "sudo
virsh list --all", it will list all the running instances even if nova
cannot see it for some reason. And then you can kill all the "ghost"
instances by "sudo virsh shutdown <id>".

Hope this helps.

PJ


On Mon, Jul 30, 2012 at 10:50 AM, George Reese
<george.reese@xxxxxxxxxxxxx <mailto:george.reese@xxxxxxxxxxxxx>> wrote:
I must be missing something, but I can't find any docs on how to suspend or
stop a VM via API.

Any pointers, please? :)

-George

--
George Reese - Chief Technology Officer, enStratus
e: george.reese@xxxxxxxxxxxxx <mailto:george.reese@xxxxxxxxxxxxx> Skype: nspollution t: @GeorgeReese p:
+1.207.956.0217
enStratus: Enterprise Cloud Management - @enStratus -
http://www.enstratus.com
To schedule a meeting with me: http://tungle.me/GeorgeReese


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


--
George Reese - Chief Technology Officer, enStratus
e: george.reese@xxxxxxxxxxxxx <mailto:george.reese@xxxxxxxxxxxxx> Skype: nspollution t: @GeorgeReese p: +1.207.956.0217 enStratus: Enterprise Cloud Management - @enStratus - http://www.enstratus.com <http://www.enstratus.com/>
To schedule a meeting with me: http://tungle.me/GeorgeReese



_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp



References