SimGrid  3.18
Versatile Simulation of Distributed Systems
msg_vm.cpp File Reference
#include <xbt/ex.hpp>
#include "simgrid/plugins/live_migration.h"
#include "src/instr/instr_private.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
#include "simgrid/host.h"
#include "simgrid/simix.hpp"
#include "xbt/string.hpp"

Classes

struct  migration_session
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (msg_vm, msg, "Cloud-oriented parts of the MSG API")
 
const char * MSG_vm_get_name (msg_vm_t vm)
 
void MSG_vm_set_params (msg_vm_t vm, vm_params_t params)
 Set the parameters of a given host. More...
 
void MSG_vm_get_params (msg_vm_t vm, vm_params_t params)
 Get the parameters of a given host. More...
 
void MSG_vm_set_ramsize (msg_vm_t vm, size_t size)
 
size_t MSG_vm_get_ramsize (msg_vm_t vm)
 
static int __MSG_vm_is_state (msg_vm_t vm, e_surf_vm_state_t state)
 
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

  • A VM is treated as a host.
More...
 
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

  • A VM is treated as a host.
More...
 
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...
 
static std::string get_mig_process_tx_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 
static std::string get_mig_process_rx_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
 
static std::string get_mig_task_name (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, int stage)
 
static int migration_rx_fun (int argc, char *argv[])
 
static sg_size_t send_migration_data (msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm, sg_size_t size, const std::string &mbox, int stage, int stage2_round, double mig_speed, double timeout)
 
static sg_size_t get_updated_size (double computed, double dp_rate, double dp_cap)
 
static int migration_tx_fun (int argc, char *argv[])
 
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...
 
void MSG_vm_set_bound (msg_vm_t vm, double bound)
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( msg_vm  ,
msg  ,
"Cloud-oriented parts of the MSG API"   
)

◆ MSG_vm_get_name()

const char* MSG_vm_get_name ( msg_vm_t  vm)

◆ MSG_vm_set_params()

void MSG_vm_set_params ( msg_vm_t  vm,
vm_params_t  params 
)

Set the parameters of a given host.

Parameters
vma vm
paramsa parameter object

◆ MSG_vm_get_params()

void MSG_vm_get_params ( msg_vm_t  vm,
vm_params_t  params 
)

Get the parameters of a given host.

Parameters
vmthe vm you are interested into
paramsa prameter object

◆ MSG_vm_set_ramsize()

void MSG_vm_set_ramsize ( msg_vm_t  vm,
size_t  size 
)

◆ MSG_vm_get_ramsize()

size_t MSG_vm_get_ramsize ( msg_vm_t  vm)

◆ __MSG_vm_is_state()

static int __MSG_vm_is_state ( msg_vm_t  vm,
e_surf_vm_state_t  state 
)
inlinestatic

◆ get_mig_process_tx_name()

static std::string get_mig_process_tx_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm 
)
static

◆ get_mig_process_rx_name()

static std::string get_mig_process_rx_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm 
)
static

◆ get_mig_task_name()

static std::string get_mig_task_name ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm,
int  stage 
)
static

◆ migration_rx_fun()

static int migration_rx_fun ( int  argc,
char *  argv[] 
)
static

◆ send_migration_data()

static sg_size_t send_migration_data ( msg_vm_t  vm,
msg_host_t  src_pm,
msg_host_t  dst_pm,
sg_size_t  size,
const std::string mbox,
int  stage,
int  stage2_round,
double  mig_speed,
double  timeout 
)
static

◆ get_updated_size()

static sg_size_t get_updated_size ( double  computed,
double  dp_rate,
double  dp_cap 
)
static

◆ migration_tx_fun()

static int migration_tx_fun ( int  argc,
char *  argv[] 
)
static

◆ MSG_vm_set_bound()

void MSG_vm_set_bound ( msg_vm_t  vm,
double  bound 
)