diff --git a/gns3server/modules/project.py b/gns3server/modules/project.py index f14b74df..28f626f7 100644 --- a/gns3server/modules/project.py +++ b/gns3server/modules/project.py @@ -647,7 +647,6 @@ class Project: "iou": "IOUDevice", "docker": "DockerVM" } - vm_directory = os.path.join(self.path, "servers", "vm", "project-files") vm_server_use = False @@ -657,11 +656,11 @@ class Project: os.makedirs(vm_directory, exist_ok=True) shutil.move(module_directory, os.path.join(vm_directory, module)) - # Patch node to use the GNS3 VM - for node in topology["topology"]["nodes"]: - if node["type"] == device_type: - node["server_id"] = 2 - vm_server_use = True + # Patch node to use the GNS3 VM + for node in topology["topology"]["nodes"]: + if node["type"] == device_type: + node["server_id"] = 2 + vm_server_use = True # We use the GNS3 VM. We need to add the server to the list if vm_server_use: