qubes.vm.dispvm – Disposable VM

A disposable vm implementation

class qubes.vm.dispvm.DispVM(app, xml, *args, **kwargs)[source]

Bases: qubes.vm.qubesvm.QubesVM

Disposable VM

cleanup()[source]

Clean up after the DispVM

This stops the disposable qube and removes it from the store. This method modifies qubes.xml file.

create_qdb_entries()[source]

Create entries in Qubes DB.

classmethod from_appvm(appvm, **kwargs)[source]

Create a new instance from given AppVM

Parameters:appvm (qubes.vm.appvm.AppVM) – template from which the VM should be created
Returns:new disposable vm

kwargs are passed to the newly created VM

>>> import qubes.vm.dispvm.DispVM
>>> dispvm = qubes.vm.dispvm.DispVM.from_appvm(appvm).start()
>>> dispvm.run_service('qubes.VMShell', input='firefox')
>>> dispvm.cleanup()

This method modifies qubes.xml file. The qube returned is not started.

on_domain_loaded(event)[source]

When domain is loaded assert that this vm has a template.

on_property_pre_set_template(event, name, newvalue=None, oldvalue=None)[source]

Disposable VM cannot have template changed

start(**kwargs)[source]

Start domain

Parameters:
  • start_guid (bool) – FIXME
  • notify_function (collections.Callable) – FIXME
  • mem_required (int) – FIXME
auto_cleanup

automatically remove this VM upon shutdown

dispid

Internal, persistent identifier of particular DispVM.

include_in_backups

If this domain is to be included in default backup.

template

AppVM, on which this DispVM is based.