X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b3b356352e87ae00a20f737c48e19b0c8413455a..7ad85b03568dabade546f7948aaf7279059e9269:/src/simix/smx_vm.c diff --git a/src/simix/smx_vm.c b/src/simix/smx_vm.c index 401565cd59..d430a960fb 100644 --- a/src/simix/smx_vm.c +++ b/src/simix/smx_vm.c @@ -24,13 +24,13 @@ sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host) { /* Create surf associated resource */ surf_vm_model_create(name, ind_phys_host); - - SIMIX_host_create(name); + sg_host_t host = sg_host_by_name(name); + SIMIX_host_create(host); /* We will be able to register the VM to its physical host, so that we can promptly * retrieve the list VMs on the physical host. */ - return sg_host_by_name(name); + return host; }