Ver código fonte

Fill some more WNI settings

Especially use new "wni" libvirt driver.
Marek Marczykowski-Górecki 11 anos atrás
pai
commit
5dbad01796
2 arquivos alterados com 14 adições e 2 exclusões
  1. 9 1
      core/settings-wni-Windows_NT.py
  2. 5 1
      core/storage/wni.py

+ 9 - 1
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

+ 5 - 1
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