From a54115f73c0eb3f3b73de7ed711d586e895fa5f3 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 2 Mar 2012 11:44:58 +0100 Subject: [PATCH 1/3] dom0/hvm: use stdvga - supports higher resolutions --- dom0/misc/vm-template-hvm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/dom0/misc/vm-template-hvm.conf b/dom0/misc/vm-template-hvm.conf index 44b31fb5..8361bd6e 100644 --- a/dom0/misc/vm-template-hvm.conf +++ b/dom0/misc/vm-template-hvm.conf @@ -9,6 +9,7 @@ builder='hvm' memory={mem} viridian=1 kernel='hvmloader' +stdvga=1 #acpi=1 #apic=1 boot='dca' From cec197ac8b41607407228b763a20d486af30e10b Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 2 Mar 2012 12:04:57 +0100 Subject: [PATCH 2/3] dom0/core: set *_img to None for HVM instead of removing attr There are many places that assume existence of this attributes. --- dom0/qvm-core/qubes.py | 6 +++--- dom0/qvm-tools/qvm-prefs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index d6f58bfc..91e10a0d 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -1333,7 +1333,7 @@ class QubesVm(object): attrs["dir_path"] = self.dir_path # Simple paths for prop in ['conf_file', 'root_img', 'volatile_img', 'private_img']: - if hasattr(self, prop): + if hasattr(self, prop) and self.__getattribute__(prop) is not None: attrs[prop] = self.relative_path(self.__getattribute__(prop)) # Simple string attrs for prop in ['memory', 'maxmem', 'pcidevs', 'vcpus', 'internal',\ @@ -2053,13 +2053,13 @@ class QubesHVm(QubesVm): super(QubesHVm, self).__init__(**kwargs) self.updateable = True self.config_file_template = config_template_hvm + self.private_img = None + self.volatile_img = None # remove settings not used by HVM (at least for now) self.__delattr__('kernel') self.__delattr__('kernelopts') self.__delattr__('uses_default_kernel') self.__delattr__('uses_default_kernelopts') - self.__delattr__('private_img') - self.__delattr__('volatile_img') # HVM doesn't support dynamic memory management self.maxmem = self.memory diff --git a/dom0/qvm-tools/qvm-prefs b/dom0/qvm-tools/qvm-prefs index df3a4636..2efbf940 100755 --- a/dom0/qvm-tools/qvm-prefs +++ b/dom0/qvm-tools/qvm-prefs @@ -51,10 +51,10 @@ def do_list(vm): print fmt.format ("root COW img", vm.rootcow_img) if vm.template_vm is not None: print fmt.format ("root img", vm.template_vm.root_img) - if hasattr(vm, 'volatile_img'): + if hasattr(vm, 'volatile_img') and vm.volatile_img is not None: print fmt.format ("root volatile img", vm.volatile_img) - if hasattr(vm, 'private_img'): + if hasattr(vm, 'private_img') and vm.private_img is not None: print fmt.format ("private img", vm.private_img) print fmt.format ("vcpus", str(vm.vcpus)) print fmt.format ("memory", vm.memory) From e4b23f6670920216830811437f4783b5a8ea9c86 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 2 Mar 2012 13:49:23 +0100 Subject: [PATCH 3/3] dom0/network: use static MAC for VMs --- dom0/qvm-core/qubes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 91e10a0d..597be74d 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -815,7 +815,7 @@ class QubesVm(object): args['maxmem'] = str(self.maxmem) args['vcpus'] = str(self.vcpus) if self.netvm_vm is not None: - args['netdev'] = "'script=/etc/xen/scripts/vif-route-qubes,ip={ip}".format(ip=self.ip) + args['netdev'] = "'mac=00:16:3E:5E:6C:{qid:02X},script=/etc/xen/scripts/vif-route-qubes,ip={ip}".format(ip=self.ip, qid=self.qid) if self.netvm_vm.qid != 0: args['netdev'] += ",backend={0}".format(self.netvm_vm.name) args['netdev'] += "'"