From cc4df5089da1017a57ebd2424c439ad8107980a1 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 2 Jun 2011 01:20:23 +0200 Subject: [PATCH] dom0: XC/XL infos for dom0 --- dom0/qvm-core/qubes.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 2abcb4c4..a4678a65 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -1589,6 +1589,23 @@ class QubesDom0NetVm(QubesNetVm): def start(self, debug_console = False, verbose = False): raise QubesException ("Cannot start Dom0 fake domain!") + def get_xl_dominfo(self): + if dry_run: + return + + domains = xl_ctx.list_domains() + for dominfo in domains: + if dominfo.domid == 0: + return dominfo + return None + + def get_xc_dominfo(self): + if dry_run: + return + + domains = xc.domain_getinfo(0, 1) + return domains[0] + def create_xml_element(self): return None