## GVirConfigDomain

GVirConfigDomain

## Functions

GVirConfigDomain * | gvir_config_domain_new_from_xml ()
GVirConfigDomain * | gvir_config_domain_new ()
GVirConfigDomainVirtType | gvir_config_domain_get_virt_type ()
void | gvir_config_domain_set_virt_type ()
const char * | gvir_config_domain_get_name ()
void | gvir_config_domain_set_name ()
const char * | gvir_config_domain_get_uuid ()
void | gvir_config_domain_set_uuid ()
const char * | gvir_config_domain_get_description ()
void | gvir_config_domain_set_description ()
guint64 | gvir_config_domain_get_memory ()
void | gvir_config_domain_set_memory ()
guint64 | gvir_config_domain_get_current_memory ()
void | gvir_config_domain_set_current_memory ()
guint64 | gvir_config_domain_get_vcpus ()
void | gvir_config_domain_set_vcpus ()
GStrv | gvir_config_domain_get_features ()
void | gvir_config_domain_set_features ()
GVirConfigDomainClock * | gvir_config_domain_get_clock ()
void | gvir_config_domain_set_clock ()
GVirConfigDomainOs * | gvir_config_domain_get_os ()
void | gvir_config_domain_set_os ()
void | gvir_config_domain_set_seclabel ()
const char * | gvir_config_domain_get_title ()
void | gvir_config_domain_set_title ()
void | gvir_config_domain_set_devices ()
void | gvir_config_domain_add_device ()
GList * | gvir_config_domain_get_devices ()
void | gvir_config_domain_set_lifecycle ()
gboolean | gvir_config_domain_set_custom_xml_ns_children ()
gboolean | gvir_config_domain_set_custom_xml ()
gchar * | gvir_config_domain_get_custom_xml ()
GVirConfigDomainCpu * | gvir_config_domain_get_cpu ()
void | gvir_config_domain_set_cpu ()
void | gvir_config_domain_set_power_management ()

## Properties

guint64 | current-memory | Read / Write
char * | description | Read / Write
GStrv | features | Read / Write
guint64 | memory | Read / Write
char * | name | Read / Write
char * | title | Read / Write
char * | uuid | Read / Write
guint64 | vcpu | Read / Write

## Types and Values

struct | GVirConfigDomain
struct | GVirConfigDomainClass
enum | GVirConfigDomainVirtType
enum | GVirConfigDomainLifecycleEvent
enum | GVirConfigDomainLifecycleAction
| GVirConfigDomainPrivate

## Object Hierarchy

        GObject
        ╰── GVirConfigObject
            ╰── GVirConfigDomain

## Description

## Functions

### gvir_config_domain_new_from_xml ()

    GVirConfigDomain *
    gvir_config_domain_new_from_xml (const gchar *xml,
                                     GError **error);

### gvir_config_domain_new ()

    GVirConfigDomain *
    gvir_config_domain_new (void);

### gvir_config_domain_get_virt_type ()

    GVirConfigDomainVirtType
    gvir_config_domain_get_virt_type (GVirConfigDomain *domain);

### gvir_config_domain_set_virt_type ()

    void
    gvir_config_domain_set_virt_type (GVirConfigDomain *domain,
                                      GVirConfigDomainVirtType type);

### gvir_config_domain_get_name ()

    const char *
    gvir_config_domain_get_name (GVirConfigDomain *domain);

### gvir_config_domain_set_name ()

    void
    gvir_config_domain_set_name (GVirConfigDomain *domain,
                                 const char *name);

#### Parameters

domain | a GVirConfigDomain |
name | . | [allow-none]

### gvir_config_domain_get_uuid ()

    const char *
    gvir_config_domain_get_uuid (GVirConfigDomain *domain);

### gvir_config_domain_set_uuid ()

    void
    gvir_config_domain_set_uuid (GVirConfigDomain *domain,
                                 const char *uuid);

#### Parameters

domain | a GVirConfigDomain |
uuid | . | [allow-none]

### gvir_config_domain_get_description ()

    const char *
    gvir_config_domain_get_description (GVirConfigDomain *domain);

### gvir_config_domain_set_description ()

    void
    gvir_config_domain_set_description (GVirConfigDomain *domain,
                                        const char *description);

#### Parameters

domain | a GVirConfigDomain |
description | . | [allow-none]

### gvir_config_domain_get_memory ()

    guint64
    gvir_config_domain_get_memory (GVirConfigDomain *domain);

#### Parameters

domain | a GVirConfigDomain |

#### Returns

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

### gvir_config_domain_set_memory ()

    void
    gvir_config_domain_set_memory (GVirConfigDomain *domain,
                                   guint64 memory);

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

#### Parameters

domain | a GVirConfigDomain |
memory | The maximum amount of RAM in kilobytes. |

### gvir_config_domain_get_current_memory ()

    guint64
    gvir_config_domain_get_current_memory (GVirConfigDomain *domain);

#### Parameters

domain | a GVirConfigDomain |

#### Returns

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

### gvir_config_domain_set_current_memory ()

    void
    gvir_config_domain_set_current_memory (GVirConfigDomain *domain,
                                           guint64 memory);

Sets the current amount of RAM allocated to `domain` 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.

#### Parameters

domain | a GVirConfigDomain |
memory | The current amount of RAM in kilobytes. |

### gvir_config_domain_get_vcpus ()

    guint64
    gvir_config_domain_get_vcpus (GVirConfigDomain *domain);

### gvir_config_domain_set_vcpus ()

    void
    gvir_config_domain_set_vcpus (GVirConfigDomain *domain,
                                  guint64 vcpu_count);

### gvir_config_domain_get_features ()

    GStrv
    gvir_config_domain_get_features (GVirConfigDomain *domain);

#### Parameters

domain | a GVirConfigDomain |

#### Returns

The returned list should be freed with `g_strfreev()` when no longer needed.

[transfer full]

### gvir_config_domain_set_features ()

    void
    gvir_config_domain_set_features (GVirConfigDomain *domain,
                                     const GStrv features);

### gvir_config_domain_get_clock ()

    GVirConfigDomainClock *
    gvir_config_domain_get_clock (GVirConfigDomain *domain);

Gets the clock configuration of `domain`

#### Parameters

domain | a GVirConfigDomain |

#### Returns

A GVirConfigDomainClock. The returned object should be unreffed with `g_object_unref()` when no longer needed.

[transfer full]

### gvir_config_domain_set_clock ()

    void
    gvir_config_domain_set_clock (GVirConfigDomain *domain,
                                  GVirConfigDomainClock *klock);

#### Parameters

domain | a GVirConfigDomain |
klock | . | [allow-none]

### gvir_config_domain_get_os ()

    GVirConfigDomainOs *
    gvir_config_domain_get_os (GVirConfigDomain *domain);

Gets the operating system configuration of `domain`

#### Parameters

domain | a GVirConfigDomain |

#### Returns

A GVirConfigDomainOs. The returned object should be unreffed with `g_object_unref()` when no longer needed.

[transfer full]

### gvir_config_domain_set_os ()

    void
    gvir_config_domain_set_os (GVirConfigDomain *domain,
                               GVirConfigDomainOs *os);

#### Parameters

domain | a GVirConfigDomain |
os | the os configuration to set. | [allow-none]

### gvir_config_domain_set_seclabel ()

    void
    gvir_config_domain_set_seclabel (GVirConfigDomain *domain,
                                     GVirConfigDomainSeclabel *seclabel);

#### Parameters

domain | a GVirConfigDomain |
seclabel | the security label configuration to set. | [allow-none]

### gvir_config_domain_get_title ()

    const char *
    gvir_config_domain_get_title (GVirConfigDomain *domain);

### gvir_config_domain_set_title ()

    void
    gvir_config_domain_set_title (GVirConfigDomain *domain,
                                  const char *title);

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

#### Parameters

domain | a GVirConfigDomain |
title | title of the domain. | [allow-none]

### gvir_config_domain_set_devices ()

    void
    gvir_config_domain_set_devices (GVirConfigDomain *domain,
                                    GList *devices);

#### Parameters

domain | a GVirConfigDomain |
devices | . | [in][element-type LibvirtGConfig.DomainDevice]

### gvir_config_domain_add_device ()

    void
    gvir_config_domain_add_device (GVirConfigDomain *domain,
                                   GVirConfigDomainDevice *device);

### gvir_config_domain_get_devices ()

    GList *
    gvir_config_domain_get_devices (GVirConfigDomain *domain);

Gets the list of devices attached to `domain` . The returned list should be freed with `g_list_free()`, after its elements have been unreffed with `g_object_unref()`.

#### Parameters

domain | a GVirConfigDomain |

#### Returns

a newly allocated GList of GVirConfigDomainDevice.

[element-type LibvirtGConfig.DomainDevice][transfer full]

### gvir_config_domain_set_lifecycle ()

    void
    gvir_config_domain_set_lifecycle (GVirConfigDomain *domain,
                                      GVirConfigDomainLifecycleEvent event,
                                      GVirConfigDomainLifecycleAction action);

### gvir_config_domain_set_custom_xml_ns_children ()

    gboolean
    gvir_config_domain_set_custom_xml_ns_children
                                   (GVirConfigDomain *domain,
                                    const gchar *xml,
                                    const gchar *ns,
                                    const gchar *ns_uri,
                                    GError **error);

### gvir_config_domain_set_custom_xml ()

    gboolean
    gvir_config_domain_set_custom_xml (GVirConfigDomain *domain,
                                       const gchar *xml,
                                       const gchar *ns,
                                       const gchar *ns_uri,
                                       GError **error);

### gvir_config_domain_get_custom_xml ()

    gchar *
    gvir_config_domain_get_custom_xml (GVirConfigDomain *domain,
                                       const gchar *ns_uri);

### gvir_config_domain_get_cpu ()

    GVirConfigDomainCpu *
    gvir_config_domain_get_cpu (GVirConfigDomain *domain);

Gets the CPU configuration of `domain`

#### Parameters

domain | a GVirConfigDomain |

#### Returns

A GVirConfigDomainCpu. The returned object should be unreffed with `g_object_unref()` when no longer needed.

[transfer full]

### gvir_config_domain_set_cpu ()

    void
    gvir_config_domain_set_cpu (GVirConfigDomain *domain,
                                GVirConfigDomainCpu *cpu);

#### Parameters

domain | a GVirConfigDomain |
cpu | . | [allow-none]

### gvir_config_domain_set_power_management ()

    void
    gvir_config_domain_set_power_management
                                   (GVirConfigDomain *domain,
                                    GVirConfigDomainPowerManagement *pm);

#### Parameters

domain | a GVirConfigDomain |
pm | a GVirPowerManagement instance. | [allow-none]

## Types and Values

### struct GVirConfigDomain

    struct GVirConfigDomain;

### struct GVirConfigDomainClass

    struct GVirConfigDomainClass {
        GVirConfigObjectClass parent_class;

        gpointer padding[20];
    };

### enum GVirConfigDomainVirtType

#### Members

GVIR_CONFIG_DOMAIN_VIRT_QEMU |  |
GVIR_CONFIG_DOMAIN_VIRT_KQEMU |  |
GVIR_CONFIG_DOMAIN_VIRT_KVM |  |
GVIR_CONFIG_DOMAIN_VIRT_XEN |  |
GVIR_CONFIG_DOMAIN_VIRT_LXC |  |
GVIR_CONFIG_DOMAIN_VIRT_UML |  |
GVIR_CONFIG_DOMAIN_VIRT_OPENVZ |  |
GVIR_CONFIG_DOMAIN_VIRT_VSERVER |  |
GVIR_CONFIG_DOMAIN_VIRT_LDOM |  |
GVIR_CONFIG_DOMAIN_VIRT_TEST |  |
GVIR_CONFIG_DOMAIN_VIRT_VMWARE |  |
GVIR_CONFIG_DOMAIN_VIRT_HYPERV |  |
GVIR_CONFIG_DOMAIN_VIRT_VBOX |  |
GVIR_CONFIG_DOMAIN_VIRT_ONE |  |
GVIR_CONFIG_DOMAIN_VIRT_PHYP |  |

### enum GVirConfigDomainLifecycleEvent

#### Members

GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_POWEROFF |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_REBOOT |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_CRASH |  |

### enum GVirConfigDomainLifecycleAction

#### Members

GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_RESTART |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_PRESERVE |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_RENAME_RESTART |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_COREDUMP_DESTROY |  |
GVIR_CONFIG_DOMAIN_LIFECYCLE_COREDUMP_RESTART |  |

### GVirConfigDomainPrivate

    typedef struct _GVirConfigDomainPrivate GVirConfigDomainPrivate;

## Property Details

### The `“current-memory”` property

      “current-memory”           guint64

Current Guest Memory (in kilobytes).

Owner: GVirConfigDomain

Flags: Read / Write

Default value: 0

### The `“description”` property

      “description”              char *

Some human readable description (could be anything).

Owner: GVirConfigDomain

Flags: Read / Write

Default value: NULL

### The `“features”` property

      “features”                 GStrv

Hypervisor Features.

Owner: GVirConfigDomain

Flags: Read / Write

### The `“memory”` property

      “memory”                   guint64

Maximum Guest Memory (in kilobytes).

Owner: GVirConfigDomain

Flags: Read / Write

Default value: 0

### The `“name”` property

      “name”                     char *

Domain Name.

Owner: GVirConfigDomain

Flags: Read / Write

Default value: NULL

### The `“title”` property

      “title”                    char *

A short description - title - of the domain.

Owner: GVirConfigDomain

Flags: Read / Write

Default value: NULL

### The `“uuid”` property

      “uuid”                     char *

Domain UUID.

Owner: GVirConfigDomain

Flags: Read / Write

Default value: NULL

### The `“vcpu”` property

      “vcpu”                     guint64

Maximum Number of Guest Virtual CPUs.

Owner: GVirConfigDomain

Flags: Read / Write

Default value: 1