A wrapper for the simgrid::s4u::VirtualMachine class.
More...
#include <S4U_VirtualMachine.h>
|
enum | State { DOWN,
RUNNING,
SUSPENDED
} |
| VM state enum.
|
|
|
| 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. More...
|
|
double | getMemory () |
| Get the memory_manager_service consumption. More...
|
|
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") More...
|
|
unsigned long | getNumCores () |
| Get the number of cores. More...
|
|
std::string | getPhysicalHostname () |
| Get the physical hostname. More...
|
|
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") More...
|
|
State | getState () |
| Get the VM's state. More...
|
|
std::string | getStateAsString () |
| Get the VM's state as a string. More...
|
|
void | migrate (const std::string &dst_pm_name) |
| Migrate the VM. More...
|
|
void | resume () |
| Resume the VM.
|
|
void | shutdown () |
| Shutdown the VM.
|
|
void | start (std::string &pm_name) |
| Start the VM. More...
|
|
void | suspend () |
| Suspend the VM.
|
|
|
static std::unordered_map< std::string, std::string > | vm_to_pm_map |
| A map to keep track of VM-to-PM mapping.
|
|
A wrapper for the simgrid::s4u::VirtualMachine class.
◆ S4U_VirtualMachine()
wrench::S4U_VirtualMachine::S4U_VirtualMachine |
( |
const std::string & |
vm_name, |
|
|
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) |
◆ getMemory()
double wrench::S4U_VirtualMachine::getMemory |
( |
| ) |
|
Get the memory_manager_service consumption.
- Returns
- the memory_manager_service consumption
◆ getMessagePayloadList()
WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE wrench::S4U_VirtualMachine::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
◆ getNumCores()
unsigned long wrench::S4U_VirtualMachine::getNumCores |
( |
| ) |
|
Get the number of cores.
- Returns
- the number of cores
◆ getPhysicalHostname()
std::string wrench::S4U_VirtualMachine::getPhysicalHostname |
( |
| ) |
|
Get the physical hostname.
- Returns
- the physical hostname
◆ getPropertyList()
WRENCH_PROPERTY_COLLECTION_TYPE wrench::S4U_VirtualMachine::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
◆ getState()
Get the VM's state.
- Returns
- a state
◆ getStateAsString()
std::string wrench::S4U_VirtualMachine::getStateAsString |
( |
| ) |
|
Get the VM's state as a string.
- Returns
- a state as a string
◆ migrate()
void wrench::S4U_VirtualMachine::migrate |
( |
const std::string & |
dest_pm_name | ) |
|
Migrate the VM.
- Parameters
-
dest_pm_name | the name of the host to which to migrate the VM |
◆ start()
void wrench::S4U_VirtualMachine::start |
( |
std::string & |
pm_name | ) |
|
Start the VM.
- Parameters
-
pm_name | the physical host name |
The documentation for this class was generated from the following files: