From ef38ccfefaff0303257caf43f221f67ee9845bba Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 17 Dec 2018 22:42:18 -0600 Subject: [PATCH] Automatically create a symbolic link to the IOU image in the IOU working directory. Fixes #1484 --- gns3server/compute/iou/iou_vm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gns3server/compute/iou/iou_vm.py b/gns3server/compute/iou/iou_vm.py index 3d5de28b..6b0e7c30 100644 --- a/gns3server/compute/iou/iou_vm.py +++ b/gns3server/compute/iou/iou_vm.py @@ -517,6 +517,16 @@ class IOUVM(BaseNode): if "IOURC" not in os.environ: env["IOURC"] = iourc_path + + # create a symbolic link to the image to avoid IOU error "failed code signing checks" + # on newer images, see https://github.com/GNS3/gns3-server/issues/1484 + try: + symlink = os.path.join(self.working_dir, os.path.basename(self.path)) + if not os.path.islink(symlink): + os.symlink(self.path, symlink) + except OSError as e: + raise IOUError("Could not create symbolic link: {}".format(e)) + command = yield from self._build_command() try: log.info("Starting IOU: {}".format(command))