# Modifying migration process

**URL:** <https://forum.opennebula.io/t/modifying-migration-process/2414>\
**Category:** Product Support\
**Created:** [June 17, 2016, 2:27pm UTC](https://forum.opennebula.io/t/modifying-migration-process/2414 "2016-06-17T14:27:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arshad\_shaikh](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@arshad\_shaikh](https://forum.opennebula.io/u/arshad_shaikh)\
**Post date:** [June 17, 2016, 2:27pm UTC](https://forum.opennebula.io/t/modifying-migration-process/2414/1 "2016-06-17T14:27:14Z")

</div>

Hi guys,

I would like to implement my own algorithm VM migration, I would like to know whether it is possible and if yes which part of OpenNebula should i modify?

The hypervisor I am using is Xen 4.4.

I know this will be a long way for the learning curve, so i hope you can guide me on the right direction to get started.

Best Regards,  
Arshad

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [June 22, 2016, 7:16am UTC](https://forum.opennebula.io/t/modifying-migration-process/2414/2 "2016-06-22T07:16:01Z")

</div>

Hi,

Here are a few pointers to get you started:

The decision to choose a migration destination is made in the scheduler:

> **[OpenNebula/one](https://github.com/OpenNebula/one/tree/master/src/scheduler)**
>
> The open source Cloud Management Platform developed for the Enterprise :rocket: - OpenNebula/one

In the core the xml-rpc api call is managed by this method:

> <https://github.com/OpenNebula/one/blob/master/include/RequestManagerVirtualMachine.h#L150>

From there, the action will call the VM drivers:  
[http://docs.opennebula.org/5.0/integration/infrastructure\_integration/devel-vmm.html](http://docs.opennebula.org/5.0/integration/infrastructure_integration/devel-vmm.html)

---

<div class="post-metadata">

**Author:** ![arshad\_shaikh](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@arshad\_shaikh](https://forum.opennebula.io/u/arshad_shaikh)\
**Post date:** [June 23, 2016, 2:14pm UTC](https://forum.opennebula.io/t/modifying-migration-process/2414/3 "2016-06-23T14:14:12Z")

</div>

Thank you for replying sir.

What I actually want to do is modify the live migration process of VMs. I know that there is this method "migrate(host\_id, live = false, enforce = false, ds\_id = -1)) " in VirtualMachine.rb([http://docs.opennebula.org/doc/5.0/oca/ruby/OpenNebula/VirtualMachine.html#migrate-instance\_method](http://docs.opennebula.org/doc/5.0/oca/ruby/OpenNebula/VirtualMachine.html#migrate-instance_method)).

Would you like to add something to it.

Also if possible could you suggest something on this issue - [VM creation failure on XEN host](https://forum.opennebula.io/t/vm-creation-failure-on-xen-host/2313/7)

Thanks and regards,  
Arshad Shaikh
