SimGrid
3.21
Versatile Simulation of Distributed Systems
|
SURF VM interface class.
A VM represent a virtual machine
#include <VirtualMachineImpl.hpp>
Inherits HostImpl, and simgrid::xbt::Extendable< VirtualMachineImpl >.
Public Member Functions | |
VirtualMachineImpl (s4u::VirtualMachine *piface, s4u::Host *host, int core_amount, size_t ramsize) | |
~VirtualMachineImpl () | |
A physical host does not disappear in the current SimGrid code, but a VM may disappear during a simulation. More... | |
virtual void | suspend (kernel::actor::ActorImpl *issuer) |
virtual void | resume () |
virtual void | shutdown (kernel::actor::ActorImpl *issuer) |
Power off a VM. More... | |
virtual void | set_physical_host (s4u::Host *dest) |
Change the physical host on which the given VM is running. More... | |
s4u::Host * | get_physical_host () |
Get the physical host on which the given VM is running. More... | |
sg_size_t | get_ramsize () |
void | set_ramsize (sg_size_t ramsize) |
s4u::VirtualMachine::state | get_state () |
void | set_state (s4u::VirtualMachine::state state) |
int | get_core_amount () |
virtual void | set_bound (double bound) |
![]() | |
Extendable () | |
~Extendable () | |
void * | extension (std::size_t rank) |
U * | extension (Extension< VirtualMachineImpl, U > rank) |
U * | extension () |
void | extension_set (std::size_t rank, void *value, bool use_dtor=true) |
void | extension_set (Extension< VirtualMachineImpl, U > rank, U *value, bool use_dtor=true) |
void | extension_set (U *p) |
Public Attributes | |
kernel::resource::Action * | action_ = nullptr |
bool | is_migrating_ = false |
Static Public Attributes | |
static xbt::signal< void(simgrid::vm::VirtualMachineImpl *)> | on_creation |
Callbacks fired after VM creation. More... | |
static xbt::signal< void(simgrid::vm::VirtualMachineImpl *)> | on_destruction |
Callbacks fired after VM destruction. More... | |
static xbt::signal< void(simgrid::vm::VirtualMachineImpl *)> | on_state_change |
Callbacks after VM State changes. More... | |
static std::deque< s4u::VirtualMachine * > | allVms_ |
Additional Inherited Members | |
![]() | |
static size_t | extension_create (void(*deleter)(void *)) |
static Extension< VirtualMachineImpl, U > | extension_create (void(*deleter)(void *)) |
static Extension< VirtualMachineImpl, U > | extension_create () |
|
explicit |
simgrid::vm::VirtualMachineImpl::~VirtualMachineImpl | ( | ) |
A physical host does not disappear in the current SimGrid code, but a VM may disappear during a simulation.
|
virtual |
|
virtual |
|
virtual |
Power off a VM.
All hosted processes will be killed, but the VM state is preserved on memory. It can later be restarted.
issuer | the actor requesting the shutdown |
|
virtual |
Change the physical host on which the given VM is running.
This is an instantaneous migration.
|
inline |
Get the physical host on which the given VM is running.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
|
static |
Callbacks fired after VM creation.
Signature: void(VirtualMachineImpl*)
|
static |
Callbacks fired after VM destruction.
Signature: void(VirtualMachineImpl*)
|
static |
Callbacks after VM State changes.
Signature: void(VirtualMachineImpl*)
kernel::resource::Action* simgrid::vm::VirtualMachineImpl::action_ = nullptr |
|
static |
bool simgrid::vm::VirtualMachineImpl::is_migrating_ = false |