← Back to team overview

openstack team mailing list archive

[OpenStack][Nova]Start and Stop vm instances

 

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

Follow ups