Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the way VMs are created.
[simgrid.git] / teshsuite / s4u / vm-live-migration / vm-live-migration.cpp
index 3352418..11fd36a 100644 (file)
@@ -36,8 +36,8 @@ int main(int argc, char* argv[])
   xbt_assert(argc == 2, "Usage: %s platform.xml\n", argv[0]);
 
   e.load_platform(argv[1]);
-  auto* pm = simgrid::s4u::Host::by_name("host1");
-  auto* vm = new simgrid::s4u::VirtualMachine("VM0", pm, 1 /*nCores*/);
+  auto* pm = e.host_by_name("host1");
+  auto* vm = pm->create_vm("VM0", 1 /*nCores*/);
   vm->set_ramsize(1250000000)->start();
   simgrid::s4u::Actor::create("executor", vm, task_executor);