Domain

Classes for dealing with a domain/VM being introspected.

class pyintrovirt.domain.Domain(domain_id: int | str, hypervisor: introvirt.Hypervisor)[source]

Bases: ContextDecorator

An introspection target (VM/domain) that we are attached to for introspecting.

clear_system_call_filter()[source]

Clear the system call filter if set.

clear_task_filter()[source]

Clear the process filter if set.

default_system_call_filter()[source]

Set the system call filter to the default set of supported system calls for the OS.

detach() None[source]

Detach from the domain. Safe to call multiple times.

filter_system_call(syscall: introvirt.SystemCallIndex, enabled: bool)[source]

Toggle filtering of a specific system call.

filter_system_call_category(category: str)[source]

Filter by a system call category.

filter_system_calls(enabled: bool)[source]

Toggle system call filtering on/off. Required for the filter to take effect.

filter_task_name(name: str)[source]

Filter by task name. Name is a case-insensitive process name prefix.

filter_task_pid(pid: int)[source]

Filter by task PID.

filter_task_tid(tid: int)[source]

Filter by task TID.

intercept_cr_writes(cr: int, enabled: bool)[source]

Intercept CR writes.

intercept_system_calls(enabled: bool)[source]

Toggle system call interception on/off. Required to received system call events at all.

property os: introvirt.OS

Access the guest OS type enum.

poll(event_handler: introvirt.EventCallback)[source]

Start the poller for events. No events will be recieved until this is started.

property syscall_categories: tuple[str, ...]

Get a list of system call categories.

unfilter_task_name(name: str)[source]

Remove a name from the task filter.

unfilter_task_pid(pid: int)[source]

Remove a PID from the task filter.

unfilter_task_tid(tid: int)[source]

Remove a TID from the task filter.

class pyintrovirt.domain.DomainInformation(domain_name: str, domain_id: int)[source]

Bases: NamedTuple

Domain information.

domain_id: int

Alias for field number 1

domain_name: str

Alias for field number 0