openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #14431
Re: [Nova] The server instance changes from 'shutoff' to 'active' after created an instance snapshot
Hi,
What you describe seems like a bug. If the VM is running when you do
snapshot, the VM will be temporarily suspended, snapshotted, then
resumed. But if the VM is off when you do snapshot, the VM should
remained to be off after the snapshot, not to be set back to the
ACTIVE state. Would you mind filing a bug at launchpad? Thanks,
Yun
On Wed, Jul 11, 2012 at 3:25 AM, Wangpan <hzwangpan@xxxxxxxxxxxxxxxx> wrote:
> Hi all,
>
> These are what I did (nova version is 'Essex'):
> 1. logon the instance
> 2. shutdown it using 'shutdown -h now'
> 3. wait a few minutes until the instance's vm_state, power_state change to
> 'shutoff', '5' respectively
> 4. run cmd 'nova image-create <server> <name>' to snapshot the server
> instance
> 5. the instance's vm_state changes to 'active', but the power_state doesn't
> change(still '5')
>
> My questions:
> 1. Can we create a snapshot with a 'shutoff' instance?
> 2. If we can do the above operation, what is the correct vm_state after it?
> still 'shutoff' or changes to 'active'?
> 3. I also saw the source codes in
> nova/nova/compute/manager.py:snapshot_instance(), the vm_state is update at
> first by
> self._instance_update(context,
> instance_ref['id'],
> power_state=current_power_state,
> vm_state=vm_states.ACTIVE)
> and the task_state is changed to 'None' finally
> self._instance_update(context, instance_ref['id'],
> task_state=None)
> should we change back the vm_state like this, too?
>
> Thanks in Advance
>
> Best Regards,
> Wangpan
>
> ________________________________
> 有道词典――最好用的免费全能翻译软件!
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
References