SimGrid: VMs

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
VMs
MSG

This section describes the interface created to mimic IaaS clouds. More...

## Functions
msg_vm_t | MSG_vm_start (msg_host_t location, const char *name, int coreAmount)
| Opaque type describing a Virtual Machine.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.
xbt_dynar_t | MSG_vms_as_dynar (void)
| Returns a newly constructed dynar containing all existing VMs in the system.Don't forget to free the dynar after use.
int | MSG_vm_is_suspended (msg_vm_t vm)
| Returns whether the given VM is currently suspended.
int | MSG_vm_is_running (msg_vm_t vm)
| Returns whether the given VM is currently running.
void | MSG_vm_bind (msg_vm_t vm, msg_process_t process)
| Add the given process into the VM.Afterward, when the VM is migrated or suspended or whatever, the process will have the corresponding handling, too.
void | MSG_vm_unbind (msg_vm_t vm, msg_process_t process)
| Removes the given process from the given VM, and kill itWill raise a not_found exception if the process were not bound to that VM.
void | MSG_vm_migrate (msg_vm_t vm, msg_host_t destination)
| Immediately change the host on which all processes are running.No migration cost occurs. If you want to simulate this too, you want to use a MSG_task_send() before or after, depending on whether you want to do cold or hot migration.
void | MSG_vm_suspend (msg_vm_t vm)
| Immediately suspend the execution of all processes within the given VM.No suspension cost occurs. If you want to simulate this too, you want to use a MSG_file_write() before or after, depending on the exact semantic of VM suspend to you.
void | MSG_vm_resume (msg_vm_t vm)
| Immediately resumes the execution of all processes within the given VM.No resume cost occurs. If you want to simulate this too, you want to use a MSG_file_read() before or after, depending on the exact semantic of VM resume to you.
void | MSG_vm_shutdown (msg_vm_t vm)
| Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something. I'm not quite sure.
void | MSG_vm_reboot (msg_vm_t vm)
| Reboot the VM, restarting all the processes in it.
void | MSG_vm_destroy (msg_vm_t vm)
| Destroy a msg_vm_t.

## Detailed Description

This section describes the 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.

This interface is highly experimental at this point. Testing is welcomed, but do not expect too much of it right now. Even the interfaces may be changed in future releases of SimGrid (although things are expected to stabilize nicely before SimGrid v3.8). There is no guaranty on the rest of SimGrid, and there is less than that on this part.

## Function Documentation

msg_vm_t MSG_vm_start | ( | msg_host_t | location,
|  | const char * | name,
|  | int | coreAmount
| ) |  |

Opaque type describing a Virtual Machine.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.

Create a new (empty) VMs.

void MSG_vm_bind | ( | msg_vm_t | vm,
|  | msg_process_t | process
| ) |  |

Add the given process into the VM.Afterward, when the VM is migrated or suspended or whatever, the process will have the corresponding handling, too.