qubes-create adds default lvm pool if it exists

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-07-14 14:54:11 +02:00
parent 3ae6530cd8
commit f3072e7dd0
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -820,6 +820,11 @@ class Qubes(qubes.PropertyHolder):
for name, config in qubes.config.defaults['pool_configs'].items(): for name, config in qubes.config.defaults['pool_configs'].items():
self.pools[name] = self._get_pool(**config) self.pools[name] = self._get_pool(**config)
# check if the default LVM Thin pool qubes_dom0/pool00 exists
if os.path.exists('/dev/mapper/qubes_dom0-pool00-tpool'):
self.add_pool(volume_group='qubes_dom0', thin_pool='pool00',
name='lvm', driver='lvm_thin')
self.domains.add( self.domains.add(
qubes.vm.adminvm.AdminVM(self, None, qid=0, name='dom0')) qubes.vm.adminvm.AdminVM(self, None, qid=0, name='dom0'))