From 5dbad0179646610d7c1ce8b6f5292b311557bfa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 20 Sep 2013 04:01:17 +0200 Subject: [PATCH] Fill some more WNI settings Especially use new "wni" libvirt driver. --- core/settings-wni-Windows_NT.py | 10 +++++++++- core/storage/wni.py | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/settings-wni-Windows_NT.py b/core/settings-wni-Windows_NT.py index 21ff12e6..9be25eeb 100644 --- a/core/settings-wni-Windows_NT.py +++ b/core/settings-wni-Windows_NT.py @@ -8,5 +8,13 @@ def apply(system_path, vm_files, defaults): system_path['qubes_base_dir'] = 'c:\\qubes' system_path['config_template_pv'] = 'c:/program files/Invisible Things Lab/Qubes/vm-template.xml' system_path['config_template_hvm'] = 'c:/program files/Invisible Things Lab/Qubes/vm-template-hvm.xml' - defaults['libvirt_uri'] = 'test:///default' + system_path['qubes_icon_dir'] = \ + 'c:/program files/Invisible Things Lab/Qubes/icons' + system_path['qubesdb_daemon_path'] = \ + 'c:/program files/Invisible Things Lab/Qubes/bin/qubesdb-daemon.exe' + # Specific to WNI - normally VM have this file + system_path['qrexec_agent_path'] = \ + 'c:/program files/Invisible Things Lab/Qubes/bin/qrexec-agent.exe' + + defaults['libvirt_uri'] = 'wni:///' defaults['storage_class'] = QubesWniVmStorage diff --git a/core/storage/wni.py b/core/storage/wni.py index b1f9e0cd..8372f5ca 100644 --- a/core/storage/wni.py +++ b/core/storage/wni.py @@ -30,7 +30,7 @@ import win32net import pywintypes from qubes.storage import QubesVmStorage -from qubes.qubes import QubesException +from qubes.qubes import QubesException,system_path class QubesWniVmStorage(QubesVmStorage): """ @@ -42,6 +42,10 @@ class QubesWniVmStorage(QubesVmStorage): # Use the user profile as "private.img" self.private_img = os.path.join("c:\\Users", self._get_username()) + # Pass paths for WNI libvirt driver + os.putenv("WNI_DRIVER_QUBESDB_PATH", system_path['qubesdb_daemon_path']) + os.putenv("WNI_DRIVER_QREXEC_PATH", system_path['qrexec_agent_path']) + def _get_username(self, vmname = None): if vmname is None: vmname = self.vm.name