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