SimGrid
3.18
Versatile Simulation of Distributed Systems
|
Interface created to mimic IaaS clouds.
With it, you can create virtual machines to put your processes into, and interact directly with the VMs to manage groups of processes.
Functions | |
int | MSG_vm_is_created (msg_vm_t vm) |
Opaque type describing a Virtual Machine. More... | |
int | MSG_vm_is_running (msg_vm_t vm) |
Returns whether the given VM is currently running. More... | |
int | MSG_vm_is_migrating (msg_vm_t vm) |
Returns whether the given VM is currently migrating. More... | |
int | MSG_vm_is_suspended (msg_vm_t vm) |
Returns whether the given VM is currently suspended, not running. More... | |
msg_vm_t | MSG_vm_create (msg_host_t pm, const char *name, int coreAmount, int ramsize, int mig_netspeed, int dp_intensity) |
Create a new VM with specified parameters. More... | |
msg_vm_t | MSG_vm_create_core (msg_host_t pm, const char *name) |
Create a new VM object with the default parameters
| |
msg_vm_t | MSG_vm_create_multicore (msg_host_t pm, const char *name, int coreAmount) |
Create a new VM object with the default parameters, but with a specified amount of cores
| |
void | MSG_vm_destroy (msg_vm_t vm) |
Destroy a VM. More... | |
void | MSG_vm_start (msg_vm_t vm) |
Start a vm (i.e., boot the guest operating system)If the VM cannot be started (because of memory over-provisioning), an exception is generated. More... | |
void | MSG_vm_shutdown (msg_vm_t vm) |
Immediately kills all processes within the given VM. More... | |
void | MSG_vm_migrate (msg_vm_t vm, msg_host_t dst_pm) |
Migrate the VM to the given host. More... | |
void | MSG_vm_suspend (msg_vm_t vm) |
Immediately suspend the execution of all processes within the given VM. More... | |
void | MSG_vm_resume (msg_vm_t vm) |
Resume the execution of the VM. More... | |
msg_host_t | MSG_vm_get_pm (msg_vm_t vm) |
Get the physical host of a given VM. More... | |
int MSG_vm_is_created | ( | msg_vm_t | vm | ) |
Opaque type describing a Virtual Machine.
Returns whether the given VM has just created, not running.
All this is highly experimental and the interface will probably change in the future. Please don't depend on this yet (although testing is welcomed if you feel so). Usual lack of guaranty of any kind applies here, and is even increased.
int MSG_vm_is_running | ( | msg_vm_t | vm | ) |
Returns whether the given VM is currently running.
int MSG_vm_is_migrating | ( | msg_vm_t | vm | ) |
Returns whether the given VM is currently migrating.
int MSG_vm_is_suspended | ( | msg_vm_t | vm | ) |
Returns whether the given VM is currently suspended, not running.
msg_vm_t MSG_vm_create | ( | msg_host_t | pm, |
const char * | name, | ||
int | coreAmount, | ||
int | ramsize, | ||
int | mig_netspeed, | ||
int | dp_intensity | ||
) |
Create a new VM with specified parameters.
pm | Physical machine that will host the VM |
name | Must be unique |
coreAmount | Must be >= 1 |
ramsize | [TODO] |
mig_netspeed | Amount of Mbyte/s allocated to the migration (cannot be larger than net_cap). Use 0 if unsure. |
dp_intensity | Dirty page percentage according to migNetSpeed, [0-100]. Use 0 if unsure. |
msg_vm_t MSG_vm_create_core | ( | msg_host_t | pm, |
const char * | name | ||
) |
Create a new VM object with the default parameters
The name of the VM must be unique among all hosts.
msg_vm_t MSG_vm_create_multicore | ( | msg_host_t | pm, |
const char * | name, | ||
int | coreAmount | ||
) |
Create a new VM object with the default parameters, but with a specified amount of cores
The name of the VM must be unique among all hosts.
Start a vm (i.e., boot the guest operating system)If the VM cannot be started (because of memory over-provisioning), an exception is generated.
Immediately kills all processes within the given VM.
Any memory that they allocated will be leaked, unless you used MSG_process_on_exit().
No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep().
void MSG_vm_migrate | ( | msg_vm_t | vm, |
msg_host_t | dst_pm | ||
) |
Migrate the VM to the given host.
Immediately suspend the execution of all processes within the given VM.
This function stops the execution of the VM. All the processes on this VM will pause. The state of the VM is preserved. We can later resume it again.
No suspension cost occurs.
Resume the execution of the VM.
All processes on the VM run again.
No resume cost occurs.
msg_host_t MSG_vm_get_pm | ( | msg_vm_t | vm | ) |
Get the physical host of a given VM.