Instead of explicitly calling the ctor with new, use the physical host
as a factory thanks to the new Host::create_vm() method.
14 files changed:
{
simgrid::s4u::Host* pm0 = simgrid::s4u::Host::by_name("Fafard");
{
simgrid::s4u::Host* pm0 = simgrid::s4u::Host::by_name("Fafard");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
+ auto* vm1 = pm0->create_vm("VM1", 1);
vm0->start();
vm1->start();
vm0->start();
vm1->start();
test_two_activities(pm0, pm0);
XBT_INFO(".");
test_two_activities(pm0, pm0);
XBT_INFO(".");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
vm0->start();
XBT_INFO("# 3. Put a single activity on a VM.");
vm0->start();
XBT_INFO("# 3. Put a single activity on a VM.");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->start();
XBT_INFO("# 6. Put an activity on a PM and an activity on a VM.");
vm0->start();
XBT_INFO("# 6. Put an activity on a PM and an activity on a VM.");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->set_bound(pm0->get_speed() / 10);
vm0->start();
vm0->set_bound(pm0->get_speed() / 10);
vm0->start();
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->set_ramsize(1e9); // 1GB
vm0->start();
vm0->set_ramsize(1e9); // 1GB
vm0->start();
simgrid::s4u::Host* pm1 = simgrid::s4u::Host::by_name("Tremblay");
simgrid::s4u::Host* pm2 = simgrid::s4u::Host::by_name("Bourassa");
simgrid::s4u::Host* pm1 = simgrid::s4u::Host::by_name("Tremblay");
simgrid::s4u::Host* pm2 = simgrid::s4u::Host::by_name("Bourassa");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
vm0->set_ramsize(1e9); // 1Gbytes
vm0->start();
vm0->set_ramsize(1e9); // 1Gbytes
vm0->start();
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->set_ramsize(1e8); // 100Mbytes
vm0->start();
vm0->set_ramsize(1e8); // 100Mbytes
vm0->start();
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
+ auto* vm1 = pm0->create_vm("VM1", 1);
vm0->set_ramsize(1e9); // 1Gbytes
vm1->set_ramsize(1e9); // 1Gbytes
vm0->set_ramsize(1e9); // 1Gbytes
vm1->set_ramsize(1e9); // 1Gbytes
vm0->destroy();
vm1->destroy();
vm0->destroy();
vm1->destroy();
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
- vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
+ vm1 = pm0->create_vm("VM1", 1);
vm0->set_ramsize(1e9); // 1Gbytes
vm1->set_ramsize(1e9); // 1Gbytes
vm0->set_ramsize(1e9); // 1Gbytes
vm1->set_ramsize(1e9); // 1Gbytes
"## Test 2 (started): check impact of running an activity inside a VM (there is no degradation for the moment)");
XBT_INFO("### Put a VM on a PM, and put an activity to the VM");
"## Test 2 (started): check impact of running an activity inside a VM (there is no degradation for the moment)");
XBT_INFO("### Put a VM on a PM, and put an activity to the VM");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
vm0->start();
launch_computation_worker(vm0);
simgrid::s4u::this_actor::sleep_for(2);
vm0->start();
launch_computation_worker(vm0);
simgrid::s4u::this_actor::sleep_for(2);
"the moment)");
XBT_INFO("### Put a VM on a PM, and put an activity to the PM");
"the moment)");
XBT_INFO("### Put a VM on a PM, and put an activity to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->start();
launch_computation_worker(pm0);
simgrid::s4u::this_actor::sleep_for(2);
vm0->start();
launch_computation_worker(pm0);
simgrid::s4u::this_actor::sleep_for(2);
" the moment, there is no degradation for the VMs. Hence, the time should be equals to the time of test 1");
XBT_INFO("### Put two VMs on a PM, and put an activity to each VM");
" the moment, there is no degradation for the VMs. Hence, the time should be equals to the time of test 1");
XBT_INFO("### Put two VMs on a PM, and put an activity to each VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm0, 1);
+ auto* vm1 = pm0->create_vm("VM1", 1);
launch_computation_worker(vm0);
launch_computation_worker(vm1);
simgrid::s4u::this_actor::sleep_for(2);
launch_computation_worker(vm0);
launch_computation_worker(vm1);
simgrid::s4u::this_actor::sleep_for(2);
vm1->destroy();
XBT_INFO("### Put a VM on each PM, and put an activity to each VM");
vm1->destroy();
XBT_INFO("### Put a VM on each PM, and put an activity to each VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
- vm1 = new simgrid::s4u::VirtualMachine("VM1", pm1, 1);
+ vm0 = pm0->create_vm("VM0", 1);
+ vm1 = pm1->create_vm("VM1", 1);
vm0->start();
vm1->start();
launch_computation_worker(vm0);
vm0->start();
vm1->start();
launch_computation_worker(vm0);
simgrid::s4u::this_actor::sleep_for(5);
XBT_INFO("### Make a connection between PM0 and VM0@PM0");
simgrid::s4u::this_actor::sleep_for(5);
XBT_INFO("### Make a connection between PM0 and VM0@PM0");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->start();
launch_communication_worker(pm0, vm0);
simgrid::s4u::this_actor::sleep_for(5);
vm0->destroy();
XBT_INFO("### Make a connection between PM0 and VM0@PM1");
vm0->start();
launch_communication_worker(pm0, vm0);
simgrid::s4u::this_actor::sleep_for(5);
vm0->destroy();
XBT_INFO("### Make a connection between PM0 and VM0@PM1");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm1, 1);
+ vm0 = pm1->create_vm("VM0", 1);
launch_communication_worker(pm0, vm0);
simgrid::s4u::this_actor::sleep_for(5);
vm0->destroy();
XBT_INFO("### Make two connections between PM0 and VM0@PM1");
launch_communication_worker(pm0, vm0);
simgrid::s4u::this_actor::sleep_for(5);
vm0->destroy();
XBT_INFO("### Make two connections between PM0 and VM0@PM1");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm1, 1);
+ vm0 = pm1->create_vm("VM0", 1);
vm0->start();
launch_communication_worker(pm0, vm0);
launch_communication_worker(pm0, vm0);
vm0->start();
launch_communication_worker(pm0, vm0);
launch_communication_worker(pm0, vm0);
vm0->destroy();
XBT_INFO("### Make a connection between PM0 and VM0@PM1, and also make a connection between PM0 and PM1");
vm0->destroy();
XBT_INFO("### Make a connection between PM0 and VM0@PM1, and also make a connection between PM0 and PM1");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm1, 1);
+ vm0 = pm1->create_vm("VM0", 1);
vm0->start();
launch_communication_worker(pm0, vm0);
launch_communication_worker(pm0, pm1);
vm0->start();
launch_communication_worker(pm0, vm0);
launch_communication_worker(pm0, pm1);
vm0->destroy();
XBT_INFO("### Make a connection between VM0@PM0 and PM1@PM1, and also make a connection between VM0@PM0 and VM1@PM1");
vm0->destroy();
XBT_INFO("### Make a connection between VM0@PM0 and PM1@PM1, and also make a connection between VM0@PM0 and VM1@PM1");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
- vm1 = new simgrid::s4u::VirtualMachine("VM1", pm1, 1);
+ vm0 = pm0->create_vm("VM0", 1);
+ vm1 = pm1->create_vm("VM1", 1);
vm0->start();
vm1->start();
launch_communication_worker(vm0, vm1);
vm0->start();
vm1->start();
launch_communication_worker(vm0, vm1);
XBT_INFO("## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the"
" network one");
XBT_INFO("### Relocate VM0 between PM0 and PM1");
XBT_INFO("## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the"
" network one");
XBT_INFO("### Relocate VM0 between PM0 and PM1");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
vm0->set_ramsize(1L * 1024 * 1024 * 1024); // 1GiB
vm0->start();
vm0->set_ramsize(1L * 1024 * 1024 * 1024); // 1GiB
vm0->start();
/* Host 1 */
XBT_INFO("Creating and starting two VMs");
/* Host 1 */
XBT_INFO("Creating and starting two VMs");
- auto* vm_host1 = new simgrid::s4u::VirtualMachine("vm_host1", host1, 1);
+ auto* vm_host1 = host1->create_vm("vm_host1", 1);
- auto* vm_host2 = new simgrid::s4u::VirtualMachine("vm_host2", host2, 1);
+ auto* vm_host2 = host2->create_vm("vm_host2", 1);
vm_host2->start();
XBT_INFO("Create two activities on Host1: both inside a VM");
vm_host2->start();
XBT_INFO("Create two activities on Host1: both inside a VM");
void add_disk(const Disk* disk);
void remove_disk(const std::string& disk_name);
void add_disk(const Disk* disk);
void remove_disk(const std::string& disk_name);
+ VirtualMachine* create_vm(const std::string& name, int core_amount);
+ VirtualMachine* create_vm(const std::string& name, int core_amount, size_t ramsize);
+
void route_to(const Host* dest, std::vector<Link*>& links, double* latency) const;
void route_to(const Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency) const;
void route_to(const Host* dest, std::vector<Link*>& links, double* latency) const;
void route_to(const Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency) const;
/* For the moment, intensity_rate is the percentage against the migration bandwidth */
/* For the moment, intensity_rate is the percentage against the migration bandwidth */
- auto* vm = new simgrid::s4u::VirtualMachine(name, pm, coreAmount, static_cast<sg_size_t>(ramsize) * 1024 * 1024);
+ auto* vm = pm->create_vm(name, coreAmount, static_cast<sg_size_t>(ramsize) * 1024 * 1024);
sg_vm_set_dirty_page_intensity(vm, dp_intensity / 100.0);
sg_vm_set_working_set_memory(vm, vm->get_ramsize() * 0.9); // assume working set memory is 90% of ramsize
sg_vm_set_migration_speed(vm, mig_netspeed * 1024 * 1024.0);
sg_vm_set_dirty_page_intensity(vm, dp_intensity / 100.0);
sg_vm_set_working_set_memory(vm, vm->get_ramsize() * 0.9); // assume working set memory is 90% of ramsize
sg_vm_set_migration_speed(vm, mig_netspeed * 1024 * 1024.0);
*/
sg_vm_t sg_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount)
{
*/
sg_vm_t sg_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount)
{
- return new simgrid::s4u::VirtualMachine(name, pm, coreAmount);
+ return pm->create_vm(name, coreAmount);
}
const char* sg_vm_get_name(const_sg_vm_t vm)
}
const char* sg_vm_get_name(const_sg_vm_t vm)
kernel::actor::simcall([this, disk_name] { this->pimpl_->remove_disk(disk_name); });
}
kernel::actor::simcall([this, disk_name] { this->pimpl_->remove_disk(disk_name); });
}
+VirtualMachine* Host::create_vm(const std::string& name, int core_amount)
+{
+ return new VirtualMachine(name, this, core_amount);
+}
+
+VirtualMachine* Host::create_vm(const std::string& name, int core_amount, size_t ramsize)
+{
+ return new VirtualMachine(name, this, core_amount, ramsize);
+}
+
ExecPtr Host::exec_init(double flops) const
{
return this_actor::exec_init(flops);
ExecPtr Host::exec_init(double flops) const
{
return this_actor::exec_init(flops);
} else if (chooser == "( [o]1 )1") {
XBT_INFO("### Test '%s'. A task in a VM on a PM.", chooser.c_str());
} else if (chooser == "( [o]1 )1") {
XBT_INFO("### Test '%s'. A task in a VM on a PM.", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
run_test_process("( [X]1 )1", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [X]1 )1", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [oo]1 )1") {
XBT_INFO("### Test '%s'. 2 tasks co-located in a VM on a PM.", chooser.c_str());
} else if (chooser == "( [oo]1 )1") {
XBT_INFO("### Test '%s'. 2 tasks co-located in a VM on a PM.", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
run_test_process("( [Xo]1 )1", vm0, flop_amount / 2);
run_test_process("( [oX]1 )1", vm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [Xo]1 )1", vm0, flop_amount / 2);
run_test_process("( [oX]1 )1", vm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [ ]1 o )1") {
XBT_INFO("### Test '%s'. 1 task collocated with an empty VM", chooser.c_str());
} else if (chooser == "( [ ]1 o )1") {
XBT_INFO("### Test '%s'. 1 task collocated with an empty VM", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
run_test_process("( [ ]1 X )1", pm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [ ]1 X )1", pm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [o]1 o )1") {
XBT_INFO("### Test '%s'. A task in a VM, plus a task", chooser.c_str());
} else if (chooser == "( [o]1 o )1") {
XBT_INFO("### Test '%s'. A task in a VM, plus a task", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
run_test_process("( [X]1 o )1", vm0, flop_amount / 2);
run_test_process("( [o]1 X )1", pm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [X]1 o )1", vm0, flop_amount / 2);
run_test_process("( [o]1 X )1", pm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [oo]1 o )1") {
XBT_INFO("### Test '%s'. 2 tasks in a VM, plus a task", chooser.c_str());
} else if (chooser == "( [oo]1 o )1") {
XBT_INFO("### Test '%s'. 2 tasks in a VM, plus a task", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ vm0 = pm0->create_vm("VM0", 1);
run_test_process("( [Xo]1 o )1", vm0, flop_amount / 4);
run_test_process("( [oX]1 o )1", vm0, flop_amount / 4);
run_test_process("( [oo]1 X )1", pm0, flop_amount / 2);
run_test_process("( [Xo]1 o )1", vm0, flop_amount / 4);
run_test_process("( [oX]1 o )1", vm0, flop_amount / 4);
run_test_process("( [oo]1 X )1", pm0, flop_amount / 2);
} else if (chooser == "( [o]1 )2") {
XBT_INFO("### Test '%s'. A task in a VM on a bicore PM", chooser.c_str());
} else if (chooser == "( [o]1 )2") {
XBT_INFO("### Test '%s'. A task in a VM on a bicore PM", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
run_test_process("( [X]1 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [X]1 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [oo]1 )2") {
XBT_INFO("### Test '%s'. 2 tasks in a VM on a bicore PM", chooser.c_str());
} else if (chooser == "( [oo]1 )2") {
XBT_INFO("### Test '%s'. 2 tasks in a VM on a bicore PM", chooser.c_str());
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
run_test_process("( [Xx]1 )2", vm0, flop_amount / 2);
run_test_process("( [xX]1 )2", vm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [Xx]1 )2", vm0, flop_amount / 2);
run_test_process("( [xX]1 )2", vm0, flop_amount / 2);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [ ]1 o )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
} else if (chooser == "( [ ]1 o )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
run_test_process("( [ ]1 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [ ]1 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [o]1 o )2") {
XBT_INFO("### Put a VM on a PM, put a task to the PM and a task to the VM");
} else if (chooser == "( [o]1 o )2") {
XBT_INFO("### Put a VM on a PM, put a task to the PM and a task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
run_test_process("( [X]1 x )2", vm0, flop_amount);
run_test_process("( [x]1 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [X]1 x )2", vm0, flop_amount);
run_test_process("( [x]1 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [o]1 [ ]1 )2") {
XBT_INFO("### Put two VMs on a PM, and put a task to one VM");
} else if (chooser == "( [o]1 [ ]1 )2") {
XBT_INFO("### Put two VMs on a PM, and put a task to one VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
+ auto* vm1 = pm2->create_vm("VM1", 1);
run_test_process("( [X]1 [ ]1 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [X]1 [ ]1 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [o]1 [o]1 )2") {
XBT_INFO("### Put two VMs on a PM, and put a task to each VM");
} else if (chooser == "( [o]1 [o]1 )2") {
XBT_INFO("### Put two VMs on a PM, and put a task to each VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
+ auto* vm1 = pm2->create_vm("VM1", 1);
run_test_process("( [X]1 [x]1 )2", vm0, flop_amount);
run_test_process("( [x]1 [X]1 )2", vm1, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [X]1 [x]1 )2", vm0, flop_amount);
run_test_process("( [x]1 [X]1 )2", vm1, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [o]1 [o]1 [ ]1 )2") {
XBT_INFO("### Put three VMs on a PM, and put a task to two VMs");
} else if (chooser == "( [o]1 [o]1 [ ]1 )2") {
XBT_INFO("### Put three VMs on a PM, and put a task to two VMs");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm2, 1);
- auto* vm2 = new simgrid::s4u::VirtualMachine("VM2", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
+ auto* vm1 = pm2->create_vm("VM1", 1);
+ auto* vm2 = pm2->create_vm("VM2", 1);
run_test_process("( [X]1 [x]1 [ ]1 )2", vm0, flop_amount);
run_test_process("( [x]1 [X]1 [ ]1 )2", vm1, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [X]1 [x]1 [ ]1 )2", vm0, flop_amount);
run_test_process("( [x]1 [X]1 [ ]1 )2", vm1, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [o]1 [o]1 [o]1 )2") {
XBT_INFO("### Put three VMs on a PM, and put a task to each VM");
} else if (chooser == "( [o]1 [o]1 [o]1 )2") {
XBT_INFO("### Put three VMs on a PM, and put a task to each VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 1);
- auto* vm1 = new simgrid::s4u::VirtualMachine("VM1", pm2, 1);
- auto* vm2 = new simgrid::s4u::VirtualMachine("VM2", pm2, 1);
+ vm0 = pm2->create_vm("VM0", 1);
+ auto* vm1 = pm2->create_vm("VM1", 1);
+ auto* vm2 = pm2->create_vm("VM2", 1);
run_test_process("( [X]1 [o]1 [o]1 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [o]1 [X]1 [o]1 )2", vm1, flop_amount * 2 / 3);
run_test_process("( [o]1 [o]1 [X]1 )2", vm2, flop_amount * 2 / 3);
run_test_process("( [X]1 [o]1 [o]1 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [o]1 [X]1 [o]1 )2", vm1, flop_amount * 2 / 3);
run_test_process("( [o]1 [o]1 [X]1 )2", vm2, flop_amount * 2 / 3);
} else if (chooser == "( [o]2 )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the VM");
} else if (chooser == "( [o]2 )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [X]2 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [X]2 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [oo]2 )2") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the VM");
} else if (chooser == "( [oo]2 )2") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [Xo]2 )2", vm0, flop_amount);
run_test_process("( [oX]2 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [Xo]2 )2", vm0, flop_amount);
run_test_process("( [oX]2 )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [ooo]2 )2") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the VM");
} else if (chooser == "( [ooo]2 )2") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [Xoo]2 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [oXo]2 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [ooX]2 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [Xoo]2 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [oXo]2 )2", vm0, flop_amount * 2 / 3);
run_test_process("( [ooX]2 )2", vm0, flop_amount * 2 / 3);
} else if (chooser == "( [ ]2 o )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
} else if (chooser == "( [ ]2 o )2") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [ ]2 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [ ]2 X )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [o]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and one task to the VM");
} else if (chooser == "( [o]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and one task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [o]2 X )2", pm2, flop_amount);
run_test_process("( [X]2 o )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [o]2 X )2", pm2, flop_amount);
run_test_process("( [X]2 o )2", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [oo]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and two tasks to the VM");
} else if (chooser == "( [oo]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [oo]2 X )2", pm2, flop_amount * 2 / 3);
run_test_process("( [Xo]2 o )2", vm0, flop_amount * 2 / 3);
run_test_process("( [oX]2 o )2", vm0, flop_amount * 2 / 3);
run_test_process("( [oo]2 X )2", pm2, flop_amount * 2 / 3);
run_test_process("( [Xo]2 o )2", vm0, flop_amount * 2 / 3);
run_test_process("( [oX]2 o )2", vm0, flop_amount * 2 / 3);
} else if (chooser == "( [ooo]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and three tasks to the VM");
} else if (chooser == "( [ooo]2 o )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and three tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [ooo]2 X )2", pm2, flop_amount * 2 / 3);
run_test_process("( [Xoo]2 o )2", vm0, (flop_amount * 4 / 3) / 3); // VM_share/3
run_test_process("( [oXo]2 o )2", vm0, (flop_amount * 4 / 3) / 3); // VM_share/3
run_test_process("( [ooo]2 X )2", pm2, flop_amount * 2 / 3);
run_test_process("( [Xoo]2 o )2", vm0, (flop_amount * 4 / 3) / 3); // VM_share/3
run_test_process("( [oXo]2 o )2", vm0, (flop_amount * 4 / 3) / 3); // VM_share/3
} else if (chooser == "( [ ]2 oo )2") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM");
} else if (chooser == "( [ ]2 oo )2") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [ ]2 Xo )2", pm2, flop_amount);
run_test_process("( [ ]2 oX )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [ ]2 Xo )2", pm2, flop_amount);
run_test_process("( [ ]2 oX )2", pm2, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [o]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and one task to the VM");
} else if (chooser == "( [o]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and one task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [o]2 Xo )2", pm2, flop_amount * 2 / 3);
run_test_process("( [o]2 oX )2", pm2, flop_amount * 2 / 3);
run_test_process("( [X]2 oo )2", vm0, flop_amount * 2 / 3);
run_test_process("( [o]2 Xo )2", pm2, flop_amount * 2 / 3);
run_test_process("( [o]2 oX )2", pm2, flop_amount * 2 / 3);
run_test_process("( [X]2 oo )2", vm0, flop_amount * 2 / 3);
} else if (chooser == "( [oo]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and two tasks to the VM");
} else if (chooser == "( [oo]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [oo]2 Xo )2", pm2, flop_amount / 2);
run_test_process("( [oo]2 oX )2", pm2, flop_amount / 2);
run_test_process("( [Xo]2 oo )2", vm0, flop_amount / 2);
run_test_process("( [oo]2 Xo )2", pm2, flop_amount / 2);
run_test_process("( [oo]2 oX )2", pm2, flop_amount / 2);
run_test_process("( [Xo]2 oo )2", vm0, flop_amount / 2);
} else if (chooser == "( [ooo]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and three tasks to the VM");
} else if (chooser == "( [ooo]2 oo )2") {
XBT_INFO("### Put a VM on a PM, put one task to the PM and three tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm2, 2);
+ vm0 = pm2->create_vm("VM0", 2);
run_test_process("( [ooo]2 Xo )2", pm2, flop_amount * 2 / 4);
run_test_process("( [ooo]2 oX )2", pm2, flop_amount * 2 / 4);
run_test_process("( [Xoo]2 oo )2", vm0, flop_amount / 3);
run_test_process("( [ooo]2 Xo )2", pm2, flop_amount * 2 / 4);
run_test_process("( [ooo]2 oX )2", pm2, flop_amount * 2 / 4);
run_test_process("( [Xoo]2 oo )2", vm0, flop_amount / 3);
} else if (chooser == "( [o]2 )4") {
XBT_INFO("### Put a VM on a PM, and put a task to the VM");
} else if (chooser == "( [o]2 )4") {
XBT_INFO("### Put a VM on a PM, and put a task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [X]2 )4", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [X]2 )4", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [oo]2 )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the VM");
} else if (chooser == "( [oo]2 )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [Xo]2 )4", vm0, flop_amount);
run_test_process("( [oX]2 )4", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [Xo]2 )4", vm0, flop_amount);
run_test_process("( [oX]2 )4", vm0, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [ooo]2 )4") {
XBT_INFO("### ( [ooo]2 )4: Put a VM on a PM, and put three tasks to the VM");
} else if (chooser == "( [ooo]2 )4") {
XBT_INFO("### ( [ooo]2 )4: Put a VM on a PM, and put three tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [Xoo]2 )4", vm0, flop_amount * 2 / 3);
run_test_process("( [oXo]2 )4", vm0, flop_amount * 2 / 3);
run_test_process("( [ooX]2 )4", vm0, flop_amount * 2 / 3);
run_test_process("( [Xoo]2 )4", vm0, flop_amount * 2 / 3);
run_test_process("( [oXo]2 )4", vm0, flop_amount * 2 / 3);
run_test_process("( [ooX]2 )4", vm0, flop_amount * 2 / 3);
} else if (chooser == "( [ ]2 o )4") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
} else if (chooser == "( [ ]2 o )4") {
XBT_INFO("### Put a VM on a PM, and put a task to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [ ]2 X )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
run_test_process("( [ ]2 X )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
test_energy_consumption(chooser, 1);
} else if (chooser == "( [ ]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM");
} else if (chooser == "( [ ]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [ ]2 Xo )4", pm4, flop_amount);
run_test_process("( [ ]2 oX )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [ ]2 Xo )4", pm4, flop_amount);
run_test_process("( [ ]2 oX )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [ ]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM");
} else if (chooser == "( [ ]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [ ]2 Xoo )4", pm4, flop_amount);
run_test_process("( [ ]2 oXo )4", pm4, flop_amount);
run_test_process("( [ ]2 ooX )4", pm4, flop_amount);
run_test_process("( [ ]2 Xoo )4", pm4, flop_amount);
run_test_process("( [ ]2 oXo )4", pm4, flop_amount);
run_test_process("( [ ]2 ooX )4", pm4, flop_amount);
} else if (chooser == "( [ ]2 oooo )4") {
XBT_INFO("### Put a VM on a PM, and put four tasks to the PM");
} else if (chooser == "( [ ]2 oooo )4") {
XBT_INFO("### Put a VM on a PM, and put four tasks to the PM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [ ]2 Xooo )4", pm4, flop_amount);
run_test_process("( [ ]2 oXoo )4", pm4, flop_amount);
run_test_process("( [ ]2 ooXo )4", pm4, flop_amount);
run_test_process("( [ ]2 Xooo )4", pm4, flop_amount);
run_test_process("( [ ]2 oXoo )4", pm4, flop_amount);
run_test_process("( [ ]2 ooXo )4", pm4, flop_amount);
} else if (chooser == "( [o]2 o )4") {
XBT_INFO("### Put a VM on a PM, and put one task to the PM and one task to the VM");
} else if (chooser == "( [o]2 o )4") {
XBT_INFO("### Put a VM on a PM, and put one task to the PM and one task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [X]2 o )4", vm0, flop_amount);
run_test_process("( [o]2 X )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
run_test_process("( [X]2 o )4", vm0, flop_amount);
run_test_process("( [o]2 X )4", pm4, flop_amount);
simgrid::s4u::this_actor::sleep_for(2);
} else if (chooser == "( [o]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM and one task to the VM");
} else if (chooser == "( [o]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM and one task to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [X]2 oo )4", vm0, flop_amount);
run_test_process("( [o]2 Xo )4", pm4, flop_amount);
run_test_process("( [o]2 oX )4", pm4, flop_amount);
run_test_process("( [X]2 oo )4", vm0, flop_amount);
run_test_process("( [o]2 Xo )4", pm4, flop_amount);
run_test_process("( [o]2 oX )4", pm4, flop_amount);
} else if (chooser == "( [oo]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM and two tasks to the VM");
} else if (chooser == "( [oo]2 oo )4") {
XBT_INFO("### Put a VM on a PM, and put two tasks to the PM and two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [Xo]2 oo )4", vm0, flop_amount);
run_test_process("( [oX]2 oo )4", vm0, flop_amount);
run_test_process("( [oo]2 Xo )4", pm4, flop_amount);
run_test_process("( [Xo]2 oo )4", vm0, flop_amount);
run_test_process("( [oX]2 oo )4", vm0, flop_amount);
run_test_process("( [oo]2 Xo )4", pm4, flop_amount);
} else if (chooser == "( [o]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and one tasks to the VM");
} else if (chooser == "( [o]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and one tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [X]2 ooo )4", vm0, flop_amount);
run_test_process("( [o]2 Xoo )4", pm4, flop_amount);
run_test_process("( [o]2 oXo )4", pm4, flop_amount);
run_test_process("( [X]2 ooo )4", vm0, flop_amount);
run_test_process("( [o]2 Xoo )4", pm4, flop_amount);
run_test_process("( [o]2 oXo )4", pm4, flop_amount);
} else if (chooser == "( [oo]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and two tasks to the VM");
} else if (chooser == "( [oo]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and two tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [Xo]2 ooo )4", vm0, flop_amount * 4 / 5);
run_test_process("( [oX]2 ooo )4", vm0, flop_amount * 4 / 5);
run_test_process("( [oo]2 Xoo )4", pm4, flop_amount * 4 / 5);
run_test_process("( [Xo]2 ooo )4", vm0, flop_amount * 4 / 5);
run_test_process("( [oX]2 ooo )4", vm0, flop_amount * 4 / 5);
run_test_process("( [oo]2 Xoo )4", pm4, flop_amount * 4 / 5);
} else if (chooser == "( [ooo]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and three tasks to the VM");
} else if (chooser == "( [ooo]2 ooo )4") {
XBT_INFO("### Put a VM on a PM, and put three tasks to the PM and three tasks to the VM");
- vm0 = new simgrid::s4u::VirtualMachine("VM0", pm4, 2);
+ vm0 = pm4->create_vm("VM0", 2);
run_test_process("( [Xoo]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3); // The VM has 8/5 of the PM
run_test_process("( [oXo]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3);
run_test_process("( [ooX]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3);
run_test_process("( [Xoo]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3); // The VM has 8/5 of the PM
run_test_process("( [oXo]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3);
run_test_process("( [ooX]2 ooo )4", vm0, (flop_amount * 8 / 5) / 3);
simgrid::s4u::Host* pm0 = simgrid::s4u::Host::by_name("Fafard");
simgrid::s4u::Host* pm1 = simgrid::s4u::Host::by_name("Tremblay");
simgrid::s4u::Host* pm0 = simgrid::s4u::Host::by_name("Fafard");
simgrid::s4u::Host* pm1 = simgrid::s4u::Host::by_name("Tremblay");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
vm0->set_ramsize(1e9); // 1Gbytes
vm0->start();
vm0->set_ramsize(1e9); // 1Gbytes
vm0->start();
static void master_main()
{
auto* pm0 = simgrid::s4u::Host::by_name("Fafard");
static void master_main()
{
auto* pm0 = simgrid::s4u::Host::by_name("Fafard");
- auto* vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
+ auto* vm0 = pm0->create_vm("VM0", 1);
vm0->start();
simgrid::s4u::Actor::create("compute", vm0, computation_fun);
vm0->start();
simgrid::s4u::Actor::create("compute", vm0, computation_fun);
XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch an actor inside the VM, and turn off the node");
// Create VM0
XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch an actor inside the VM, and turn off the node");
// Create VM0
- vm0 = new simgrid::s4u::VirtualMachine("vm0", jupiter, 1);
+ vm0 = jupiter->create_vm("vm0", 1);
vm0->start();
daemon = simgrid::s4u::Actor::create("actor_daemon", vm0, actor_daemon);
vm0->start();
daemon = simgrid::s4u::Actor::create("actor_daemon", vm0, actor_daemon);
e.load_platform(argv[1]);
auto* pm = e.host_by_name("host1");
e.load_platform(argv[1]);
auto* pm = e.host_by_name("host1");
- auto* vm = new simgrid::s4u::VirtualMachine("VM0", pm, 1 /*nCores*/);
+ auto* vm = pm->create_vm("VM0", 1 /*nCores*/);
vm->set_ramsize(1250000000)->start();
simgrid::s4u::Actor::create("executor", vm, task_executor);
vm->set_ramsize(1250000000)->start();
simgrid::s4u::Actor::create("executor", vm, task_executor);
static void master(const std::vector<simgrid::s4u::Host*>& hosts)
{
for (int i = 1; i <= 2; i++) {
static void master(const std::vector<simgrid::s4u::Host*>& hosts)
{
for (int i = 1; i <= 2; i++) {
- auto* vm = new simgrid::s4u::VirtualMachine("test_vm", hosts.at(i), 4);
+ auto* vm = hosts.at(i)->create_vm("test_vm", 4);
vm->start();
simgrid::s4u::Actor::create("life_cycle_manager-" + std::to_string(i), vm, life_cycle_manager);
vm->start();
simgrid::s4u::Actor::create("life_cycle_manager-" + std::to_string(i), vm, life_cycle_manager);