#include <xbt/functional.hpp>
+#include <simgrid/s4u/VirtualMachine.hpp>
#include <simgrid/simix/blocking_simcall.hpp>
-#include "src/mc/mc_replay.h"
+#include "mc/mc.h"
#include "smx_private.h"
+#include "src/kernel/activity/SynchroComm.hpp"
#include "src/mc/mc_forward.hpp"
-#include "xbt/ex.h"
-#include "mc/mc.h"
+#include "src/mc/mc_replay.h"
#include "src/simix/smx_host_private.h"
-#include "src/kernel/activity/SynchroComm.hpp"
-#include "src/surf/virtual_machine.hpp"
-
+#include "src/surf/VirtualMachineImpl.hpp"
+#include "xbt/ex.h"
#include <simgrid/simix.hpp>
return (e_smx_state_t) simcall_BODY_execution_wait(execution);
}
-
/**
* \ingroup simix_vm_management
* \brief Create a VM on the given physical host.
*
* \param name VM name
- * \param host Physical host
+ * \param dest Physical host on which to create the VM
*
* \return The host object of the VM
*/
-sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host)
+sg_host_t simcall_vm_create(const char* name, sg_host_t dest)
{
- return simgrid::simix::kernelImmediate([&name, &phys_host] {
- sg_host_t host = surf_vm_model->createVM(name, phys_host);
- SIMIX_host_create(host);
+ return simgrid::simix::kernelImmediate([&name, &dest] {
+ sg_host_t host = new simgrid::s4u::VirtualMachine(name, dest);
+ host->extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
return host;
});