qubes.vm.adminvm – Dom0

This module contains the AdminVM implementation

class qubes.vm.adminvm.AdminVM(*args, **kwargs)[source]

Bases: BaseVM

Dom0

get_cputime()[source]

Get total CPU time burned by Dom0 since start.

static get_mem()[source]

Get current memory usage of Dom0.

Unit is KiB.

get_mem_static_max()[source]

Get maximum memory available to Dom0.

static get_power_state()[source]

Always 'Running'.

static is_halted()[source]

Always False.

static is_running()[source]

Always True.

kill()[source]

Does nothing.

async run_service(service, source=None, user=None, filter_esc=False, autostart=False, gui=False, **kwargs)[source]

Run service on this VM

Parameters:
  • service (str) – service name

  • source (qubes.vm.qubesvm.QubesVM) – source domain as presented to this VM

  • user (str) – username to run service as

  • filter_esc (bool) – filter escape sequences to protect terminal emulator

  • autostart (bool) – if True, machine will be started if it is not running

  • gui (bool) – when autostarting, also start gui daemon

Return type:

asyncio.subprocess.Process

Note

User root is redefined to SYSTEM in the Windows agent code

async run_service_for_stdio(*args, input=None, **kwargs)[source]

Run a service, pass an optional input and return (stdout, stderr).

Raises an exception if return code != 0.

args and kwargs are passed verbatim to run_service().

Warning

There are some combinations if stdio-related kwargs, which are not filtered for problems originating between the keyboard and the chair.

shutdown()[source]

Does nothing.

start(start_guid=True, notify_function=None, mem_required=None)[source]

Always raises an exception.

suspend()[source]

Does nothing.

verify_files()[source]

Always True

default_dispvm

Default VM to be used as Disposable VM for service calls.

icon

freedesktop icon name, suitable for use in PyQt4.QtGui.QIcon.fromTheme()

include_in_backups

If this domain is to be included in default backup.

keyboard_layout

Keyboard layout for this VM

property libvirt_domain

Libvirt object for dom0.

name
qid
property untrusted_qdb

QubesDB handle for this domain.

updateable

True if this machine may be updated on its own.

uuid
property xid: int

Always 0.