standalonevm.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. 'volume_type': 'origin',
  34. 'size': qubes.config.defaults['root_img_size'],
  35. },
  36. 'private': {
  37. 'name': 'private',
  38. 'pool': 'default',
  39. 'volume_type': 'origin',
  40. 'size': qubes.config.defaults['private_img_size'],
  41. },
  42. 'volatile': {
  43. 'name': 'volatile',
  44. 'pool': 'default',
  45. 'volume_type': 'volatile',
  46. 'size': qubes.config.defaults['root_img_size'],
  47. },
  48. 'kernel': {
  49. 'name': 'kernel',
  50. 'pool': 'linux-kernel',
  51. 'volume_type': 'read-only',
  52. }
  53. }
  54. super(StandaloneVM, self).__init__(*args, **kwargs)