ka at eta
Jan 23, 2012, 11:50 AM
Post #3 of 3
23.01.2012 21:38, ka ?????:
> 23.01.2012 20:49, ka ?????:
>> But when I try to revert VM, I have strange behavior of VM.revert
>> I rollback my ZFS storage, unregister VM, import VM metadata, rescan
>> SR and try to call VM.revert function. Its return VM_REVERT_FAILED
>> *The strangeness of the fact that when I ignore VM_REVERT_FAILED
>> exception and try to repeat VM.revert call - it works fine.*
>> I mean that second call of VM.revert works without error (There is no
>> pause between them).
> I looked at sources:
> It's look like line 420 update_vifs_and_vbds ~__context ~snapshot ~vm;
> through error.
> I look at the let update_vifs_and_vbds (281).
> Seems, it line 295 through exception List.iter (safe_destroy_vbd
> ~__context ~rpc ~session_id) vm_VBDs;
> I try to make this call from my script (I mean destroy API function
> call for all VM's VBDs) and got same error as in log:
> VBD 'd92b50bf-16b4-de2f-b8c8-454157f51904' still attached to
> The only line executed after this exception is 430:
> Xapi_vm_lifecycle.force_state_reset ~__context ~self:vm ~value:`Halted;
> I check imported VM status. It is 'halted' and I cannot to call
> Can I invoke Xapi_vm_lifecycle.force_state_reset as in 430 throuhg API?
Seems, This is because I take snapshot and export metadata of VM in
As I expected, reset of power_state is needed. I added
VM.power_state_reset call after import_metadata. All ok now.
Thanks to all :)