wrench::S4U_VirtualMachine
-
class S4U_VirtualMachine
A wrapper for the simgrid::s4u::VirtualMachine class.
Public Types
Public Functions
-
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.
- Parameters:
vm_name – the name of the VM
num_cores – the number of cores the VM can use
ram_memory – the VM RAM memory_manager_service capacity
property_list – a property list ({} means use all defaults)
messagepayload_list – a message payload list ({} means use all defaults)
-
double getMemory()
Get the memory_manager_service consumption.
- Returns:
the memory_manager_service consumption
-
WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE getMessagePayloadList()
Get the message payload list for the bare-metal compute service that will run on the VM ({} means “use all defaults”)
- Returns:
a message payload list
-
unsigned long getNumCores()
Get the number of cores.
- Returns:
the number of cores
-
std::string getPhysicalHostname()
Get the physical hostname.
- Returns:
the physical hostname
-
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 defaults”)
- Returns:
a property list
-
std::string getStateAsString()
Get the VM’s state as a string.
- Returns:
a state as a string
-
void migrate(const std::string &dst_pm_name)
Migrate the VM.
- Parameters:
dest_pm_name – the name of the host to which to migrate the VM
-
void resume()
Resume the VM.
-
void shutdown()
Shutdown the VM.
-
void start(std::string &pm_name)
Start the VM.
- Parameters:
pm_name – the physical host name
-
void suspend()
Suspend the VM.
Public Static Attributes
-
static std::unordered_map<std::string, std::string> vm_to_pm_map
A map to keep track of VM-to-PM mapping.
-
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)