From 1b83e5c687f174a9d17b7fa936cbe6ca46a17078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 21 Nov 2013 14:49:42 +0100 Subject: [PATCH] hvm: default to template's MAC in MAC auto mode (#755) --- core-modules/01QubesHVm.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core-modules/01QubesHVm.py b/core-modules/01QubesHVm.py index f79dfe9e..99a712d2 100644 --- a/core-modules/01QubesHVm.py +++ b/core-modules/01QubesHVm.py @@ -289,6 +289,19 @@ class QubesHVm(QubesVm): return None return "vif{0}.+".format(self.stubdom_xid) + @property + def mac(self): + if self._mac is not None: + return self._mac + elif self.template is not None: + return self.template.mac + else: + return "00:16:3E:5E:6C:{qid:02X}".format(qid=self.qid) + + @mac.setter + def mac(self, value): + self._mac = value + def run(self, command, **kwargs): if self.qrexec_installed: if 'gui' in kwargs and kwargs['gui']==False: