- HostImpl *surfHost_dst = host_dest->pimpl_;
- const char *vm_name = getName();
- const char *pm_name_src = hostPM_->name().c_str();
- const char *pm_name_dst = surfHost_dst->getName();
-
- /* update net_elm with that of the destination physical host */
- sg_host_by_name(vm_name)->pimpl_netcard = sg_host_by_name(pm_name_dst)->pimpl_netcard;
-
- hostPM_ = host_dest;
-
- /* Update vcpu's action for the new pm */
- /* create a cpu action bound to the pm model at the destination. */
- CpuAction *new_cpu_action = static_cast<CpuAction*>(host_dest->pimpl_cpu->execution_start(0));
-
- Action::State state = action_->getState();
- if (state != Action::State::done)
- XBT_CRITICAL("FIXME: may need a proper handling, %d", static_cast<int>(state));
- if (action_->getRemainsNoUpdate() > 0)
- XBT_CRITICAL("FIXME: need copy the state(?), %f", action_->getRemainsNoUpdate());
-
- /* keep the bound value of the cpu action of the VM. */
- double old_bound = action_->getBound();
- if (old_bound != 0) {
- XBT_DEBUG("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
- new_cpu_action->setBound(old_bound);
+ HostImpl* surfHost_dst = host_dest->pimpl_;
+ const char* vm_name = getName();
+ const char* pm_name_src = hostPM_->name().c_str();
+ const char* pm_name_dst = surfHost_dst->getName();
+
+ /* update net_elm with that of the destination physical host */
+ sg_host_by_name(vm_name)->pimpl_netcard = sg_host_by_name(pm_name_dst)->pimpl_netcard;
+
+ hostPM_ = host_dest;
+
+ /* Update vcpu's action for the new pm */
+ /* create a cpu action bound to the pm model at the destination. */
+ CpuAction* new_cpu_action = static_cast<CpuAction*>(host_dest->pimpl_cpu->execution_start(0));
+
+ Action::State state = action_->getState();
+ if (state != Action::State::done)
+ XBT_CRITICAL("FIXME: may need a proper handling, %d", static_cast<int>(state));
+ if (action_->getRemainsNoUpdate() > 0)
+ XBT_CRITICAL("FIXME: need copy the state(?), %f", action_->getRemainsNoUpdate());
+
+ /* keep the bound value of the cpu action of the VM. */
+ double old_bound = action_->getBound();
+ if (old_bound != 0) {
+ XBT_DEBUG("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
+ new_cpu_action->setBound(old_bound);