/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "simgrid/s4u/Actor.hpp"
#include "src/instr/instr_private.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
#include "src/simix/smx_host_private.hpp"
#include "src/surf/cpu_cas01.hpp"
+#include <src/plugins/vm/VmLiveMigration.hpp>
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines");
pimpl_vm_->resume();
}
+void VirtualMachine::shutdown()
+{
+ smx_actor_t issuer = SIMIX_process_self();
+ simgrid::simix::kernelImmediate([this, issuer]() { pimpl_vm_->shutdown(issuer); });
+}
+
bool VirtualMachine::isMigrating()
{
return pimpl_vm_ && pimpl_vm_->isMigrating;
return pimpl_vm_->getPm();
}
+void VirtualMachine::setPm(simgrid::s4u::Host* pm)
+{
+ simgrid::simix::kernelImmediate([this, pm]() { pimpl_vm_->setPm(pm); });
+}
+
e_surf_vm_state_t VirtualMachine::getState()
{
return pimpl_vm_->getState();
{
simgrid::simix::kernelImmediate([this, bound]() { pimpl_vm_->setBound(bound); });
}
-/** @brief Retrieve a copy of the parameters of that VM/PM
- * @details The ramsize and overcommit fields are used on the PM too */
-void VirtualMachine::getParameters(vm_params_t params)
-{
- pimpl_vm_->getParams(params);
-}
-/** @brief Sets the params of that VM/PM */
-void VirtualMachine::setParameters(vm_params_t params)
-{
- simgrid::simix::kernelImmediate([this, params] { pimpl_vm_->setParams(params); });
-}
} // namespace simgrid
} // namespace s4u