Class Libvirt::Domain
In: ext/libvirt/_libvirt.c
Parent: Object

Methods

Classes and Modules

Class Libvirt::Domain::BlockInfo
Class Libvirt::Domain::BlockStats
Class Libvirt::Domain::Info
Class Libvirt::Domain::InterfaceInfo
Class Libvirt::Domain::JobInfo
Class Libvirt::Domain::MemoryStats
Class Libvirt::Domain::SecurityLabel
Class Libvirt::Domain::Snapshot
Class Libvirt::Domain::VCPUInfo

Constants

NOSTATE = INT2NUM(VIR_DOMAIN_NOSTATE)
RUNNING = INT2NUM(VIR_DOMAIN_RUNNING)
BLOCKED = INT2NUM(VIR_DOMAIN_BLOCKED)
PAUSED = INT2NUM(VIR_DOMAIN_PAUSED)
SHUTDOWN = INT2NUM(VIR_DOMAIN_SHUTDOWN)
SHUTOFF = INT2NUM(VIR_DOMAIN_SHUTOFF)
CRASHED = INT2NUM(VIR_DOMAIN_CRASHED)
MIGRATE_LIVE = INT2NUM(VIR_MIGRATE_LIVE)
MIGRATE_PEER2PEER = INT2NUM(VIR_MIGRATE_PEER2PEER)
MIGRATE_TUNNELLED = INT2NUM(VIR_MIGRATE_TUNNELLED)
MIGRATE_PERSIST_DEST = INT2NUM(VIR_MIGRATE_PERSIST_DEST)
MIGRATE_UNDEFINE_SOURCE = INT2NUM(VIR_MIGRATE_UNDEFINE_SOURCE)
MIGRATE_PAUSED = INT2NUM(VIR_MIGRATE_PAUSED)
MIGRATE_NON_SHARED_DISK = INT2NUM(VIR_MIGRATE_NON_SHARED_DISK)
MIGRATE_NON_SHARED_INC = INT2NUM(VIR_MIGRATE_NON_SHARED_INC)
DOMAIN_XML_SECURE = INT2NUM(VIR_DOMAIN_XML_SECURE)
DOMAIN_XML_INACTIVE = INT2NUM(VIR_DOMAIN_XML_INACTIVE)
DOMAIN_XML_UPDATE_CPU = INT2NUM(VIR_DOMAIN_XML_UPDATE_CPU)
MEMORY_VIRTUAL = INT2NUM(VIR_MEMORY_VIRTUAL)
MEMORY_PHYSICAL = INT2NUM(VIR_MEMORY_PHYSICAL)
START_PAUSED = INT2NUM(VIR_DOMAIN_START_PAUSED)
DUMP_CRASH = INT2NUM(VIR_DUMP_CRASH)
DUMP_LIVE = INT2NUM(VIR_DUMP_LIVE)
VCPU_LIVE = INT2NUM(VIR_DOMAIN_VCPU_LIVE)
VCPU_CONFIG = INT2NUM(VIR_DOMAIN_VCPU_CONFIG)
VCPU_MAXIMUM = INT2NUM(VIR_DOMAIN_VCPU_MAXIMUM)
DEVICE_MODIFY_CURRENT = INT2NUM(VIR_DOMAIN_DEVICE_MODIFY_CURRENT)
DEVICE_MODIFY_LIVE = INT2NUM(VIR_DOMAIN_DEVICE_MODIFY_LIVE)
DEVICE_MODIFY_CONFIG = INT2NUM(VIR_DOMAIN_DEVICE_MODIFY_CONFIG)
DEVICE_MODIFY_FORCE = INT2NUM(VIR_DOMAIN_DEVICE_MODIFY_FORCE)
MEMORY_PARAM_UNLIMITED = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED
DOMAIN_MEM_LIVE = INT2NUM(VIR_DOMAIN_MEM_LIVE)
DOMAIN_MEM_CONFIG = INT2NUM(VIR_DOMAIN_MEM_CONFIG)
DOMAIN_MEM_CURRENT = INT2NUM(VIR_DOMAIN_MEM_CURRENT)
DOMAIN_MEM_MAXIMUM = INT2NUM(VIR_DOMAIN_MEM_MAXIMUM)
DOMAIN_RUNNING_UNKNOWN = INT2NUM(VIR_DOMAIN_RUNNING_UNKNOWN)
DOMAIN_RUNNING_BOOTED = INT2NUM(VIR_DOMAIN_RUNNING_BOOTED)
DOMAIN_RUNNING_MIGRATED = INT2NUM(VIR_DOMAIN_RUNNING_MIGRATED)
DOMAIN_RUNNING_RESTORED = INT2NUM(VIR_DOMAIN_RUNNING_RESTORED)
DOMAIN_RUNNING_FROM_SNAPSHOT = INT2NUM(VIR_DOMAIN_RUNNING_FROM_SNAPSHOT)
DOMAIN_RUNNING_UNPAUSED = INT2NUM(VIR_DOMAIN_RUNNING_UNPAUSED)
DOMAIN_RUNNING_MIGRATION_CANCELED = INT2NUM(VIR_DOMAIN_RUNNING_MIGRATION_CANCELED)
DOMAIN_RUNNING_SAVE_CANCELED = INT2NUM(VIR_DOMAIN_RUNNING_SAVE_CANCELED)
DOMAIN_BLOCKED_UNKNOWN = INT2NUM(VIR_DOMAIN_BLOCKED_UNKNOWN)
DOMAIN_PAUSED_UNKNOWN = INT2NUM(VIR_DOMAIN_PAUSED_UNKNOWN)
DOMAIN_PAUSED_USER = INT2NUM(VIR_DOMAIN_PAUSED_USER)
DOMAIN_PAUSED_MIGRATION = INT2NUM(VIR_DOMAIN_PAUSED_MIGRATION)
DOMAIN_PAUSED_SAVE = INT2NUM(VIR_DOMAIN_PAUSED_SAVE)
DOMAIN_PAUSED_DUMP = INT2NUM(VIR_DOMAIN_PAUSED_DUMP)
DOMAIN_PAUSED_IOERROR = INT2NUM(VIR_DOMAIN_PAUSED_IOERROR)
DOMAIN_PAUSED_WATCHDOG = INT2NUM(VIR_DOMAIN_PAUSED_WATCHDOG)
DOMAIN_PAUSED_FROM_SNAPSHOT = INT2NUM(VIR_DOMAIN_PAUSED_FROM_SNAPSHOT)
DOMAIN_SHUTDOWN_UNKNOWN = INT2NUM(VIR_DOMAIN_SHUTDOWN_UNKNOWN)
DOMAIN_SHUTDOWN_USER = INT2NUM(VIR_DOMAIN_SHUTDOWN_USER)
DOMAIN_SHUTOFF_UNKNOWN = INT2NUM(VIR_DOMAIN_SHUTOFF_UNKNOWN)
DOMAIN_SHUTOFF_SHUTDOWN = INT2NUM(VIR_DOMAIN_SHUTOFF_SHUTDOWN)
DOMAIN_SHUTOFF_DESTROYED = INT2NUM(VIR_DOMAIN_SHUTOFF_DESTROYED)
DOMAIN_SHUTOFF_CRASHED = INT2NUM(VIR_DOMAIN_SHUTOFF_CRASHED)
DOMAIN_SHUTOFF_MIGRATED = INT2NUM(VIR_DOMAIN_SHUTOFF_MIGRATED)
DOMAIN_SHUTOFF_SAVED = INT2NUM(VIR_DOMAIN_SHUTOFF_SAVED)
DOMAIN_SHUTOFF_FAILED = INT2NUM(VIR_DOMAIN_SHUTOFF_FAILED)
DOMAIN_SHUTOFF_FROM_SNAPSHOT = INT2NUM(VIR_DOMAIN_SHUTOFF_FROM_SNAPSHOT)
DOMAIN_CRASHED_UNKNOWN = INT2NUM(VIR_DOMAIN_CRASHED_UNKNOWN)
DOMAIN_AFFECT_CURRENT = INT2NUM(VIR_DOMAIN_AFFECT_CURRENT)
DOMAIN_AFFECT_LIVE = INT2NUM(VIR_DOMAIN_AFFECT_LIVE)
DOMAIN_AFFECT_CONFIG = INT2NUM(VIR_DOMAIN_AFFECT_CONFIG)

Attributes

connection  [R] 

Public Class methods

Call virDomainRestore to restore the domain from the filename.

[Source]

/*
 * call-seq:
 *   Libvirt::Domain::restore(conn, filename) -> nil
 *
 * Call +virDomainRestore+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainRestore]
 * to restore the domain from the filename.
 */
static VALUE libvirt_dom_s_restore(VALUE klass, VALUE c, VALUE from) {

Public Instance methods

Call virDomainAbortJob to abort the currently running job on this domain.

[Source]

/*
 * call-seq:
 *   dom.abort_job -> nil
 *
 * Call +virDomainAbortJob+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainAbortJob]
 * to abort the currently running job on this domain.
 */
static VALUE libvirt_dom_abort_job(VALUE d) {

Call virDomainIsActive to determine if this domain is currently active.

[Source]

/*
 * call-seq:
 *   dom.active? -> [true|false]
 *
 * Call +virDomainIsActive+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainIsActive]
 * to determine if this domain is currently active.
 */
static VALUE libvirt_dom_active_p(VALUE d) {

Call virDomainAttachDevice to attach the device described by the device_xml to the domain.

[Source]

/*
 * call-seq:
 *   dom.attach_device(device_xml, flags=0) -> nil
 *
 * Call +virDomainAttachDevice+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainAttachDevice]
 * to attach the device described by the device_xml to the domain.
 */
static VALUE libvirt_dom_attach_device(int argc, VALUE *argv, VALUE s) {

Call virDomainGetAutostart to find out the state of the autostart flag for a domain.

[Source]

/*
 * call-seq:
 *   dom.autostart -> [true|false]
 *
 * Call +virDomainGetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetAutostart]
 * to find out the state of the autostart flag for a domain.
 */
static VALUE libvirt_dom_autostart(VALUE s){

Call virDomainSetAutostart to make this domain autostart when libvirtd starts up.

[Source]

/*
 * call-seq:
 *   dom.autostart = [true|false]
 *
 * Call +virDomainSetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetAutostart]
 * to make this domain autostart when libvirtd starts up.
 */
static VALUE libvirt_dom_autostart_set(VALUE s, VALUE autostart) {

Call virDomainGetAutostart to find out the state of the autostart flag for a domain.

[Source]

/*
 * call-seq:
 *   dom.autostart -> [true|false]
 *
 * Call +virDomainGetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetAutostart]
 * to find out the state of the autostart flag for a domain.
 */
static VALUE libvirt_dom_autostart(VALUE s){

Call virDomainGetBlkioParameters to retrieve all of the blkio parameters for this domain. The keys and values in the hash that is returned are hypervisor specific.

[Source]

/*
 * call-seq:
 *   dom.blkio_parameters(flags=0) -> Hash
 *
 * Call +virDomainGetBlkioParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetBlkioParameters]
 * to retrieve all of the blkio parameters for this domain.  The keys and
 * values in the hash that is returned are hypervisor specific.
 */
static VALUE libvirt_dom_get_blkio_parameters(int argc, VALUE *argv, VALUE d) {

Call virDomainSetBlkioParameters to set the blkio parameters for this domain. The keys and values in the input hash are hypervisor specific.

[Source]

/*
 * call-seq:
 *   dom.memory_parameters = Hash,flags=0
 *
 * Call +virDomainSetBlkioParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetBlkioParameters]
 * to set the blkio parameters for this domain.  The keys and values in
 * the input hash are hypervisor specific.
 */
static VALUE libvirt_dom_set_blkio_parameters(VALUE d, VALUE in) {

Call virDomainBlockPeek to read size number of bytes, starting at offset offset from domain backing file path. Due to limitations of the libvirt remote protocol, the user should never request more than 64k bytes.

[Source]

/*
 * call-seq:
 *   dom.block_peek(path, offset, size, flags=0) -> string
 *
 * Call +virDomainBlockPeek+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainBlockPeek]
 * to read size number of bytes, starting at offset offset from domain backing
 * file path.  Due to limitations of the libvirt remote protocol, the user
 * should never request more than 64k bytes.
 */
static VALUE libvirt_dom_block_peek(int argc, VALUE *argv, VALUE s) {

Call virDomainBlockStats to retrieve statistics about domain block device path.

[Source]

/*
 * call-seq:
 *   dom.block_stats(path) -> Libvirt::Domain::BlockStats
 *
 * Call +virDomainBlockStats+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainBlockStats]
 * to retrieve statistics about domain block device path.
 */
static VALUE libvirt_dom_block_stats(VALUE s, VALUE path) {

Call virDomainGetBlockInfo to retrieve information about the backing file path for the domain.

[Source]

/*
 * call-seq:
 *   dom.blockinfo(path, flags=0) -> Libvirt::Domain::BlockInfo
 *
 * Call +virDomainGetBlockInfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetBlockInfo]
 * to retrieve information about the backing file path for the domain.
 */
static VALUE libvirt_dom_block_info(int argc, VALUE *argv, VALUE s) {

Call virDomainCoreDump to do a full memory dump of the domain to filename.

[Source]

/*
 * call-seq:
 *   dom.core_dump(filename, flags=0) -> nil
 *
 * Call +virDomainCoreDump+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCoreDump]
 * to do a full memory dump of the domain to filename.
 */
static VALUE libvirt_dom_core_dump(int argc, VALUE *argv, VALUE s) {

Call virDomainCreate to start an already defined domain.

[Source]

/*
 * call-seq:
 *   dom.create(flags=0) -> nil
 *
 * Call +virDomainCreate+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreate]
 * to start an already defined domain.
 */
static VALUE libvirt_dom_create(int argc, VALUE *argv, VALUE s) {

Call virDomainCurrentSnapshot to retrieve the current snapshot for this domain (if any).

[Source]

/*
 * call-seq:
 *   dom.current_snapshot(flags=0) -> Libvirt::Domain::Snapshot
 *
 * Call +virDomainCurrentSnapshot+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCurrentSnapshot]
 * to retrieve the current snapshot for this domain (if any).
 */
static VALUE libvirt_dom_current_snapshot(int argc, VALUE *argv, VALUE d) {

Call virDomainDestroy to do a hard power-off of the domain.

[Source]

/*
 * call-seq:
 *   dom.destroy -> nil
 *
 * Call +virDomainDestroy+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainDestroy]
 * to do a hard power-off of the domain.
 */
static VALUE libvirt_dom_destroy(VALUE s) {

Call virDomainDetachDevice to detach the device described by the device_xml from the domain.

[Source]

/*
 * call-seq:
 *   dom.detach_device(device_xml, flags=0) -> nil
 *
 * Call +virDomainDetachDevice+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainDetachDevice]
 * to detach the device described by the device_xml from the domain.
 */
static VALUE libvirt_dom_detach_device(int argc, VALUE *argv, VALUE s) {

Call virDomainFree to free a domain object.

[Source]

/*
 * call-seq:
 *   dom.free -> nil
 *
 * Call +virDomainFree+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainFree]
 * to free a domain object.
 */
static VALUE libvirt_dom_free(VALUE s) {

Call virDomainGetVcpus to retrieve detailed information about the state of a domain‘s virtual CPUs.

[Source]

/* call-seq:
 *   dom.get_vcpus -> [ Libvirt::Domain::VCPUInfo ]
 *
 * Call +virDomainGetVcpus+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetVcpus]
 * to retrieve detailed information about the state of a domain's virtual CPUs.
 */
static VALUE libvirt_dom_get_vcpus(VALUE s) {

Call virDomainHasCurrentSnapshot to find out if this domain has a snapshot active.

[Source]

/*
 * call-seq:
 *   dom.has_current_snapshot?(flags=0) -> [true|false]
 *
 * Call +virDomainHasCurrentSnapshot+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainHasCurrentSnapshot]
 * to find out if this domain has a snapshot active.
 */
static VALUE libvirt_dom_has_current_snapshot_p(int argc, VALUE *argv, VALUE d) {

Call virDomainHasManagedSaveImage to determine if a particular domain has a managed save image.

[Source]

/*
 * call-seq:
 *   dom.has_managed_save?(flags=0) -> [True|False]
 *
 * Call +virDomainHasManagedSaveImage+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainHasManagedSaveImage]
 * to determine if a particular domain has a managed save image.
 */
static VALUE libvirt_dom_has_managed_save(int argc, VALUE *argv, VALUE s) {

Call virDomainGetID to retrieve the ID of this domain. If the domain isn‘t running, this will be -1.

[Source]

/*
 * call-seq:
 *   dom.id -> fixnum
 *
 * Call +virDomainGetID+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetID]
 * to retrieve the ID of this domain.  If the domain isn't running, this will
 * be -1.
 */
static VALUE libvirt_dom_id(VALUE s) {

Call virDomainInterfaceStats to retrieve statistics about domain interface if.

[Source]

/*
 * call-seq:
 *   dom.ifinfo(if) -> Libvirt::Domain::IfInfo
 *
 * Call +virDomainInterfaceStats+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainInterfaceStats]
 * to retrieve statistics about domain interface if.
 */
static VALUE libvirt_dom_if_stats(VALUE s, VALUE sif) {

Call virDomainGetInfo to retrieve domain information.

[Source]

/*
 * call-seq:
 *   dom.info -> Libvirt::Domain::Info
 *
 * Call +virDomainGetInfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetInfo]
 * to retrieve domain information.
 */
static VALUE libvirt_dom_info(VALUE s) {

Call virDomainInjectNMI to send an NMI to the guest.

[Source]

/*
 * call-seq:
 *   dom.inject_nmi(flags=0) -> nil
 *
 * Call +virDomainInjectNMI+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainInjectNMI]
 * to send an NMI to the guest.
 */
static VALUE libvirt_dom_inject_nmi(int argc, VALUE *argv, VALUE d) {

Call virDomainGetJobInfo to retrieve the current state of the running domain job.

[Source]

/*
 * call-seq:
 *   dom.job_info -> Libvirt::Domain::JobInfo
 *
 * Call +virDomainGetJobInfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetJobInfo]
 * to retrieve the current state of the running domain job.
 */
static VALUE libvirt_dom_job_info(VALUE d) {

Call virDomainSnapshotListNames to retrieve a list of snapshot names available for this domain.

[Source]

/*
 * call-seq:
 *   dom.list_snapshots(flags=0) -> list
 *
 * Call +virDomainSnapshotListNames+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotListNames]
 * to retrieve a list of snapshot names available for this domain.
 */
static VALUE libvirt_dom_list_snapshots(int argc, VALUE *argv, VALUE d) {

Call virDomainSnapshotLookupByName to retrieve a snapshot object corresponding to snapshot name.

[Source]

/*
 * call-seq:
 *   dom.lookup_snapshot_by_name(name, flags=0) -> Libvirt::Domain::Snapshot
 *
 * Call +virDomainSnapshotLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotLookupByName]
 * to retrieve a snapshot object corresponding to snapshot name.
 */
static VALUE libvirt_dom_lookup_snapshot_by_name(int argc, VALUE *argv, VALUE d) {

Call virDomainManagedSave to do a managed save of the domain. The domain will be saved to a place of libvirt‘s choosing.

[Source]

/*
 * call-seq:
 *   dom.managed_save(flags=0) -> nil
 *
 * Call +virDomainManagedSave+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainManagedSave]
 * to do a managed save of the domain.  The domain will be saved to a place
 * of libvirt's choosing.
 */
static VALUE libvirt_dom_managed_save(int argc, VALUE *argv, VALUE s) {

Call virDomainManagedSaveRemove to remove the managed save image for a domain.

[Source]

/*
 * call-seq:
 *   dom.managed_save_remove(flags=0) -> nil
 *
 * Call +virDomainManagedSaveRemove+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainManagedSaveRemove]
 * to remove the managed save image for a domain.
 */
static VALUE libvirt_dom_managed_save_remove(int argc, VALUE *argv, VALUE s) {

Call virDomainGetMaxMemory to retrieve the maximum amount of memory this domain is allowed to access. Note that the current amount of memory this domain is allowed to access may be different (see dom.memory_set).

[Source]

/*
 * call-seq:
 *   dom.max_memory -> fixnum
 *
 * Call +virDomainGetMaxMemory+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetMaxMemory]
 * to retrieve the maximum amount of memory this domain is allowed to access.
 * Note that the current amount of memory this domain is allowed to access may
 * be different (see dom.memory_set).
 */
static VALUE libvirt_dom_max_memory(VALUE s) {

Call virDomainSetMaxMemory to set the maximum amount of memory (in kilobytes) this domain should be allowed to access.

[Source]

/*
 * call-seq:
 *   dom.max_memory = Fixnum
 *
 * Call +virDomainSetMaxMemory+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetMaxMemory]
 * to set the maximum amount of memory (in kilobytes) this domain should be
 * allowed to access.
 */
static VALUE libvirt_dom_max_memory_set(VALUE s, VALUE max_memory) {

Call virDomainGetMaxVcpus to retrieve the maximum number of virtual CPUs this domain can use.

[Source]

/*
 * call-seq:
 *   dom.max_vcpus -> fixnum
 *
 * Call +virDomainGetMaxVcpus+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetMaxVcpus]
 * to retrieve the maximum number of virtual CPUs this domain can use.
 */
static VALUE libvirt_dom_max_vcpus(VALUE s) {

Call virDomainSetMemory to set the amount of memory (in kilobytes) this domain should currently have. Note this will only succeed if both the hypervisor and the domain on this connection support ballooning.

[Source]

/*
 * call-seq:
 *   dom.memory = Fixnum,flags=0
 *
 * Call +virDomainSetMemory+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetMemory]
 * to set the amount of memory (in kilobytes) this domain should currently
 * have.  Note this will only succeed if both the hypervisor and the domain on
 * this connection support ballooning.
 */
static VALUE libvirt_dom_memory_set(VALUE s, VALUE in) {

Call virDomainGetMemoryParameters to retrieve all of the memory parameters for this domain. The keys and values in the hash that is returned are hypervisor specific.

[Source]

/*
 * call-seq:
 *   dom.memory_parameters(flags=0) -> Hash
 *
 * Call +virDomainGetMemoryParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetMemoryParameters]
 * to retrieve all of the memory parameters for this domain.  The keys and
 * values in the hash that is returned are hypervisor specific.
 */
static VALUE libvirt_dom_get_memory_parameters(int argc, VALUE *argv, VALUE d) {

Call virDomainSetMemoryParameters to set the memory parameters for this domain. The keys and values in the input hash are hypervisor specific.

[Source]

/*
 * call-seq:
 *   dom.memory_parameters = Hash,flags=0
 *
 * Call +virDomainSetMemoryParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetMemoryParameters]
 * to set the memory parameters for this domain.  The keys and values in
 * the input hash are hypervisor specific.
 */
static VALUE libvirt_dom_set_memory_parameters(VALUE d, VALUE in) {

Call virDomainMemoryPeek to read size number of bytes from offset start from the domain memory. Due to limitations of the libvirt remote protocol, the user should never request more than 64k bytes.

[Source]

/*
 * call-seq:
 *   dom.memory_peek(start, size, flags=Libvirt::Domain::MEMORY_VIRTUAL) -> string
 *
 * Call +virDomainMemoryPeek+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMemoryPeek]
 * to read size number of bytes from offset start from the domain memory.
 * Due to limitations of the libvirt remote protocol, the user
 * should never request more than 64k bytes.
 */
static VALUE libvirt_dom_memory_peek(int argc, VALUE *argv, VALUE s) {

Call virDomainMemoryStats to retrieve statistics about the amount of memory consumed by a domain.

[Source]

/*
 * call-seq:
 *   dom.memory_stats(flags=0) -> [ Libvirt::Domain::MemoryStats ]
 *
 * Call +virDomainMemoryStats+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMemoryStats]
 * to retrieve statistics about the amount of memory consumed by a domain.
 */
static VALUE libvirt_dom_memory_stats(int argc, VALUE *argv, VALUE s) {

Call virDomainMigrate to migrate a domain from the host on this connection to the connection referenced in dconn.

[Source]

/*
 * call-seq:
 *   dom.migrate(dconn, flags=0, dname=nil, uri=nil, bandwidth=0) -> Libvirt::Domain
 *
 * Call +virDomainMigrate+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrate]
 * to migrate a domain from the host on this connection to the connection
 * referenced in dconn.
 */
static VALUE libvirt_dom_migrate(int argc, VALUE *argv, VALUE s) {

Call +virDomainMigrate2+ to migrate a domain from the host on this connection to the connection referenced in dconn.

[Source]

/*
 * call-seq:
 *   dom.migrate2(dconn, dxml=nil, flags=0, dname=nil, uri=nil, bandwidth=0) -> Libvirt::Domain
 *
 * Call +virDomainMigrate2+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrate2]
 * to migrate a domain from the host on this connection to the connection
 * referenced in dconn.
 */
static VALUE libvirt_dom_migrate2(int argc, VALUE *argv, VALUE s) {

Call virDomainMigrateSetMaxDowntime to set the maximum downtime desired for live migration.

[Source]

/*
 * call-seq:
 *   dom.migrate_set_max_downtime(downtime, flags=0) -> nil
 *
 * Call +virDomainMigrateSetMaxDowntime+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrateSetMaxDowntime]
 * to set the maximum downtime desired for live migration.
 */
static VALUE libvirt_dom_migrate_set_max_downtime(int argc, VALUE *argv,
                                                  VALUE s) {

Call virDomainMigrateSetMaxSpeed to set the maximum bandwidth allowed for live migration.

[Source]

/*
 * call-seq:
 *   dom.migrate_set_max_speed(bandwidth, flags=0) -> nil
 *
 * Call +virDomainMigrateSetMaxSpeed+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrateSetMaxSpeed]
 * to set the maximum bandwidth allowed for live migration.
 */
static VALUE libvirt_dom_migrate_set_max_speed(int argc, VALUE *argv, VALUE s) {

Call virDomainMigrateToURI to migrate a domain from the host on this connection to the host whose libvirt URI is duri.

[Source]

/*
 * call-seq:
 *   dom.migrate_to_uri(duri, flags=0, dname=nil, bandwidth=0) -> nil
 *
 * Call +virDomainMigrateToURI+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrateToURI]
 * to migrate a domain from the host on this connection to the host whose
 * libvirt URI is duri.
 */
static VALUE libvirt_dom_migrate_to_uri(int argc, VALUE *argv, VALUE s) {

Call +virDomainMigrateToURI2+ to migrate a domain from the host on this connection to the host whose libvirt URI is duri.

[Source]

/*
 * call-seq:
 *   dom.migrate_to_uri2(duri=nil, migrate_uri=nil, dxml=nil, flags=0, dname=nil, bandwidth=0) -> nil
 *
 * Call +virDomainMigrateToURI2+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainMigrateToURI2]
 * to migrate a domain from the host on this connection to the host whose
 * libvirt URI is duri.
 */
static VALUE libvirt_dom_migrate_to_uri2(int argc, VALUE *argv, VALUE s) {

Call virDomainGetName to retrieve the name of this domain.

[Source]

/*
 * call-seq:
 *   dom.name -> string
 *
 * Call +virDomainGetName+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetName]
 * to retrieve the name of this domain.
 */
static VALUE libvirt_dom_name(VALUE s) {

Call virDomainSnapshotNum to retrieve the number of available snapshots for this domain.

[Source]

/*
 * call-seq:
 *   dom.num_of_snapshots(flags=0) -> fixnum
 *
 * Call +virDomainSnapshotNum+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotNum]
 * to retrieve the number of available snapshots for this domain.
 */
static VALUE libvirt_dom_num_of_snapshots(int argc, VALUE *argv, VALUE d) {

Call virDomainGetVcpusFlags to retrieve the number of virtual CPUs assigned to this domain.

[Source]

/* call-seq:
 *   dom.num_vcpus(flags) -> fixnum
 *
 * Call +virDomainGetVcpusFlags+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetVcpusFlags]
 * to retrieve the number of virtual CPUs assigned to this domain.
 */
static VALUE libvirt_dom_num_vcpus(VALUE d, VALUE flags) {

Call virDomainOpenConsole to open up a console to device over stream.

[Source]

/*
 * call-seq:
 *   dom.open_console(device, stream, flags=0) -> nil
 *
 * Call +virDomainOpenConsole+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainOpenConsole]
 * to open up a console to device over stream.
 */
static VALUE libvirt_dom_open_console(int argc, VALUE *argv, VALUE d) {

Call virDomainGetOSType to retrieve the os_type of this domain. In libvirt terms, os_type determines whether this domain is fully virtualized, paravirtualized, or a container.

[Source]

/*
 * call-seq:
 *   dom.os_type -> string
 *
 * Call +virDomainGetOSType+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetOSType]
 * to retrieve the os_type of this domain.  In libvirt terms, os_type determines
 * whether this domain is fully virtualized, paravirtualized, or a container.
 */
static VALUE libvirt_dom_os_type(VALUE s) {

Call virDomainIsPersistent to determine if this is a persistent domain.

[Source]

/*
 * call-seq:
 *   dom.persistent? -> [true|false]
 *
 * Call +virDomainIsPersistent+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainIsPersistent]
 * to determine if this is a persistent domain.
 */
static VALUE libvirt_dom_persistent_p(VALUE d) {

Call virDomainPinVcpu to pin a particular virtual CPU to a range of physical processors. The cpulist should be an array of Fixnums representing the physical processors this virtual CPU should be allowed to be scheduled on.

[Source]

/*
 * call-seq:
 *   dom.pin_vcpu(vcpu, cpulist) -> nil
 *
 * Call +virDomainPinVcpu+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainPinVcpu]
 * to pin a particular virtual CPU to a range of physical processors.  The
 * cpulist should be an array of Fixnums representing the physical processors
 * this virtual CPU should be allowed to be scheduled on.
 */
static VALUE libvirt_dom_pin_vcpu(VALUE s, VALUE vcpu, VALUE cpulist) {

Call virDomainQemuMonitorCommand to send a qemu command directly to the monitor. Note that this will only work on qemu hypervisors, and the input and output formats are not guaranteed to be stable. Also note that using this command can severly impede libvirt‘s ability to manage the domain; use with caution!

[Source]

/*
 * call-seq:
 *   dom.qemu_monitor_command(cmd, flags=0) -> string
 *
 * Call virDomainQemuMonitorCommand
 * to send a qemu command directly to the monitor.  Note that this will only
 * work on qemu hypervisors, and the input and output formats are not
 * guaranteed to be stable.  Also note that using this command can severly
 * impede libvirt's ability to manage the domain; use with caution!
 */
static VALUE libvirt_dom_qemu_monitor_command(int argc, VALUE *argv, VALUE d) {

Call virDomainReboot to do a reboot of the domain.

[Source]

/*
 * call-seq:
 *   dom.reboot(flags=0) -> nil
 *
 * Call +virDomainReboot+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainReboot]
 * to do a reboot of the domain.
 */
static VALUE libvirt_dom_reboot(int argc, VALUE *argv, VALUE s) {

Call virDomainRestore to restore the domain from the filename.

[Source]

/*
 * call-seq:
 *   dom.restore(filename) -> nil
 *
 * Call +virDomainRestore+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainRestore]
 * to restore the domain from the filename.
 */
static VALUE libvirt_dom_restore(VALUE s, VALUE from) {

Call virDomainResume to resume a suspended domain. After this call the domain will start consuming CPU resources again.

[Source]

/*
 * call-seq:
 *   dom.resume -> nil
 *
 * Call +virDomainResume+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainResume]
 * to resume a suspended domain.  After this call the domain will start
 * consuming CPU resources again.
 */
static VALUE libvirt_dom_resume(VALUE s) {

Call virDomainRevertToSnapshot to restore this domain to a previously saved snapshot.

[Source]

/*
 * call-seq:
 *   dom.revert_to_snapshot(snapshot_object, flags=0) -> nil
 *
 * Call +virDomainRevertToSnapshot+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainRevertToSnapshot]
 * to restore this domain to a previously saved snapshot.
 */
static VALUE libvirt_dom_revert_to_snapshot(int argc, VALUE *argv, VALUE d) {

Call virDomainSave to save the domain state to filename. After this call, the domain will no longer be consuming any resources.

[Source]

/*
 * call-seq:
 *   dom.save(filename) -> nil
 *
 * Call +virDomainSave+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSave]
 * to save the domain state to filename.  After this call, the domain will no
 * longer be consuming any resources.
 */
static VALUE libvirt_dom_save(VALUE s, VALUE to) {

Call virDomainGetSchedulerParameters to retrieve all of the scheduler parameters for this domain. The keys and values in the hash that is returned are hypervisor specific.

[Source]

/*
 * call-seq:
 *   dom.scheduler_parameters(flags=0) -> Hash
 *
 * Call +virDomainGetSchedulerParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetSchedulerParameters]
 * to retrieve all of the scheduler parameters for this domain.  The keys and
 * values in the hash that is returned are hypervisor specific.
 */
static VALUE libvirt_dom_get_scheduler_parameters(int argc, VALUE *argv,
                                                  VALUE d) {

Call virDomainSetSchedulerParameters to set the scheduler parameters for this domain. The keys and values in the input hash are hypervisor specific. If an empty hash is given, no changes are made (and no error is raised).

[Source]

/*
 * call-seq:
 *   dom.scheduler_parameters = Hash,flags=0
 *
 * Call +virDomainSetSchedulerParameters+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetSchedulerParameters]
 * to set the scheduler parameters for this domain.  The keys and values in
 * the input hash are hypervisor specific.  If an empty hash is given, no
 * changes are made (and no error is raised).
 */
static VALUE libvirt_dom_set_scheduler_parameters(VALUE d, VALUE input) {

Call virDomainGetSchedulerType to retrieve the scheduler type used on this domain.

[Source]

/*
 * call-seq:
 *   dom.scheduler_type -> [type, #params]
 *
 * Call +virDomainGetSchedulerType+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetSchedulerType]
 * to retrieve the scheduler type used on this domain.
 */
static VALUE libvirt_dom_scheduler_type(VALUE d) {

Call virDomainScreenshot to take a screenshot of the domain console as a stream.

[Source]

/*
 * call-seq:
 *   dom.screenshot(stream, screen, flags=0) -> nil
 *
 * Call +virDomainScreenshot+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainScreenshot]
 * to take a screenshot of the domain console as a stream.
 */
static VALUE libvirt_dom_screenshot(int argc, VALUE *argv, VALUE d) {

Call virDomainGetSecurityLabel to retrieve the security label applied to this domain.

[Source]

/*
 * call-seq:
 *   dom.security_label -> Libvirt::Domain::SecurityLabel
 *
 * Call +virDomainGetSecurityLabel+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetSecurityLabel]
 * to retrieve the security label applied to this domain.
 */
static VALUE libvirt_dom_security_label(VALUE s) {

Call virDomainShutdown to do a soft shutdown of the domain. The mechanism for doing the shutdown is hypervisor specific, and may require software running inside the domain to succeed.

[Source]

/*
 * call-seq:
 *   dom.shutdown -> nil
 *
 * Call +virDomainShutdown+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainShutdown]
 * to do a soft shutdown of the domain.  The mechanism for doing the shutdown
 * is hypervisor specific, and may require software running inside the domain
 * to succeed.
 */
static VALUE libvirt_dom_shutdown(VALUE s) {

Call virDomainSnapshotCreateXML to create a new snapshot based on snapshot_xml.

[Source]

/*
 * call-seq:
 *   dom.snapshot_create_xml(snapshot_xml, flags=0) -> Libvirt::Domain::Snapshot
 *
 * Call +virDomainSnapshotCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotCreateXML]
 * to create a new snapshot based on snapshot_xml.
 */
static VALUE libvirt_dom_snapshot_create_xml(int argc, VALUE *argv, VALUE d) {

Call virDomainGetState to get the current state of the domain.

[Source]

/*
 * call-seq:
 *   dom.state(flags=0) -> state, reason
 *
 * Call +virDomainGetState+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetState]
 * to get the current state of the domain.
 */
static VALUE libvirt_dom_get_state(int argc, VALUE *argv, VALUE d) {

Call virDomainSuspend to stop the domain from executing. The domain will still continue to consume memory, but will not take any CPU time.

[Source]

/*
 * call-seq:
 *   dom.suspend -> nil
 *
 * Call +virDomainSuspend+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSuspend]
 * to stop the domain from executing.  The domain will still continue to
 * consume memory, but will not take any CPU time.
 */
static VALUE libvirt_dom_suspend(VALUE s) {

Call virDomainUndefine to undefine the domain. After this call, the domain object is no longer valid.

[Source]

/*
 * call-seq:
 *   dom.undefine -> nil
 *
 * Call +virDomainUndefine+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainUndefine]
 * to undefine the domain.  After this call, the domain object is no longer
 * valid.
 */
static VALUE libvirt_dom_undefine(VALUE s) {

Call virDomainUpdateDeviceFlags to update the device described by the device_xml.

[Source]

/*
 * call-seq:
 *   dom.update_device(device_xml, flags=0) -> nil
 *
 * Call +virDomainUpdateDeviceFlags+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainUpdateDeviceFlags]
 * to update the device described by the device_xml.
 */
static VALUE libvirt_dom_update_device(int argc, VALUE *argv, VALUE s) {

call-seq:

  dom.updated? ->  [True|False]

Call virDomainIsUpdated to determine whether the definition for this domain has been updated.

[Source]

/*
 * call-seq:
 *   dom.updated? ->  [True|False]
 * Call +virDomainIsUpdated+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainIsUpdated]
 * to determine whether the definition for this domain has been updated.
 */
static VALUE libvirt_dom_is_updated(VALUE d) {

Call virDomainGetUUIDString to retrieve the UUID of this domain.

[Source]

/*
 * call-seq:
 *   dom.uuid -> string
 *
 * Call +virDomainGetUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetUUIDString]
 * to retrieve the UUID of this domain.
 */
static VALUE libvirt_dom_uuid(VALUE s) {

Call virDomainSetVcpus to set the current number of virtual CPUs this domain should have. Note that this will only work if both the hypervisor and domain on this connection support virtual CPU hotplug/hot-unplug.

[Source]

/*
 * call-seq:
 *   dom.vcpus = Fixnum
 *
 * Call +virDomainSetVcpus+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetVcpus]
 * to set the current number of virtual CPUs this domain should have.  Note
 * that this will only work if both the hypervisor and domain on this
 * connection support virtual CPU hotplug/hot-unplug.
 */
static VALUE libvirt_dom_vcpus_set(VALUE s, VALUE nvcpus) {

Call virDomainSetVcpusFlags to set the current number of virtual CPUs this domain should have. The flags parameter controls whether the change is made to the running domain the domain configuration, or both, and must not be 0.

[Source]

/*
 * call-seq:
 *   dom.vcpus_flags = Fixnum,flags
 *
 * Call +virDomainSetVcpusFlags+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSetVcpusFlags]
 * to set the current number of virtual CPUs this domain should have.  The
 * flags parameter controls whether the change is made to the running domain
 * the domain configuration, or both, and must not be 0.
 */
static VALUE libvirt_dom_vcpus_set_flags(VALUE s, VALUE vcpus) {

Call virDomainGetXMLDesc to retrieve the XML describing this domain.

[Source]

/*
 * call-seq:
 *   dom.xml_desc(flags=0) -> string
 *
 * Call +virDomainGetXMLDesc+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainGetXMLDesc]
 * to retrieve the XML describing this domain.
 */
static VALUE libvirt_dom_xml_desc(int argc, VALUE *argv, VALUE s) {

[Validate]