standalonevm.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.qubesvm
  22. import qubes.config
  23. class StandaloneVM(qubes.vm.qubesvm.QubesVM):
  24. '''Standalone Application VM'''
  25. def __init__(self, *args, **kwargs):
  26. self.volume_config = {
  27. 'root': {
  28. 'name': 'root',
  29. 'snap_on_start': False,
  30. 'save_on_stop': True,
  31. 'rw': True,
  32. 'source': None,
  33. 'size': qubes.config.defaults['root_img_size'],
  34. },
  35. 'private': {
  36. 'name': 'private',
  37. 'snap_on_start': False,
  38. 'save_on_stop': True,
  39. 'rw': True,
  40. 'source': None,
  41. 'size': qubes.config.defaults['private_img_size'],
  42. },
  43. 'volatile': {
  44. 'name': 'volatile',
  45. 'snap_on_start': False,
  46. 'save_on_stop': False,
  47. 'rw': True,
  48. 'size': qubes.config.defaults['root_img_size'],
  49. },
  50. 'kernel': {
  51. 'name': 'kernel',
  52. 'snap_on_start': False,
  53. 'save_on_stop': False,
  54. 'rw': False,
  55. }
  56. }
  57. super(StandaloneVM, self).__init__(*args, **kwargs)