standalonevm.py 2.2 KB

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