[Openstack] [OpenStack][Nova]Start and Stop vm instances

张家龙 zhangjl at awcloud.com
Wed Jun 13 02:46:36 UTC 2012


Hello,everyone

    I have some questions about OpenStack Nova Compute(Essex).
    
    According the Nova API Docs(http://api.openstack.org/),I sent stop command to my vm
    instance like follows:
    
    curl -i -X POST -H "Content-Type: application/json" -H 'X-Auth-Token:<my token>'  \
            -d '{"os-stop":null} ' \
            http://localhost:8774/v1.1/<tenant id>/servers/<vm id>/action 
            
    Next,I checked the vm status:
    
    nova list
    
    This command returnd follows:
    +--------------------------------------+----------+--------+-----------------+
    |                  ID                  |   Name   | Status |     Networks    |
    +--------------------------------------+----------+--------+-----------------+
    | e5d76e77-01eb-46a8-8086-f66835b39029 | vm_test2 | STOPED | br100=10.16.2.5 |
    +--------------------------------------+----------+--------+-----------------+
    
    Well,I checked if the vm exsited:
    
    virsh list --all
    
    While,I found nothing.
    
    Then, I sent start command to my vm instance like follows:
    
    curl -i -X POST -H "Content-Type: application/json" -H 'X-Auth-Token:<my token>'  \
            -d '{"os-start":null} ' \
            http://localhost:8774/v1.1/<tenant id>/servers/<vm id>/action 
            
    check the vm:
    
    nova list
    
    +--------------------------------------+----------+--------+-----------------+
    |                  ID                                           |   Name   | Status |     Networks    |
    +--------------------------------------+----------+--------+-----------------+
    | e5d76e77-01eb-46a8-8086-f66835b39029 | vm_test2 | ACTIVE | br100=10.16.2.3 |
    
    Here is my question:
    1. Is the stop operation of vm instance means to delete the vm and keep nothing except keep 
    this record in databases ?
    2. Is the start operation of vm means to creat a new vm instance according to the 
    recorde in databases ?
    
    Waiting your reply . Thanks !

   ------------------
   Best Regards
  
 ZhangJialong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120613/f2f49dc8/attachment.html>


More information about the Openstack mailing list