Live migrate local XenServer VM's not working - XenAPI

五迷三道 提交于 2019-12-11 19:55:49

问题


I want to use python and the xenserver API to live migrate locally stored VM's, within a pool.

I am using the xenapi.VM.Pool_Migrate($vm, $host, $options) call and when I run it, the icon for the VM in XenCenter turns yellow for a moment, and the script exits cleanly, but the VM does not move.

I think this is because the VM is locally stored on the host. But I can manually migrate it to another host within XenCenter, so how do I do this in the API?


回答1:


This works for me.

Get the vm_ref and new_vm_host_ref

vm_ref = xenapi.VM.get_by_uuid(vm_uuid)

Now migrate with the live migration flag set as true

xenapi.VM.pool_migrate(vm_ref, new_vm_host_ref, {"live": "true"})

Though Xenserver is now free but the previous releases supports live migration only for the enterprise edition.



来源:https://stackoverflow.com/questions/21533380/live-migrate-local-xenserver-vms-not-working-xenapi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!