X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d155fd69fa99c97b3a9c86bb7f2e472c2e7332df..2489210b4ea8d03fbece8db288ef9e3ff6725723:/examples/msg/cloud/masterslave_virtual_machines.c diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index e0d4374f26..ab8c47dd55 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -53,14 +53,14 @@ int master_fun(int argc, char *argv[]) msg_host_t *pms = xbt_new(msg_host_t, workers_count); xbt_dynar_t vms = xbt_dynar_new(sizeof(msg_vm_t), NULL); - /* Retrive the PMs that will launch worker processes. */ + /* Retrieve the PMs that will launch worker processes. */ for (i = 1; i < argc; i++) pms[i - 1] = MSG_get_host_by_name(argv[i]); /* Launch VMs and worker processes. One VM per PM, and one worker process per VM. */ - XBT_INFO("Launch %ld VMs", workers_count); + XBT_INFO("Launch %d VMs", workers_count); for (i=0; i< workers_count; i++) { char *vm_name = bprintf("VM%02d", i); char *pr_name = bprintf("WRK%02d", i); @@ -73,6 +73,12 @@ int master_fun(int argc, char *argv[]) XBT_INFO("create %s", vm_name); msg_vm_t vm = MSG_vm_create_core(pms[i], vm_name); + + s_ws_params_t params; + memset(¶ms, 0, sizeof(params)); + params.ramsize = 1L * 1024 * 1024 * 1024; // 1Gbytes + MSG_host_set_params(vm, ¶ms); + MSG_vm_start(vm); xbt_dynar_push(vms, &vm);