From 7801cf85c0a5db245c55392c29ac8b8e23e6dcc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 20 Dec 2019 16:18:35 +0100 Subject: [PATCH] Fixed opennebula mac retrieval (moved to a later stage, just after "power on" vm) --- server/src/uds/services/OpenNebula/deployment.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/uds/services/OpenNebula/deployment.py b/server/src/uds/services/OpenNebula/deployment.py index bec827e6..8f90c2dc 100644 --- a/server/src/uds/services/OpenNebula/deployment.py +++ b/server/src/uds/services/OpenNebula/deployment.py @@ -302,7 +302,7 @@ class LiveDeployment(UserDeployment): # pylint: disable=too-many-public-methods raise Exception('Can\'t create machine') # Get IP & MAC (early stage) - self._mac, self._ip = self.service().getNetInfo(self._vmid) + # self._mac, self._ip = self.service().getNetInfo(self._vmid) return State.RUNNING @@ -331,6 +331,10 @@ class LiveDeployment(UserDeployment): # pylint: disable=too-many-public-methods Powers on the machine """ self.service().startMachine(self._vmid) + + # Get IP & MAC (later stage, after "powering on") + self._mac, self._ip = self.service().getNetInfo(self._vmid) + return State.RUNNING def __suspendMachine(self) -> str: