diff --git a/qubes/__init__.py b/qubes/__init__.py index aa79ad3c..22fe7c98 100644 --- a/qubes/__init__.py +++ b/qubes/__init__.py @@ -1400,6 +1400,7 @@ class Qubes(PropertyHolder): 7: Label(7, '0x75507b', 'purple'), 8: Label(8, '0x000000', 'black'), } + for name, config in qubes.config.defaults['pool_configs'].items(): self.pools[name] = self._get_pool(**config) diff --git a/qubes/config.py b/qubes/config.py index 636b0b07..80a2981b 100644 --- a/qubes/config.py +++ b/qubes/config.py @@ -28,6 +28,8 @@ # make a real /etc/qubes/master.conf or whatever # +import os.path + '''Constants which can be configured in one place''' qubes_base_dir = "/var/lib/qubes" @@ -83,9 +85,17 @@ defaults = { 'private_img_size': 2*1024*1024*1024, 'root_img_size': 10*1024*1024*1024, - 'pool_config': {'dir_path': '/var/lib/qubes/', + 'pool_configs': { + 'default': {'dir_path': qubes_base_dir, 'driver': 'xen', 'name': 'default'}, + 'linux-kernel': { + 'dir_path': os.path.join(qubes_base_dir, + system_path['qubes_kernels_base_dir']), + 'driver': 'linux-kernel', + 'name': 'linux-kernel' + } + }, # how long (in sec) to wait for VMs to shutdown, # before killing them (when used qvm-run with --wait option), diff --git a/qubes/tests/storage.py b/qubes/tests/storage.py index 7e777bdf..5fa82222 100644 --- a/qubes/tests/storage.py +++ b/qubes/tests/storage.py @@ -74,7 +74,7 @@ class TC_00_Pool(SystemTestsMixin, QubesTestCase): def test_001_all_pool_drivers(self): """ The only predefined pool driver is xen """ - self.assertEquals(["xen"], pool_drivers()) + self.assertEquals(['linux-kernel', 'xen'], pool_drivers()) def test_002_get_pool_klass(self): """ Expect the default pool to be `XenPool` """