diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 5b0505f0..aa094240 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -57,7 +57,7 @@ class Volume(object): usage = 0 def __init__(self, name, pool, volume_type, vid=None, size=0, - removable=False, **kwargs): + removable=False, internal=False, **kwargs): super(Volume, self).__init__(**kwargs) self.name = str(name) self.pool = str(pool) @@ -65,6 +65,7 @@ class Volume(object): self.size = size self.volume_type = volume_type self.removable = removable + self.internal = internal def __xml__(self): return lxml.etree.Element('volume', **self.config) diff --git a/qubes/storage/kernels.py b/qubes/storage/kernels.py index f07e0aad..9ff47207 100644 --- a/qubes/storage/kernels.py +++ b/qubes/storage/kernels.py @@ -111,6 +111,7 @@ class LinuxKernel(Pool): kernel_version, pool=self.name, name=kernel_version, + internal=True, volume_type='read-only') for kernel_version in os.listdir(self.dir_path)] diff --git a/qubes/vm/appvm.py b/qubes/vm/appvm.py index 6924d3b7..f567213a 100644 --- a/qubes/vm/appvm.py +++ b/qubes/vm/appvm.py @@ -45,23 +45,27 @@ class AppVM(qubes.vm.qubesvm.QubesVM): 'name': 'root', 'pool': 'default', 'volume_type': 'snapshot', + 'internal': True }, 'private': { 'name': 'private', 'pool': 'default', 'volume_type': 'origin', 'size': defaults['private_img_size'], + 'internal': True }, 'volatile': { 'name': 'volatile', 'pool': 'default', 'volume_type': 'volatile', 'size': defaults['root_img_size'], + 'internal': True }, 'kernel': { 'name': 'kernel', 'pool': 'linux-kernel', 'volume_type': 'read-only', + 'internal': True } } super(AppVM, self).__init__(*args, **kwargs) diff --git a/qubes/vm/templatevm.py b/qubes/vm/templatevm.py index ca97dec4..e681f5a0 100644 --- a/qubes/vm/templatevm.py +++ b/qubes/vm/templatevm.py @@ -62,23 +62,27 @@ class TemplateVM(QubesVM): 'pool': 'default', 'volume_type': 'origin', 'size': defaults['root_img_size'], + 'internal': True }, 'private': { 'name': 'private', 'pool': 'default', 'volume_type': 'read-write', 'size': defaults['private_img_size'], + 'internal': True }, 'volatile': { 'name': 'volatile', 'pool': 'default', 'size': defaults['root_img_size'], 'volume_type': 'volatile', + 'internal': True }, 'kernel': { 'name': 'kernel', 'pool': 'linux-kernel', 'volume_type': 'read-only', + 'internal': True } } super(TemplateVM, self).__init__(*args, **kwargs)