> [146.111793] (11:__pr_mig_tx:VM1(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
> [411.540563] (0:maestro@) FIXME: may need a proper handling, 1
> [411.540563] (0:maestro@) FIXME: may need a proper handling, 1
-> [411.566271] (7:mig_wrk@Fafard) VM1 migrated: Fafard->Tremblay in 265.454 s
+> [411.566271] (8:mig_wrk@Fafard) VM1 migrated: Fafard->Tremblay in 265.454 s
> [411.566271] (6:mig_wrk@Fafard) VM0 migrated: Fafard->Tremblay in 265.454 s
> [10146.111793] (1:master_@Fafard) Test: Migrate two VMs at once to different PMs
> [10146.111793] (15:__pr_mig_tx:VM0(Fafard-Tremblay)@Fafard) use the default max_downtime value 30ms
> [10146.111793] (17:__pr_mig_tx:VM1(Fafard-Bourassa)@Fafard) use the default max_downtime value 30ms
> [10362.613818] (0:maestro@) FIXME: may need a proper handling, 1
-> [10362.620589] (13:mig_wrk@Fafard) VM1 migrated: Fafard->Bourassa in 216.509 s
+> [10362.620589] (14:mig_wrk@Fafard) VM1 migrated: Fafard->Bourassa in 216.509 s
> [10411.521626] (0:maestro@) FIXME: may need a proper handling, 1
> [10411.547334] (12:mig_wrk@Fafard) VM0 migrated: Fafard->Tremblay in 265.436 s
> [20146.111793] (0:maestro@) Bye (simulation time 20146.1)
/******************************* VM simcalls ********************************/
// Create the vm_workstation at the SURF level
XBT_PUBLIC(void) simcall_vm_start(sg_host_t vm);
-XBT_PUBLIC(void *) simcall_vm_get_pm(sg_host_t vm);
XBT_PUBLIC(void) simcall_vm_set_bound(sg_host_t vm, double bound);
XBT_PUBLIC(void) simcall_vm_resume(sg_host_t vm);
XBT_PUBLIC(void) simcall_vm_save(sg_host_t vm);
* The second one would be easier.
*/
- msg_host_t old_pm = (msg_host_t) simcall_vm_get_pm(vm);
+ simgrid::surf::VirtualMachineImpl* pimpl = static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_;
+ msg_host_t old_pm = pimpl->getPm();
if(MSG_host_is_off(old_pm))
THROWF(vm_error, 0, "SRC host(%s) seems off, cannot start a migration", sg_host_get_name(old_pm));
if (MSG_vm_is_migrating(vm))
THROWF(vm_error, 0, "VM(%s) is already migrating", sg_host_get_name(vm));
- simgrid::surf::VirtualMachineImpl* pimpl = static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_;
- pimpl->isMigrating = 1;
+ pimpl->isMigrating = 1;
{
int ret = do_migration(vm, old_pm, new_pm);
*/
msg_host_t MSG_vm_get_pm(msg_vm_t vm)
{
- return (msg_host_t) simcall_vm_get_pm(vm);
+ return static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->getPm();
}
/** @brief Set a CPU bound for a given VM.
simgrid::simix::kernelImmediate(std::bind(SIMIX_vm_start, vm));
}
-/**
- * \ingroup simix_vm_management
- * \brief Get the physical host on which the given VM runs.
- *
- * \param vm VM
- * \return The physical host
- */
-void *simcall_vm_get_pm(sg_host_t vm)
-{
- return simgrid::simix::kernelImmediate(
- [vm]() { return static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->getPm(); });
-}
-
/**
* @brief Function to set the CPU bound of the given SIMIX VM host.
*