New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple DispVMs #866

Closed
marmarek opened this Issue Mar 8, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 2 Jun 2014 12:46 UTC
See:

https://groups.google.com/forum/#!topic/qubes-devel/uQJL7I70GQs

Migrated-From: https://wiki.qubes-os.org/ticket/866

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 20, 2016

Member

In principle it will be possible to start an AppVM in "disposable" mode - which means changes to its private image (in addition to root image as in normal AppVM) will be discarded after VM shutdown. Technically any AppVM can be used for that, but practically it makes sense to have dedicated "DispVM template" AppVMs (as currently fedora-xx-dvm).

More discussion here:
https://groups.google.com/d/msgid/qubes-devel/20160517124118.GK25975%40mail-itl

Member

marmarek commented May 20, 2016

In principle it will be possible to start an AppVM in "disposable" mode - which means changes to its private image (in addition to root image as in normal AppVM) will be discarded after VM shutdown. Technically any AppVM can be used for that, but practically it makes sense to have dedicated "DispVM template" AppVMs (as currently fedora-xx-dvm).

More discussion here:
https://groups.google.com/d/msgid/qubes-devel/20160517124118.GK25975%40mail-itl

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016

qubes/storage: allow snapshots of snapshots
It may make sense to create 'snapshot' volume out of already 'snapshot',
not only 'origin'. In pracice it will exactly the same as 'snapshot
connected directly to 'origin'.

QubesOS/qubes-issues#866

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016

qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 20, 2016

Member

@woju where should be a code to make use of the DispVM? It would:

  1. Create new DispVM
  2. Start it
  3. Call a service
  4. Cleanup when service finished

IOW equivalent of /usr/lib/qubes/qfile-daemon-dvm tool.
The main usage would be when someone call an RPC service with $dispvm:sth target, but sometimes it is also useful to start new DispVM manually (from dom0 menu for example).

Should it be new qvm-start-dispvm tool? Option to some existing one (qvm-run?)? Function somewhere in the core (where?), connected to existing or a new tool?

Member

marmarek commented May 20, 2016

@woju where should be a code to make use of the DispVM? It would:

  1. Create new DispVM
  2. Start it
  3. Call a service
  4. Cleanup when service finished

IOW equivalent of /usr/lib/qubes/qfile-daemon-dvm tool.
The main usage would be when someone call an RPC service with $dispvm:sth target, but sometimes it is also useful to start new DispVM manually (from dom0 menu for example).

Should it be new qvm-start-dispvm tool? Option to some existing one (qvm-run?)? Function somewhere in the core (where?), connected to existing or a new tool?

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016

qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866
@woju

This comment has been minimized.

Show comment
Hide comment
@woju

woju May 21, 2016

Member

Some function in core, preferably a method of AppVM class
(get_dispvm()?). And CLI tool also. If you have to run a service there,
that would probably be qvm-run.

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

Member

woju commented May 21, 2016

Some function in core, preferably a method of AppVM class
(get_dispvm()?). And CLI tool also. If you have to run a service there,
that would probably be qvm-run.

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 21, 2016

Member

So vm.get_dispvm() would return DispVM based on this VM? Already running?
Generally I'm not so sure whether it should be in any *VM class, as it create new VM instance. And even worse - may need to reload qubes.xml to cleanup it later. Slightly more detailed content of this function:

  1. Create new DispVM (create object, add to app.domains)
  2. dispvm.create_on_disk()
  3. app.save()
  4. dispvm.start()
  5. dispvm.run_service(..., wait=True) (or something)
  6. Possibly reload qubes.xml if changed in the meantime
  7. dispvm.force_shutdown()
  8. dispvm.remove_from_disk()
  9. del app.domains[dispvm]
  10. app.save()
Member

marmarek commented May 21, 2016

So vm.get_dispvm() would return DispVM based on this VM? Already running?
Generally I'm not so sure whether it should be in any *VM class, as it create new VM instance. And even worse - may need to reload qubes.xml to cleanup it later. Slightly more detailed content of this function:

  1. Create new DispVM (create object, add to app.domains)
  2. dispvm.create_on_disk()
  3. app.save()
  4. dispvm.start()
  5. dispvm.run_service(..., wait=True) (or something)
  6. Possibly reload qubes.xml if changed in the meantime
  7. dispvm.force_shutdown()
  8. dispvm.remove_from_disk()
  9. del app.domains[dispvm]
  10. app.save()

woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016

qubes/storage: allow snapshots of snapshots
It may make sense to create 'snapshot' volume out of already 'snapshot',
not only 'origin'. In pracice it will exactly the same as 'snapshot
connected directly to 'origin'.

QubesOS/qubes-issues#866

woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016

qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866

woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016

woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016

qubes/vm/qubesvm: allow looking up by UUID
Also, allow lookup using VM from other app.

QubesOS/qubes-issues#866

andrewdavidwong added a commit that referenced this issue Jun 3, 2016

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
Member

andrewdavidwong commented Feb 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment