standalonevm.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # The Qubes OS Project, https://www.qubes-os.org/
  3. #
  4. # Copyright (C) 2016 Marek Marczykowski-Górecki
  5. # <marmarek@invisiblethingslab.com>
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Lesser General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2.1 of the License, or (at your option) any later version.
  11. #
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public
  18. # License along with this library; if not, see <https://www.gnu.org/licenses/>.
  19. #
  20. import qubes.events
  21. import qubes.vm.mix.dvmtemplate
  22. import qubes.vm.qubesvm
  23. import qubes.config
  24. class StandaloneVM(qubes.vm.mix.dvmtemplate.DVMTemplateMixin,
  25. qubes.vm.qubesvm.QubesVM):
  26. '''Standalone Application VM'''
  27. def __init__(self, *args, **kwargs):
  28. self.volume_config = {
  29. 'root': {
  30. 'name': 'root',
  31. 'snap_on_start': False,
  32. 'save_on_stop': True,
  33. 'rw': True,
  34. 'source': None,
  35. 'size': qubes.config.defaults['root_img_size'],
  36. },
  37. 'private': {
  38. 'name': 'private',
  39. 'snap_on_start': False,
  40. 'save_on_stop': True,
  41. 'rw': True,
  42. 'source': None,
  43. 'size': qubes.config.defaults['private_img_size'],
  44. },
  45. 'volatile': {
  46. 'name': 'volatile',
  47. 'snap_on_start': False,
  48. 'save_on_stop': False,
  49. 'rw': True,
  50. 'size': qubes.config.defaults['root_img_size'],
  51. },
  52. 'kernel': {
  53. 'name': 'kernel',
  54. 'snap_on_start': False,
  55. 'save_on_stop': False,
  56. 'rw': False,
  57. }
  58. }
  59. super().__init__(*args, **kwargs)