<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(scrollbar.css); --></STYLE>

<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>                   BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}                       body{FONT-SIZE:12.1pt; COLOR:#001; FONT-FAMILY:宋体,serif;}           </STYLE>

<META name=GENERATOR content="MSHTML 8.00.7601.17824"><BASE 
target=_blank></HEAD>
<BODY 
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" 
marginheight="0" marginwidth="0"><STATIONERY>
<DIV><FONT color=#000000 size=3 face=宋体>Hi all,</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3>These are what I did (nova version is 
'Essex'):</FONT></DIV>
<DIV><FONT color=#000000 size=3>1. logon the instance</FONT></DIV>
<DIV><FONT color=#000000 size=3>2. shutdown it using 'shutdown -h 
now'</FONT></DIV>
<DIV><FONT color=#000000 size=3>3. wait a few minutes until the instance's 
vm_state, power_state change to 'shutoff', '5' respectively</FONT></DIV>
<DIV><FONT color=#000000 size=3>4. run cmd 'nova 
image-create <server> <name>' to snapshot the server 
instance</FONT></DIV>
<DIV><FONT color=#000000 size=3>5. the instance's vm_state changes to 'active', 
but the power_state doesn't change(still '5')</FONT></DIV>
<DIV><FONT color=#000000 size=3></FONT> </DIV>
<DIV><FONT color=#000000 size=3>My questions:</FONT></DIV>
<DIV><FONT color=#000000 size=3>1. Can we create a snapshot with a 
'shutoff' instance?</FONT></DIV>
<DIV><FONT color=#000000 size=3>2. If we can do the above operation, what is the 
correct vm_state after it? still 'shutoff' or changes 
to 'active'?</FONT></DIV>
<DIV>3. I also saw the source codes in 
nova/nova/compute/manager.py:snapshot_instance(), the vm_state is update at 
first by</DIV>
<DIV>               self._instance_update(context,<BR>                              
instance_ref['id'],<BR>                              
power_state=current_power_state,<BR>                              
<FONT color=#000000>vm_state=vm_states.ACTIVE</FONT>)</DIV>
<DIV>   and the task_state is changed to 'None' finally</DIV>
<DIV>               
self._instance_update(context, instance_ref['id'], <FONT 
color=#000000>task_state=None</FONT>)</DIV>
<DIV>   should we change back the vm_state like this, too?</DIV>
<DIV> </DIV>
<DIV>
<DIV>Thanks in Advance<BR><BR>Best Regards,</DIV>
<DIV>Wangpan</DIV></DIV><p></p><span title="neteasefooter"><span id="netease_mail_footer"><hr/>                                               <a href="http://cidian.youdao.com/auto" target="_blank">有道词典——最好用的免费全能翻译软件!</a></BODY></HTML>