LibvirtGConfig.Domain

g GObject.Object GObject.Object LibvirtGConfig.Object LibvirtGConfig.Object GObject.Object->LibvirtGConfig.Object LibvirtGConfig.Domain LibvirtGConfig.Domain LibvirtGConfig.Object->LibvirtGConfig.Domain

Subclasses:

None

Methods

Inherited:

LibvirtGConfig.Object (6), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_from_xml (xml)

add_device (device)

get_clock ()

get_cpu ()

get_current_memory ()

get_custom_xml (ns_uri)

get_description ()

get_devices ()

get_features ()

get_memory ()

get_name ()

get_os ()

get_title ()

get_uuid ()

get_vcpus ()

get_virt_type ()

set_clock (klock)

set_cpu (cpu)

set_current_memory (memory)

set_custom_xml (xml, ns, ns_uri)

set_custom_xml_ns_children (xml, ns, ns_uri)

set_description (description)

set_devices (devices)

set_features (features)

set_lifecycle (event, action)

set_memory (memory)

set_name (name)

set_os (os)

set_power_management (pm)

set_seclabel (seclabel)

set_title (title)

set_uuid (uuid)

set_vcpus (vcpu_count)

set_virt_type (type)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

LibvirtGConfig.Object (2)

Name

Type

Flags

Short Description

current-memory

int

r/w

Current Guest Memory (in kilobytes)

description

str

r/w

Some human readable description (could be anything).

features

[str]

r/w

Hypervisor Features

memory

int

r/w

Maximum Guest Memory (in kilobytes)

name

str

r/w

Domain Name

title

str

r/w

A short description - title - of the domain

uuid

str

r/w

Domain UUID

vcpu

int

r/w

Maximum Number of Guest Virtual CPUs

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

LibvirtGConfig.Object

r

Class Details

class LibvirtGConfig.Domain(**kwargs)
Bases:

LibvirtGConfig.Object

Abstract:

No

Structure:

LibvirtGConfig.DomainClass

classmethod new()
Return type:

LibvirtGConfig.Domain

classmethod new_from_xml(xml)
Parameters:

xml (str) –

Raises:

GLib.Error

Return type:

LibvirtGConfig.Domain

add_device(device)
Parameters:

device (LibvirtGConfig.DomainDevice) –

get_clock()
Returns:

A LibvirtGConfig.DomainClock. The returned object should be unreffed with GObject.Object.unref() when no longer needed.

Return type:

LibvirtGConfig.DomainClock

Gets the clock configuration of self

get_cpu()
Returns:

A LibvirtGConfig.DomainCpu. The returned object should be unreffed with GObject.Object.unref() when no longer needed.

Return type:

LibvirtGConfig.DomainCpu

Gets the CPU configuration of self

get_current_memory()
Returns:

current amount of RAM in kilobytes (i.e. blocks of 1024 bytes).

Return type:

int

get_custom_xml(ns_uri)
Parameters:

ns_uri (str) –

Return type:

str

get_description()
Return type:

str

get_devices()
Returns:

a newly allocated GLib.List of LibvirtGConfig.DomainDevice.

Return type:

[LibvirtGConfig.DomainDevice]

Gets the list of devices attached to self. The returned list should be freed with g_list_free(), after its elements have been unreffed with GObject.Object.unref().

get_features()
Returns:

The returned list should be freed with GLib.strfreev() when no longer needed.

Return type:

[str]

get_memory()
Returns:

maximum amount of RAM in kilobytes (i.e. blocks of 1024 bytes).

Return type:

int

get_name()
Return type:

str

get_os()
Returns:

A LibvirtGConfig.DomainOs. The returned object should be unreffed with GObject.Object.unref() when no longer needed.

Return type:

LibvirtGConfig.DomainOs

Gets the operating system configuration of self

get_title()
Return type:

str

get_uuid()
Return type:

str

get_vcpus()
Return type:

int

get_virt_type()
Return type:

LibvirtGConfig.DomainVirtType

set_clock(klock)
Parameters:

klock (LibvirtGConfig.DomainClock or None) –

set_cpu(cpu)
Parameters:

cpu (LibvirtGConfig.DomainCpu or None) –

set_current_memory(memory)
Parameters:

memory (int) – The current amount of RAM in kilobytes.

Sets the current amount of RAM allocated to self in kilobytes (i.e. blocks of 1024 bytes). This can be set to less than the maximum domain memory to allow to balloon the guest memory on the fly. Be aware that libvirt will set it automatically if it’s not explicitly set, which means you may need to set this value in addition to ‘memory’ if you want to change the available domain memory after creation.

set_custom_xml(xml, ns, ns_uri)
Parameters:
  • xml (str) –

  • ns (str) –

  • ns_uri (str) –

Raises:

GLib.Error

Return type:

bool

set_custom_xml_ns_children(xml, ns, ns_uri)
Parameters:
  • xml (str) –

  • ns (str) –

  • ns_uri (str) –

Raises:

GLib.Error

Return type:

bool

set_description(description)
Parameters:

description (str or None) –

set_devices(devices)
Parameters:

devices ([LibvirtGConfig.DomainDevice]) –

set_features(features)
Parameters:

features ([str]) –

set_lifecycle(event, action)
Parameters:
set_memory(memory)
Parameters:

memory (int) – The maximum amount of RAM in kilobytes.

Sets the maximum amount of RAM allocated to self in kilobytes (i.e. blocks of 1024 bytes).

set_name(name)
Parameters:

name (str or None) –

set_os(os)
Parameters:

os (LibvirtGConfig.DomainOs or None) – the os configuration to set

set_power_management(pm)
Parameters:

pm (LibvirtGConfig.DomainPowerManagement or None) – a #GVirPowerManagement instance

set_seclabel(seclabel)
Parameters:

seclabel (LibvirtGConfig.DomainSeclabel or None) – the security label configuration to set

set_title(title)
Parameters:

title (str or None) – title of the domain

Sets the title of the domain. This is an optional short textual description of the domain. Passing a None title unsets the current domain title.

set_uuid(uuid)
Parameters:

uuid (str or None) –

set_vcpus(vcpu_count)
Parameters:

vcpu_count (int) –

set_virt_type(type)
Parameters:

type (LibvirtGConfig.DomainVirtType) –

Property Details

LibvirtGConfig.Domain.props.current_memory
Name:

current-memory

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Current Guest Memory (in kilobytes)

LibvirtGConfig.Domain.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Some human readable description (could be anything).

LibvirtGConfig.Domain.props.features
Name:

features

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

Hypervisor Features

LibvirtGConfig.Domain.props.memory
Name:

memory

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Maximum Guest Memory (in kilobytes)

LibvirtGConfig.Domain.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Domain Name

LibvirtGConfig.Domain.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A short description - title - of the domain

LibvirtGConfig.Domain.props.uuid
Name:

uuid

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Domain UUID

LibvirtGConfig.Domain.props.vcpu
Name:

vcpu

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE

Maximum Number of Guest Virtual CPUs