Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / teshsuite / s4u / vm-live-migration / vm-live-migration.cpp
index 86ba8aa..9b73523 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team.
+/* Copyright (c) 2007-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -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);