2016-03-13 12:43:26 +01:00
|
|
|
#
|
|
|
|
# The Qubes OS Project, https://www.qubes-os.org/
|
|
|
|
#
|
|
|
|
# Copyright (C) 2016 Marek Marczykowski-Górecki
|
|
|
|
# <marmarek@invisiblethingslab.com>
|
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2016-03-13 12:43:26 +01:00
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# This library is distributed in the hope that it will be useful,
|
2016-03-13 12:43:26 +01:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2017-10-12 00:11:50 +02:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
2016-03-13 12:43:26 +01:00
|
|
|
#
|
2017-10-12 00:11:50 +02:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
2016-03-13 12:43:26 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
import qubes.events
|
2019-02-27 06:00:38 +01:00
|
|
|
import qubes.vm.mix.dvmtemplate
|
2016-03-13 12:43:26 +01:00
|
|
|
import qubes.vm.qubesvm
|
2016-05-21 03:57:23 +02:00
|
|
|
import qubes.config
|
2016-03-13 12:43:26 +01:00
|
|
|
|
2019-02-27 06:00:38 +01:00
|
|
|
class StandaloneVM(qubes.vm.mix.dvmtemplate.DVMTemplateMixin,
|
|
|
|
qubes.vm.qubesvm.QubesVM):
|
2016-03-13 12:43:26 +01:00
|
|
|
'''Standalone Application VM'''
|
|
|
|
|
2016-05-21 03:57:23 +02:00
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
self.volume_config = {
|
|
|
|
'root': {
|
|
|
|
'name': 'root',
|
2016-07-12 18:03:14 +02:00
|
|
|
'snap_on_start': False,
|
|
|
|
'save_on_stop': True,
|
|
|
|
'rw': True,
|
|
|
|
'source': None,
|
2016-05-21 03:57:23 +02:00
|
|
|
'size': qubes.config.defaults['root_img_size'],
|
|
|
|
},
|
|
|
|
'private': {
|
|
|
|
'name': 'private',
|
2016-07-12 18:03:14 +02:00
|
|
|
'snap_on_start': False,
|
|
|
|
'save_on_stop': True,
|
|
|
|
'rw': True,
|
|
|
|
'source': None,
|
2016-05-21 03:57:23 +02:00
|
|
|
'size': qubes.config.defaults['private_img_size'],
|
|
|
|
},
|
|
|
|
'volatile': {
|
|
|
|
'name': 'volatile',
|
2017-07-01 20:47:08 +02:00
|
|
|
'snap_on_start': False,
|
|
|
|
'save_on_stop': False,
|
2016-09-04 20:58:11 +02:00
|
|
|
'rw': True,
|
2016-05-21 03:57:23 +02:00
|
|
|
'size': qubes.config.defaults['root_img_size'],
|
|
|
|
},
|
|
|
|
'kernel': {
|
|
|
|
'name': 'kernel',
|
2017-07-01 20:47:08 +02:00
|
|
|
'snap_on_start': False,
|
|
|
|
'save_on_stop': False,
|
2016-07-12 18:03:14 +02:00
|
|
|
'rw': False,
|
2016-05-21 03:57:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
super(StandaloneVM, self).__init__(*args, **kwargs)
|