standalonevm.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. 'pool': 'default',
  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. 'pool': 'default',
  40. 'snap_on_start': False,
  41. 'save_on_stop': True,
  42. 'rw': True,
  43. 'source': None,
  44. 'size': qubes.config.defaults['private_img_size'],
  45. },
  46. 'volatile': {
  47. 'name': 'volatile',
  48. 'pool': 'default',
  49. 'snap_on_start': False,
  50. 'save_on_stop': False,
  51. 'rw': True,
  52. 'size': qubes.config.defaults['root_img_size'],
  53. },
  54. 'kernel': {
  55. 'name': 'kernel',
  56. 'pool': 'linux-kernel',
  57. 'snap_on_start': False,
  58. 'save_on_stop': False,
  59. 'rw': False,
  60. }
  61. }
  62. super(StandaloneVM, self).__init__(*args, **kwargs)