11 #ifndef WRENCH_S4U_VIRTUALMACHINE_H
12 #define WRENCH_S4U_VIRTUALMACHINE_H
14 #include <simgrid/s4u/VirtualMachine.hpp>
43 unsigned long num_cores,
45 std::map<std::string, std::string> property_list,
46 std::map<std::string, double> messagepayload_list);
48 void start(std::string &pm_name);
56 void migrate(
const std::string &dst_pm_name);
71 simgrid::s4u::VirtualMachine *vm;
72 unsigned long num_cores;
75 std::map<std::string, std::string> property_list;
76 std::map<std::string, double> messagepayload_list;
84 #endif //WRENCH_S4U_VIRTUALMACHINE_H
unsigned long getNumCores()
Get the number of cores.
Definition: S4U_VirtualMachine.cpp:61
std::map< std::string, double > getMessagePayloadList()
Get the message payload list for the bare_metal that will run on the VM ({} means "use all defaults")
Definition: S4U_VirtualMachine.cpp:193
std::string getPhysicalHostname()
Get the physical hostname.
Definition: S4U_VirtualMachine.cpp:48
void suspend()
Suspend the VM.
Definition: S4U_VirtualMachine.cpp:102
double getMemory()
Get the memory_manager_service consumption.
Definition: S4U_VirtualMachine.cpp:69
void start(std::string &pm_name)
Start the VM.
Definition: S4U_VirtualMachine.cpp:77
std::string getStateAsString()
Get the VM's state as a string.
Definition: S4U_VirtualMachine.cpp:151
State
VM state enum.
Definition: S4U_VirtualMachine.h:36
void migrate(const std::string &dst_pm_name)
Migrate the VM.
Definition: S4U_VirtualMachine.cpp:168
State getState()
Get the VM's state.
Definition: S4U_VirtualMachine.cpp:143
A wrapper for the simgrid::s4u::VirtualMachine class.
Definition: S4U_VirtualMachine.h:26
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:33
S4U_VirtualMachine(const std::string &vm_hostname, unsigned long num_cores, double ram_memory, std::map< std::string, std::string > property_list, std::map< std::string, double > messagepayload_list)
Constructor.
Definition: S4U_VirtualMachine.cpp:34
void shutdown()
Shutdown the VM.
Definition: S4U_VirtualMachine.cpp:126
void resume()
Resume the VM.
Definition: S4U_VirtualMachine.cpp:114
std::map< std::string, std::string > getPropertyList()
Get the property list for the bare_metal that is to run on the VM ({} means "use all defaults")
Definition: S4U_VirtualMachine.cpp:185