#include "mc/mc.h"
#include "src/simix/smx_host_private.h"
#include "src/kernel/activity/SynchroComm.hpp"
+#include "src/surf/virtual_machine.hpp"
+
#include <simgrid/simix.hpp>
*
* \return The host object of the VM
*/
-void* simcall_vm_create(const char *name, sg_host_t phys_host)
+sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host)
{
- return simgrid::simix::kernelImmediate(std::bind(SIMIX_vm_create, name, phys_host));
+ return simgrid::simix::kernelImmediate([&] {
+ sg_host_t host = surf_vm_model->createVM(name, phys_host);
+ SIMIX_host_create(host);
+
+ return host;
+ });
}
/**