11 #ifndef WRENCH_S4U_VIRTUALMACHINE_H
12 #define WRENCH_S4U_VIRTUALMACHINE_H
14 #include <simgrid/s4u/VirtualMachine.hpp>
16 #include <wrench/services/Service.h>
45 unsigned long num_cores,
47 WRENCH_PROPERTY_COLLECTION_TYPE property_list,
48 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list);
50 void start(std::string &pm_name);
58 void migrate(
const std::string &dst_pm_name);
73 simgrid::s4u::VirtualMachine *vm;
74 unsigned long num_cores;
77 WRENCH_PROPERTY_COLLECTION_TYPE property_list;
78 WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list;
86 #endif //WRENCH_S4U_VIRTUALMACHINE_H
WRENCH_PROPERTY_COLLECTION_TYPE getPropertyList()
Get the property list for the bare-metal compute service that is to run on the VM ({} means "use all ...
Definition: S4U_VirtualMachine.cpp:184
S4U_VirtualMachine(const std::string &vm_hostname, unsigned long num_cores, double ram_memory, WRENCH_PROPERTY_COLLECTION_TYPE property_list, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list)
Constructor.
Definition: S4U_VirtualMachine.cpp:33
unsigned long getNumCores()
Get the number of cores.
Definition: S4U_VirtualMachine.cpp:60
std::string getPhysicalHostname()
Get the physical hostname.
Definition: S4U_VirtualMachine.cpp:47
void suspend()
Suspend the VM.
Definition: S4U_VirtualMachine.cpp:101
double getMemory()
Get the memory_manager_service consumption.
Definition: S4U_VirtualMachine.cpp:68
void start(std::string &pm_name)
Start the VM.
Definition: S4U_VirtualMachine.cpp:76
Definition: Action.cpp:28
WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE getMessagePayloadList()
Get the message payload list for the bare-metal compute service that will run on the VM ({} means "us...
Definition: S4U_VirtualMachine.cpp:192
std::string getStateAsString()
Get the VM's state as a string.
Definition: S4U_VirtualMachine.cpp:150
State
VM state enum.
Definition: S4U_VirtualMachine.h:38
void migrate(const std::string &dst_pm_name)
Migrate the VM.
Definition: S4U_VirtualMachine.cpp:167
State getState()
Get the VM's state.
Definition: S4U_VirtualMachine.cpp:142
A wrapper for the simgrid::s4u::VirtualMachine class.
Definition: S4U_VirtualMachine.h:28
static std::unordered_map< std::string, std::string > vm_to_pm_map
A map to keep track of VM-to-PM mapping.
Definition: S4U_VirtualMachine.h:35
void shutdown()
Shutdown the VM.
Definition: S4U_VirtualMachine.cpp:125
void resume()
Resume the VM.
Definition: S4U_VirtualMachine.cpp:113