Support for multiple DispVMs #866

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

Projects

None yet

2 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 marmarek added this to the Release 3 milestone Mar 8, 2015
@marmarek marmarek modified the milestone: Release 4.0, Release 3.0 May 13, 2015
@marmarek
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

@marmarek marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016
@marmarek marmarek 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
4f91a1f
@marmarek marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016
@marmarek marmarek qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866
24d7329
@marmarek
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?

@marmarek marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016
@marmarek marmarek qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866
eb49eb9
@woju
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
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()
@woju woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016
@marmarek @woju marmarek + woju 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
54c7076
@woju woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016
@marmarek @woju marmarek + woju qubes/vm: Implement Disposable VM
Implement DispVM as a VM based on AppVM.

QubesOS/qubes-issues#866
c965024
@woju woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016
@woju woju qubes/vm/qubesvm: return self from methods modifying state
This is helpful when writing oneliners.

QubesOS/qubes-issues#866
476b681
@woju woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016
@woju woju qubes/vm/qubesvm: allow looking up by UUID
Also, allow lookup using VM from other app.

QubesOS/qubes-issues#866
a719e0d
@woju woju added a commit to woju/qubes-core-admin that closed this issue Jun 2, 2016
@woju woju qubes/vm/dispvm: Add methods for creating and destroying 5a76d0b
@andrewdavidwong andrewdavidwong added a commit that referenced this issue Jun 3, 2016
@andrewdavidwong andrewdavidwong Untrack #866 (completed) 9c21c74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment