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

Methods

baseline_cpu   capabilities   close   closed?   compare_cpu   create_domain_linux   create_domain_xml   create_network_xml   create_nodedevice_xml   create_storage_pool_xml   define_domain_xml   define_interface_xml   define_network_xml   define_nwfilter_xml   define_secret_xml   define_storage_pool_xml   discover_storage_pool_sources   domain_event_deregister   domain_event_deregister_any   domain_event_register   domain_event_register_any   domain_xml_from_native   domain_xml_to_native   encrypted?   hostname   interface_change_begin   interface_change_commit   interface_change_rollback   libversion   list_defined_domains   list_defined_interfaces   list_defined_networks   list_defined_storage_pools   list_domains   list_interfaces   list_networks   list_nodedevices   list_nwfilters   list_secrets   list_storage_pools   lookup_domain_by_id   lookup_domain_by_name   lookup_domain_by_uuid   lookup_interface_by_mac   lookup_interface_by_name   lookup_network_by_name   lookup_network_by_uuid   lookup_nodedevice_by_name   lookup_nwfilter_by_name   lookup_nwfilter_by_uuid   lookup_secret_by_usage   lookup_secret_by_uuid   lookup_storage_pool_by_name   lookup_storage_pool_by_uuid   max_vcpus   node_cells_free_memory   node_free_memory   node_get_info   node_get_security_model   num_of_defined_domains   num_of_defined_interfaces   num_of_defined_networks   num_of_defined_storage_pools   num_of_domains   num_of_interfaces   num_of_networks   num_of_nodedevices   num_of_nwfilters   num_of_secrets   num_of_storage_pools   secure?   stream   sys_info   type   uri   version  

Classes and Modules

Class Libvirt::Connect::NodeSecurityModel
Class Libvirt::Connect::Nodeinfo

Constants

CPU_COMPARE_ERROR = INT2NUM(VIR_CPU_COMPARE_ERROR)
CPU_COMPARE_INCOMPATIBLE = INT2NUM(VIR_CPU_COMPARE_INCOMPATIBLE)
CPU_COMPARE_IDENTICAL = INT2NUM(VIR_CPU_COMPARE_IDENTICAL)
CPU_COMPARE_SUPERSET = INT2NUM(VIR_CPU_COMPARE_SUPERSET)
DOMAIN_EVENT_DEFINED = INT2NUM(VIR_DOMAIN_EVENT_DEFINED)
DOMAIN_EVENT_DEFINED_ADDED = INT2NUM(VIR_DOMAIN_EVENT_DEFINED_ADDED)
DOMAIN_EVENT_DEFINED_UPDATED = INT2NUM(VIR_DOMAIN_EVENT_DEFINED_UPDATED)
DOMAIN_EVENT_UNDEFINED = INT2NUM(VIR_DOMAIN_EVENT_UNDEFINED)
DOMAIN_EVENT_UNDEFINED_REMOVED = INT2NUM(VIR_DOMAIN_EVENT_UNDEFINED_REMOVED)
DOMAIN_EVENT_STARTED_BOOTED = INT2NUM(VIR_DOMAIN_EVENT_STARTED_BOOTED)
DOMAIN_EVENT_STARTED_MIGRATED = INT2NUM(VIR_DOMAIN_EVENT_STARTED_MIGRATED)
DOMAIN_EVENT_STARTED_RESTORED = INT2NUM(VIR_DOMAIN_EVENT_STARTED_RESTORED)
DOMAIN_EVENT_SUSPENDED_PAUSED = INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_PAUSED)
DOMAIN_EVENT_SUSPENDED_MIGRATED = INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED)
DOMAIN_EVENT_RESUMED_UNPAUSED = INT2NUM(VIR_DOMAIN_EVENT_RESUMED_UNPAUSED)
DOMAIN_EVENT_RESUMED_MIGRATED = INT2NUM(VIR_DOMAIN_EVENT_RESUMED_MIGRATED)
DOMAIN_EVENT_STOPPED_SHUTDOWN = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN)
DOMAIN_EVENT_STOPPED_DESTROYED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_DESTROYED)
DOMAIN_EVENT_STOPPED_CRASHED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_CRASHED)
DOMAIN_EVENT_STOPPED_MIGRATED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_MIGRATED)
DOMAIN_EVENT_STOPPED_SAVED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_SAVED)
DOMAIN_EVENT_STOPPED_FAILED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FAILED)
DOMAIN_EVENT_STARTED = INT2NUM(VIR_DOMAIN_EVENT_STARTED)
DOMAIN_EVENT_SUSPENDED = INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED)
DOMAIN_EVENT_RESUMED = INT2NUM(VIR_DOMAIN_EVENT_RESUMED)
DOMAIN_EVENT_STOPPED = INT2NUM(VIR_DOMAIN_EVENT_STOPPED)
DOMAIN_EVENT_STARTED_FROM_SNAPSHOT = INT2NUM(VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT)
DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT = INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT)
DOMAIN_EVENT_SUSPENDED_IOERROR = INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_IOERROR)
DOMAIN_EVENT_SUSPENDED_WATCHDOG = INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG)
DOMAIN_EVENT_ID_WATCHDOG = INT2NUM(VIR_DOMAIN_EVENT_ID_WATCHDOG)
DOMAIN_EVENT_WATCHDOG_NONE = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_NONE)
DOMAIN_EVENT_WATCHDOG_PAUSE = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_PAUSE)
DOMAIN_EVENT_WATCHDOG_RESET = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_RESET)
DOMAIN_EVENT_WATCHDOG_POWEROFF = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF)
DOMAIN_EVENT_WATCHDOG_SHUTDOWN = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN)
DOMAIN_EVENT_WATCHDOG_DEBUG = INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_DEBUG)
DOMAIN_EVENT_ID_IO_ERROR = INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR)
DOMAIN_EVENT_IO_ERROR_NONE = INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_NONE)
DOMAIN_EVENT_IO_ERROR_PAUSE = INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_PAUSE)
DOMAIN_EVENT_IO_ERROR_REPORT = INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_REPORT)
DOMAIN_EVENT_ID_GRAPHICS = INT2NUM(VIR_DOMAIN_EVENT_ID_GRAPHICS)
DOMAIN_EVENT_GRAPHICS_CONNECT = INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_CONNECT)
DOMAIN_EVENT_GRAPHICS_INITIALIZE = INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE)
DOMAIN_EVENT_GRAPHICS_DISCONNECT = INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT)
DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 = INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4)
DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 = INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6)
DOMAIN_EVENT_ID_LIFECYCLE = INT2NUM(VIR_DOMAIN_EVENT_ID_LIFECYCLE)
DOMAIN_EVENT_ID_REBOOT = INT2NUM(VIR_DOMAIN_EVENT_ID_REBOOT)
DOMAIN_EVENT_ID_RTC_CHANGE = INT2NUM(VIR_DOMAIN_EVENT_ID_RTC_CHANGE)
DOMAIN_EVENT_ID_IO_ERROR_REASON = INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON)
DOMAIN_EVENT_ID_CONTROL_ERROR = INT2NUM(VIR_DOMAIN_EVENT_ID_CONTROL_ERROR)

Public Instance methods

Call virConnectBaselineCPU to compare the most feature-rich CPU which is compatible with all given host CPUs.

[Source]

/*
 * call-seq:
 *   conn.baseline_cpu([xml, xml2, ...], flags=0) -> XML
 *
 * Call +virConnectBaselineCPU+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectBaselineCPU]
 * to compare the most feature-rich CPU which is compatible with all
 * given host CPUs.
 */
static VALUE libvirt_conn_baseline_cpu(int argc, VALUE *argv, VALUE s) {

Call virConnectGetCapabilities to retrieve the capabilities XML for this connection.

[Source]

/*
 * call-seq:
 *   conn.capabilities -> string
 *
 * Call +virConnectGetCapabilities+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetCapabilities]
 * to retrieve the capabilities XML for this connection.
 */
static VALUE libvirt_conn_capabilities(VALUE s) {

Call virConnectClose to close the connection.

[Source]

/*
 * call-seq:
 *   conn.close -> nil
 *
 * Call +virConnectClose+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectClose]
 * to close the connection.
 */
static VALUE libvirt_conn_close(VALUE s) {

Return true if the connection is closed, false if it is open.

[Source]

/*
 * call-seq:
 *   conn.closed? -> [True|False]
 *
 * Return +true+ if the connection is closed, +false+ if it is open.
 */
static VALUE libvirt_conn_closed_p(VALUE s) {

Call virConnectCompareCPU to compare the host CPU with the XML contained in xml. Returns one of Libvirt::CPU_COMPARE_ERROR, Libvirt::CPU_COMPARE_INCOMPATIBLE, Libvirt::CPU_COMPARE_IDENTICAL, or Libvirt::CPU_COMPARE_SUPERSET.

[Source]

/*
 * call-seq:
 *   conn.compare_cpu(xml, flags=0) -> compareflag
 *
 * Call +virConnectCompareCPU+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectCompareCPU]
 * to compare the host CPU with the XML contained in xml.  Returns one of
 * Libvirt::CPU_COMPARE_ERROR, Libvirt::CPU_COMPARE_INCOMPATIBLE,
 * Libvirt::CPU_COMPARE_IDENTICAL, or Libvirt::CPU_COMPARE_SUPERSET.
 */
static VALUE libvirt_conn_compare_cpu(int argc, VALUE *argv, VALUE s) {

Call virDomainCreateLinux to start a transient domain from the given XML. Deprecated; use conn.create_domain_xml instead.

[Source]

/*
 * call-seq:
 *   conn.create_domain_linux(xml, flags=0) -> Libvirt::Domain
 *
 * Call +virDomainCreateLinux+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreateLinux]
 * to start a transient domain from the given XML.  Deprecated; use
 * conn.create_domain_xml instead.
 */
static VALUE libvirt_conn_create_linux(int argc, VALUE *argv, VALUE c) {

Call virDomainCreateXML to start a transient domain from the given XML.

[Source]

/*
 * call-seq:
 *   conn.create_domain_xml(xml, flags=0) -> Libvirt::Domain
 *
 * Call +virDomainCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreateXML]
 * to start a transient domain from the given XML.
 */
static VALUE libvirt_conn_create_xml(int argc, VALUE *argv, VALUE c) {

Call virNetworkCreateXML to start a new transient network from xml.

[Source]

/*
 * call-seq:
 *   conn.create_network_xml(xml) -> Libvirt::Network
 *
 * Call +virNetworkCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkCreateXML]
 * to start a new transient network from xml.
 */
static VALUE libvirt_conn_create_network_xml(VALUE c, VALUE xml) {

Call virNodeDeviceCreateXML to create a new node device from xml.

[Source]

/*
 * call-seq:
 *   conn.create_nodedevice_xml(xml, flags=0) -> Libvirt::NodeDevice
 *
 * Call +virNodeDeviceCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeDeviceCreateXML]
 * to create a new node device from xml.
 */
static VALUE libvirt_conn_create_nodedevice_xml(int argc, VALUE *argv,
                                                VALUE c) {

Call virStoragePoolCreateXML to start a new transient storage pool from xml.

[Source]

/*
 * call-seq:
 *   conn.create_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
 *
 * Call +virStoragePoolCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolCreateXML]
 * to start a new transient storage pool from xml.
 */
static VALUE libvirt_conn_create_pool_xml(int argc, VALUE *argv, VALUE c) {

Call virDomainDefineXML to define a permanent domain on this connection.

[Source]

/*
 * call-seq:
 *   conn.define_domain_xml(xml) -> Libvirt::Domain
 *
 * Call +virDomainDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainDefineXML]
 * to define a permanent domain on this connection.
 */
static VALUE libvirt_conn_define_domain_xml(VALUE c, VALUE xml) {

Call virInterfaceDefineXML to define a new interface from xml.

[Source]

/*
 * call-seq:
 *   conn.define_interface_xml(xml, flags=0) -> Libvirt::Interface
 *
 * Call +virInterfaceDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceDefineXML]
 * to define a new interface from xml.
 */
static VALUE libvirt_conn_define_interface_xml(int argc, VALUE *argv, VALUE c) {

Call virNetworkDefineXML to define a new permanent network from xml.

[Source]

/*
 * call-seq:
 *   conn.define_network_xml(xml) -> Libvirt::Network
 *
 * Call +virNetworkDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkDefineXML]
 * to define a new permanent network from xml.
 */
static VALUE libvirt_conn_define_network_xml(VALUE c, VALUE xml) {

Call virNWFilterDefineXML to define a new network filter from xml.

[Source]

/*
 * call-seq:
 *   conn.define_nwfilter_xml(xml) -> Libvirt::NWFilter
 *
 * Call +virNWFilterDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterDefineXML]
 * to define a new network filter from xml.
 */
static VALUE libvirt_conn_define_nwfilter_xml(VALUE c, VALUE xml) {

Call virSecretDefineXML to define a new secret from xml.

[Source]

/*
 * call-seq:
 *   conn.define_secret_xml(xml, flags=0) -> Libvirt::Secret
 *
 * Call +virSecretDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretDefineXML]
 * to define a new secret from xml.
 */
static VALUE libvirt_conn_define_secret_xml(int argc, VALUE *argv, VALUE c) {

Call virStoragePoolDefineXML to define a permanent storage pool from xml.

[Source]

/*
 * call-seq:
 *   conn.define_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
 *
 * Call +virStoragePoolDefineXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolDefineXML]
 * to define a permanent storage pool from xml.
 */
static VALUE libvirt_conn_define_pool_xml(int argc, VALUE *argv, VALUE c) {

Call virConnectFindStoragePoolSources to find the storage pool sources corresponding to type.

[Source]

/*
 * call-seq:
 *   conn.discover_storage_pool_sources(type, srcSpec=nil, flags=0) -> string
 *
 * Call +virConnectFindStoragePoolSources+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectFindStoragePoolSources]
 * to find the storage pool sources corresponding to type.
 */
static VALUE libvirt_conn_find_storage_pool_sources(int argc, VALUE *argv,
                                                    VALUE c) {

Call virConnectDomainEventDeregister to deregister the event callback from libvirt. This method is deprecated in favor of domain_event_deregister_any (though they cannot be mixed; if the callback was registered with domain_event_register, it must be deregistered with domain_event_deregister).

[Source]

/*
 * call-seq:
 *   conn.domain_event_deregister(callback) -> nil
 *
 * Call +virConnectDomainEventDeregister+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventDeregister]
 * to deregister the event callback from libvirt.  This method is deprecated
 * in favor of domain_event_deregister_any (though they cannot be mixed; if
 * the callback was registered with domain_event_register, it must be
 * deregistered with domain_event_deregister).
 */
static VALUE libvirt_conn_domain_event_deregister(VALUE c) {

Call virConnectDomainEventDeregisterAny to deregister a callback from libvirt. The callbackID must be a libvirt-specific handle returned by domain_event_register_any.

[Source]

/*
 * call-seq:
 *   conn.domain_event_deregister_any(callbackID) -> nil
 *
 * Call +virConnectDomainEventDeregisterAny+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventDeregisterAny]
 * to deregister a callback from libvirt.  The callbackID must be a
 * libvirt-specific handle returned by domain_event_register_any.
 */
static VALUE libvirt_conn_domain_event_deregister_any(VALUE c,
                                                      VALUE callbackID) {

Call virConnectDomainEventRegister to register callback for domain lifecycle events with libvirt. The callback can either be a Symbol (that is the name of a method to callback) or a Proc. The callback must accept 5 parameters: Libvirt::Connect, Libvirt::Domain, event, detail, opaque. The opaque parameter to domain_event_register can be any valid ruby type, and will be passed into callback as "opaque". This method is deprecated in favor of domain_event_register_any.

[Source]

/*
 * call-seq:
 *   conn.domain_event_register(callback, opaque=nil) -> nil
 *
 * Call +virConnectDomainEventRegister+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventRegister]
 * to register callback for domain lifecycle events with libvirt.  The
 * callback can either be a Symbol (that is the name of a method to callback)
 * or a Proc.  The callback must accept 5 parameters: Libvirt::Connect,
 * Libvirt::Domain, event, detail, opaque.  The opaque parameter to
 * domain_event_register can be any valid ruby type, and will be passed into
 * callback as "opaque".  This method is deprecated in favor of
 * domain_event_register_any.
 */
static VALUE libvirt_conn_domain_event_register(int argc, VALUE *argv,
                                                VALUE c) {

Call virConnectDomainEventRegisterAny to register callback for eventID with libvirt. The eventID must be one of the Libvirt::Connect::DOMAIN_EVENT_ID_* constants. The callback can either be a Symbol (that is the name of a method to callback) or a Proc. Note that the callback must accept different numbers of arguments depending on the eventID passed in. The arguments are as follows:

If dom is a valid Libvirt::Domain object, then only events from that domain will be seen. The opaque parameter can be any valid ruby type, and will be passed into callback as "opaque". This method returns a libvirt-specific handle, which must be used by the application to deregister the callback later (see domain_event_deregister_any).

[Source]

/*
 * call-seq:
 *   conn.domain_event_register_any(eventID, callback, dom=nil, opaque=nil) -> fixnum
 *
 * Call +virConnectDomainEventRegisterAny+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventRegisterAny]
 * to register callback for eventID with libvirt.  The eventID must be one of
 * the Libvirt::Connect::DOMAIN_EVENT_ID_* constants.  The callback can either
 * be a Symbol (that is the name of a method to callback) or a Proc.  Note that
 * the callback must accept different numbers of arguments depending on the
 * eventID passed in.  The arguments are as follows:
 *
 * - DOMAIN_EVENT_ID_LIFECYCLE: Libvirt::Connect, Libvirt::Domain, event, detail, opaque
 * - DOMAIN_EVENT_ID_REBOOT: Libvirt::Connect, Libvirt::Domain, opaque
 * - DOMAIN_EVENT_ID_RTC_CHANGE: Libvirt::Connect, Libvirt::Domain, utc_offset, opaque
 * - DOMAIN_EVENT_ID_WATCHDOG: Libvirt::Connect, Libvirt::Domain, action, opaque
 * - DOMAIN_EVENT_ID_IO_ERROR: Libvirt::Connect, Libvirt::Domain, src_path, dev_alias, action, opaque
 * - DOMAIN_EVENT_ID_IO_ERROR_REASON: Libvirt::Connect, Libvirt::Domain, src_path, dev_alias, action, reason, opaque
 * - DOMAIN_EVENT_ID_GRAPHICS: Libvirt::Connect, Libvirt::Domain, phase, local, remote, auth_scheme, subject, opaque

 * If dom is a valid Libvirt::Domain object, then only events from that
 * domain will be seen.  The opaque parameter can be any valid ruby type, and
 * will be passed into callback as "opaque".  This method returns a
 * libvirt-specific handle, which must be used by the application to
 * deregister the callback later (see domain_event_deregister_any).
 */
static VALUE libvirt_conn_domain_event_register_any(int argc, VALUE *argv,
                                                    VALUE c) {

Call virConnectDomainXMLFromNative to convert a native hypervisor domain representation to libvirt XML.

[Source]

/*
 * call-seq:
 *   conn.domain_xml_from_native(nativeFormat, xml, flags=0) -> string
 *
 * Call +virConnectDomainXMLFromNative+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainXMLFromNative]
 * to convert a native hypervisor domain representation to libvirt XML.
 */
static VALUE libvirt_conn_domain_xml_from_native(int argc, VALUE *argv,
                                                 VALUE s) {

Call virConnectDomainXMLToNative to convert libvirt XML to a native domain hypervisor representation.

[Source]

/*
 * call-seq:
 *   conn.domain_xml_to_native(nativeFormat, xml, flags=0) -> string
 *
 * Call +virConnectDomainXMLToNative+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainXMLToNative]
 * to convert libvirt XML to a native domain hypervisor representation.
 */
static VALUE libvirt_conn_domain_xml_to_native(int argc, VALUE *argv, VALUE s) {

Call virConnectIsEncrypted to determine if the connection is encrypted.

[Source]

/*
 * call-seq:
 *   conn.encrypted? -> [True|False]
 *
 * Call +virConnectIsEncrypted+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectIsEncrypted]
 * to determine if the connection is encrypted.
 */
static VALUE libvirt_conn_encrypted_p(VALUE s) {

Call virConnectGetHostname to retrieve the hostname of the hypervisor for this connection.

[Source]

/*
 * call-seq:
 *   conn.hostname -> string
 *
 * Call +virConnectGetHostname+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetHostname]
 * to retrieve the hostname of the hypervisor for this connection.
 */
static VALUE libvirt_conn_hostname(VALUE s) {

Call virInterfaceChangeBegin to create a restore point for interface changes. Once changes have been made, conn.interface_change_commit can be used to commit the result or conn.interface_change_rollback can be used to rollback to this restore point.

[Source]

/*
 * call-seq:
 *   conn.interface_change_begin(flags=0) -> nil
 *
 * Call +virInterfaceChangeBegin+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeBegin]
 * to create a restore point for interface changes.  Once changes have been
 * made, conn.interface_change_commit can be used to commit the result or
 * conn.interface_change_rollback can be used to rollback to this restore point.
 */
static VALUE libvirt_conn_interface_change_begin(int argc, VALUE *argv,
                                                 VALUE c) {

Call virInterfaceChangeCommit to commit the interface changes since the last conn.interface_change_begin.

[Source]

/*
 * call-seq:
 *   conn.interface_change_commit(flags=0) -> nil
 *
 * Call +virInterfaceChangeCommit+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeCommit]
 * to commit the interface changes since the last conn.interface_change_begin.
 */
static VALUE libvirt_conn_interface_change_commit(int argc, VALUE *argv,
                                                  VALUE c) {

Call virInterfaceChangeRollback to rollback to the restore point saved by conn.interface_change_begin.

[Source]

/*
 * call-seq:
 *   conn.interface_change_rollback(flags=0) -> nil
 *
 * Call +virInterfaceChangeRollback+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeRollback]
 * to rollback to the restore point saved by conn.interface_change_begin.
 */
static VALUE libvirt_conn_interface_change_rollback(int argc, VALUE *argv,
                                                    VALUE c) {

Call virConnectGetLibVersion to retrieve the version of the libvirt library for this connection.

[Source]

/*
 * call-seq:
 *   conn.libversion -> fixnum
 *
 * Call +virConnectGetLibVersion+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetLibVersion]
 * to retrieve the version of the libvirt library for this connection.
 */
static VALUE libvirt_conn_libversion(VALUE s) {

Call virConnectListDefinedDomains to retrieve a list of inactive domain names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_defined_domains -> list
 *
 * Call +virConnectListDefinedDomains+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedDomains]
 * to retrieve a list of inactive domain names on this connection.
 */
static VALUE libvirt_conn_list_defined_domains(VALUE s) {

Call virConnectListDefinedInterfaces to retrieve a list of inactive interface names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_defined_interfaces -> list
 *
 * Call +virConnectListDefinedInterfaces+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedInterfaces]
 * to retrieve a list of inactive interface names on this connection.
 */
static VALUE libvirt_conn_list_defined_interfaces(VALUE s) {

Call virConnectListDefinedNetworks to retrieve a list of inactive network names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_of_defined_networks -> list
 *
 * Call +virConnectListDefinedNetworks+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedNetworks]
 * to retrieve a list of inactive network names on this connection.
 */
static VALUE libvirt_conn_list_defined_networks(VALUE s) {

Call virConnectListDefinedStoragePools to retrieve a list of inactive storage pool names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_defined_storage_pools -> list
 *
 * Call +virConnectListDefinedStoragePools+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedStoragePools]
 * to retrieve a list of inactive storage pool names on this connection.
 */
static VALUE libvirt_conn_list_defined_storage_pools(VALUE s) {

Call virConnectListDomains to retrieve a list of active domain IDs on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_domains -> list
 *
 * Call +virConnectListDomains+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDomains]
 * to retrieve a list of active domain IDs on this connection.
 */
static VALUE libvirt_conn_list_domains(VALUE s) {

Call virConnectListInterfaces to retrieve a list of active interface names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_interfaces -> list
 *
 * Call +virConnectListInterfaces+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListInterfaces]
 * to retrieve a list of active interface names on this connection.
 */
static VALUE libvirt_conn_list_interfaces(VALUE s) {

Call virConnectListNetworks to retrieve a list of active network names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_networks -> list
 *
 * Call +virConnectListNetworks+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListNetworks]
 * to retrieve a list of active network names on this connection.
 */
static VALUE libvirt_conn_list_networks(VALUE s) {

Call virNodeListDevices to retrieve a list of node device names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_nodedevices(cap=nil, flags=0) -> list
 *
 * Call +virNodeListDevices+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeListDevices]
 * to retrieve a list of node device names on this connection.
 */
static VALUE libvirt_conn_list_nodedevices(int argc, VALUE *argv, VALUE c) {

Call virConnectListNWFilters to retrieve a list of network filter names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_nwfilters -> list
 *
 * Call +virConnectListNWFilters+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListNWFilters]
 * to retrieve a list of network filter names on this connection.
 */
static VALUE libvirt_conn_list_nwfilters(VALUE s) {

Call virConnectListSecrets to retrieve a list of secret UUIDs on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_secrets -> list
 *
 * Call +virConnectListSecrets+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListSecrets]
 * to retrieve a list of secret UUIDs on this connection.
 */
static VALUE libvirt_conn_list_secrets(VALUE s) {

Call virConnectListStoragePools to retrieve a list of active storage pool names on this connection.

[Source]

/*
 * call-seq:
 *   conn.list_storage_pools -> list
 *
 * Call +virConnectListStoragePools+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListStoragePools]
 * to retrieve a list of active storage pool names on this connection.
 */
static VALUE libvirt_conn_list_storage_pools(VALUE s) {

Call virDomainLookupByID to retrieve a domain object for id.

[Source]

/*
 * call-seq:
 *   conn.lookup_domain_by_id(id) -> Libvirt::Domain
 *
 * Call +virDomainLookupByID+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByID]
 * to retrieve a domain object for id.
 */
static VALUE libvirt_conn_lookup_domain_by_id(VALUE c, VALUE id) {

Call virDomainLookupByName to retrieve a domain object for name.

[Source]

/*
 * call-seq:
 *   conn.lookup_domain_by_name(name) -> Libvirt::Domain
 *
 * Call +virDomainLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByName]
 * to retrieve a domain object for name.
 */
static VALUE libvirt_conn_lookup_domain_by_name(VALUE c, VALUE name) {

Call virDomainLookupByUUIDString to retrieve a domain object for uuid.

[Source]

/*
 * call-seq:
 *   conn.lookup_domain_by_uuid(uuid) -> Libvirt::Domain
 *
 * Call +virDomainLookupByUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByUUIDString]
 * to retrieve a domain object for uuid.
 */
static VALUE libvirt_conn_lookup_domain_by_uuid(VALUE c, VALUE uuid) {

Call virInterfaceLookupByMACString to retrieve an interface object by MAC address.

[Source]

/*
 * call-seq:
 *   conn.lookup_interface_by_mac(mac) -> Libvirt::Interface
 *
 * Call +virInterfaceLookupByMACString+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceLookupByMACString]
 * to retrieve an interface object by MAC address.
 */
static VALUE libvirt_conn_lookup_interface_by_mac(VALUE c, VALUE mac) {

Call virInterfaceLookupByName to retrieve an interface object by name.

[Source]

/*
 * call-seq:
 *   conn.lookup_interface_by_name(name) -> Libvirt::Interface
 *
 * Call +virInterfaceLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceLookupByName]
 * to retrieve an interface object by name.
 */
static VALUE libvirt_conn_lookup_interface_by_name(VALUE c, VALUE name) {

Call virNetworkLookupByName to retrieve a network object by name.

[Source]

/*
 * call-seq:
 *   conn.lookup_network_by_name(name) -> Libvirt::Network
 *
 * Call +virNetworkLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByName]
 * to retrieve a network object by name.
 */
static VALUE libvirt_conn_lookup_network_by_name(VALUE c, VALUE name) {

Call virNetworkLookupByUUIDString to retrieve a network object by UUID.

[Source]

/*
 * call-seq:
 *   conn.lookup_network_by_uuid(uuid) -> Libvirt::Network
 *
 * Call +virNetworkLookupByUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUIDString]
 * to retrieve a network object by UUID.
 */
static VALUE libvirt_conn_lookup_network_by_uuid(VALUE c, VALUE uuid) {

Call virNodeDeviceLookupByName to retrieve a nodedevice object by name.

[Source]

/*
 * call-seq:
 *   conn.lookup_nodedevice_by_name(name) -> Libvirt::NodeDevice
 *
 * Call +virNodeDeviceLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeDeviceLookupByName]
 * to retrieve a nodedevice object by name.
 */
static VALUE libvirt_conn_lookup_nodedevice_by_name(VALUE c, VALUE name) {

Call virNWFilterLookupByName to retrieve a network filter object by name.

[Source]

/*
 * call-seq:
 *   conn.lookup_nwfilter_by_name(name) -> Libvirt::NWFilter
 *
 * Call +virNWFilterLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterLookupByName]
 * to retrieve a network filter object by name.
 */
static VALUE libvirt_conn_lookup_nwfilter_by_name(VALUE c, VALUE name) {

Call virNWFilterLookupByUUIDString to retrieve a network filter object by UUID.

[Source]

/*
 * call-seq:
 *   conn.lookup_nwfilter_by_uuid(uuid) -> Libvirt::NWFilter
 *
 * Call +virNWFilterLookupByUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterLookupByUUIDString]
 * to retrieve a network filter object by UUID.
 */
static VALUE libvirt_conn_lookup_nwfilter_by_uuid(VALUE c, VALUE uuid) {

Call virSecretLookupByUsage to retrieve a secret by usagetype.

[Source]

/*
 * call-seq:
 *   conn.lookup_secret_by_usage(usagetype, usageID) -> Libvirt::Secret
 *
 * Call +virSecretLookupByUsage+[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretLookupByUsage]
 * to retrieve a secret by usagetype.
 */
static VALUE libvirt_conn_lookup_secret_by_usage(VALUE c, VALUE usagetype,
                                                 VALUE usageID) {

Call virSecretLookupByUUID to retrieve a network object from uuid.

[Source]

/*
 * call-seq:
 *   conn.lookup_secret_by_uuid(uuid) -> Libvirt::Secret
 *
 * Call +virSecretLookupByUUID+[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretLookupByUUID]
 * to retrieve a network object from uuid.
 */
static VALUE libvirt_conn_lookup_secret_by_uuid(VALUE c, VALUE uuid) {

Call virStoragePoolLookupByName to retrieve a storage pool object by name.

[Source]

/*
 * call-seq:
 *   conn.lookup_storage_pool_by_name(name) -> Libvirt::StoragePool
 *
 * Call +virStoragePoolLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolLookupByName]
 * to retrieve a storage pool object by name.
 */
static VALUE libvirt_conn_lookup_pool_by_name(VALUE c, VALUE name) {

Call virStoragePoolLookupByUUIDString to retrieve a storage pool object by uuid.

[Source]

/*
 * call-seq:
 *   conn.lookup_storage_pool_by_uuid(uuid) -> Libvirt::StoragePool
 *
 * Call +virStoragePoolLookupByUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolLookupByUUIDString]
 * to retrieve a storage pool object by uuid.
 */
static VALUE libvirt_conn_lookup_pool_by_uuid(VALUE c, VALUE uuid) {

Call virConnectGetMaxVcpus to retrieve the maximum number of virtual cpus supported by the hypervisor for this connection.

[Source]

/*
 * call-seq:
 *   conn.max_vcpus(type=nil) -> fixnum
 *
 * Call +virConnectGetMaxVcpus+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetMaxVcpus]
 * to retrieve the maximum number of virtual cpus supported by the hypervisor
 * for this connection.
 */
static VALUE libvirt_conn_max_vcpus(int argc, VALUE *argv, VALUE s) {

Call virNodeGetCellsFreeMemory to retrieve the amount of free memory in each NUMA cell on the host for this connection.

[Source]

/*
 * call-seq:
 *   conn.node_cells_free_memory(startCell=0, maxCells=#nodeCells) -> list
 *
 * Call +virNodeGetCellsFreeMemory+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetCellsFreeMemory]
 * to retrieve the amount of free memory in each NUMA cell on the host for
 * this connection.
 */
static VALUE libvirt_conn_node_cells_free_memory(int argc, VALUE *argv,
                                                 VALUE s) {

Call virNodeGetFreeMemory to retrieve the amount of free memory available on the host for this connection.

[Source]

/*
 * call-seq:
 *   conn.node_free_memory -> fixnum
 *
 * Call +virNodeGetFreeMemory+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetFreeMemory]
 * to retrieve the amount of free memory available on the host for this
 * connection.
 */
static VALUE libvirt_conn_node_free_memory(VALUE s) {

Call virNodeGetInfo to retrieve information about the node for this connection.

[Source]

/*
 * call-seq:
 *   conn.node_get_info -> Libvirt::Connect::Nodeinfo
 *
 * Call +virNodeGetInfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetInfo]
 * to retrieve information about the node for this connection.
 */
static VALUE libvirt_conn_node_get_info(VALUE s) {

Call virNodeGetSecurityModel to retrieve the security model in use on the host for this connection.

[Source]

/*
 * call-seq:
 *   conn.node_get_security_model -> Libvirt::Connect::NodeSecurityModel
 *
 * Call +virNodeGetSecurityModel+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetSecurityModel]
 * to retrieve the security model in use on the host for this connection.
 */
static VALUE libvirt_conn_node_get_security_model(VALUE s) {

Call virConnectNumOfDefinedDomains to retrieve the number of inactive domains on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_defined_domains -> fixnum
 *
 * Call +virConnectNumOfDefinedDomains+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedDomains]
 * to retrieve the number of inactive domains on this connection.
 */
static VALUE libvirt_conn_num_of_defined_domains(VALUE s) {

Call virConnectNumOfDefinedInterfaces to retrieve the number of inactive interfaces on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_defined_interfaces -> fixnum
 *
 * Call +virConnectNumOfDefinedInterfaces+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedInterfaces]
 * to retrieve the number of inactive interfaces on this connection.
 */
static VALUE libvirt_conn_num_of_defined_interfaces(VALUE s) {

Call virConnectNumOfDefinedNetworks to retrieve the number of inactive networks on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_defined_networks -> fixnum
 *
 * Call +virConnectNumOfDefinedNetworks+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedNetworks]
 * to retrieve the number of inactive networks on this connection.
 */
static VALUE libvirt_conn_num_of_defined_networks(VALUE s) {

Call virConnectNumOfDefinedStoragePools to retrieve the number of inactive storage pools on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_defined_storage_pools -> fixnum
 *
 * Call +virConnectNumOfDefinedStoragePools+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedStoragePools]
 * to retrieve the number of inactive storage pools on this connection.
 */
static VALUE libvirt_conn_num_of_defined_storage_pools(VALUE s) {

Call virConnectNumOfDomains to retrieve the number of active domains on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_domains -> fixnum
 *
 * Call +virConnectNumOfDomains+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDomains]
 * to retrieve the number of active domains on this connection.
 */
static VALUE libvirt_conn_num_of_domains(VALUE s) {

Call virConnectNumOfInterfaces to retrieve the number of active interfaces on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_interfaces -> fixnum
 *
 * Call +virConnectNumOfInterfaces+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfInterfaces]
 * to retrieve the number of active interfaces on this connection.
 */
static VALUE libvirt_conn_num_of_interfaces(VALUE s) {

Call virConnectNumOfNetworks to retrieve the number of active networks on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_networks -> fixnum
 *
 * Call +virConnectNumOfNetworks+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfNetworks]
 * to retrieve the number of active networks on this connection.
 */
static VALUE libvirt_conn_num_of_networks(VALUE s) {

Call virNodeNumOfDevices to retrieve the number of node devices on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_nodedevices(cap=nil, flags=0) -> fixnum
 *
 * Call +virNodeNumOfDevices+[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeNumOfDevices]
 * to retrieve the number of node devices on this connection.
 */
static VALUE libvirt_conn_num_of_nodedevices(int argc, VALUE *argv, VALUE c) {

Call virConnectNumOfNWFilters to retrieve the number of network filters on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_nwfilters -> fixnum
 *
 * Call +virConnectNumOfNWFilters+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfNWFilters]
 * to retrieve the number of network filters on this connection.
 */
static VALUE libvirt_conn_num_of_nwfilters(VALUE s) {

Call virConnectNumOfSecrets to retrieve the number of secrets on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_secrets -> fixnum
 *
 * Call +virConnectNumOfSecrets+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfSecrets]
 * to retrieve the number of secrets on this connection.
 */
static VALUE libvirt_conn_num_of_secrets(VALUE s) {

Call virConnectNumOfStoragePools to retrieve the number of active storage pools on this connection.

[Source]

/*
 * call-seq:
 *   conn.num_of_storage_pools -> fixnum
 *
 * Call +virConnectNumOfStoragePools+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfStoragePools]
 * to retrieve the number of active storage pools on this connection.
 */
static VALUE libvirt_conn_num_of_storage_pools(VALUE s) {

Call virConnectIsSecure to determine if the connection is secure.

[Source]

/*
 * call-seq:
 *   conn.secure? -> [True|False]
 *
 * Call +virConnectIsSecure+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectIsSecure]
 * to determine if the connection is secure.
 */
static VALUE libvirt_conn_secure_p(VALUE s) {

Call virStreamNew to create a new stream.

[Source]

/*
 * call-seq:
 *   conn.stream(flags=0) -> Libvirt::Stream
 *
 * Call +virStreamNew+[http://www.libvirt.org/html/libvirt-libvirt.html#virStreamNew]
 * to create a new stream.
 */
static VALUE libvirt_conn_stream(int argc, VALUE *argv, VALUE c) {

Call virConnectGetSysinfo to get machine-specific information about the hypervisor. This may include data such as the host UUID, the BIOS version, etc.

[Source]

/*
 * call-seq:
 *   conn.sys_info(flags=0) -> string
 *
 * Call +virConnectGetSysinfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetSysinfo]
 * to get machine-specific information about the hypervisor.  This may include
 * data such as the host UUID, the BIOS version, etc.
 */
static VALUE libvirt_conn_get_sys_info(int argc, VALUE *argv, VALUE c) {

Call virConnectGetType to retrieve the type of hypervisor for this connection.

[Source]

/*
 * call-seq:
 *   conn.type -> string
 *
 * Call +virConnectGetType+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetType]
 * to retrieve the type of hypervisor for this connection.
 */
static VALUE libvirt_conn_type(VALUE s) {

Call virConnectGetURI to retrieve the canonical URI for this connection.

[Source]

/*
 * call-seq:
 *   conn.uri -> string
 *
 * Call +virConnectGetURI+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetURI]
 * to retrieve the canonical URI for this connection.
 */
static VALUE libvirt_conn_uri(VALUE s) {

Call virConnectGetVersion to retrieve the version of the hypervisor for this connection.

[Source]

/*
 * call-seq:
 *   conn.version -> fixnum
 *
 * Call +virConnectGetVersion+[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetVersion]
 * to retrieve the version of the hypervisor for this connection.
 */
static VALUE libvirt_conn_version(VALUE s) {

[Validate]