standalonevm.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program 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
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License along
  18. # with this program; if not, write to the Free Software Foundation, Inc.,
  19. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  20. #
  21. import qubes.events
  22. import qubes.vm.qubesvm
  23. import qubes.config
  24. class StandaloneVM(qubes.vm.qubesvm.QubesVM):
  25. '''Standalone Application VM'''
  26. def __init__(self, *args, **kwargs):
  27. self.volume_config = {
  28. 'root': {
  29. 'name': 'root',
  30. 'snap_on_start': False,
  31. 'save_on_stop': True,
  32. 'rw': True,
  33. 'source': None,
  34. 'size': qubes.config.defaults['root_img_size'],
  35. },
  36. 'private': {
  37. 'name': 'private',
  38. 'snap_on_start': False,
  39. 'save_on_stop': True,
  40. 'rw': True,
  41. 'source': None,
  42. 'size': qubes.config.defaults['private_img_size'],
  43. },
  44. 'volatile': {
  45. 'name': 'volatile',
  46. 'snap_on_start': False,
  47. 'save_on_stop': False,
  48. 'rw': True,
  49. 'size': qubes.config.defaults['root_img_size'],
  50. },
  51. 'kernel': {
  52. 'name': 'kernel',
  53. 'snap_on_start': False,
  54. 'save_on_stop': False,
  55. 'rw': False,
  56. }
  57. }
  58. super(StandaloneVM, self).__init__(*args, **kwargs)