org.libvirt
public class Connect extends Object
Constructor Summary | |
---|---|
Connect(String uri, boolean readOnly)
Constructs a Connect object from the supplied URI.
| |
Connect(String uri, ConnectAuth auth, int flags)
Constructs a Connect object from the supplied URI,
using the supplied authentication callback
| |
Connect(String uri)
Constructs a read-write Connect object from the supplied URI.
|
Method Summary | |
---|---|
void | close()
Closes the connection to the hypervisor/driver. |
Domain | domainCreateLinux(String xmlDesc, int flags)
Launches a new Linux guest domain.
|
Domain | domainDefineXML(String xmlDesc)
Defines a domain, but does not start it
|
Domain | domainLookupByID(int id)
Finds a domain based on the hypervisor ID number.
|
Domain | domainLookupByName(String name)
Looks up a domain based on its name.
|
Domain | domainLookupByUUID(int[] UUID)
Looks up a domain based on its UUID in array form.
|
Domain | domainLookupByUUIDString(String UUID)
Looks up a domain based on its UUID in String form.
|
void | finalize() |
String | getCapabilities()
Provides capabilities of the hypervisor / driver.
|
String | getHostName()
Returns the system hostname on which the hypervisor is running.
(the result of the gethostname(2) system call)
If we are connected to a remote system, then this returns the hostname of the remote system.
|
long | getLibVirVersion()
Gets the version of the native libvirt library that the JNI part is linked to.
|
int | getMaxVcpus(String type)
Provides the maximum number of virtual CPUs supported for a guest VM of a specific type.
|
String | getType()
Gets the name of the Hypervisor software used.
|
String | getURI()
Returns the URI (name) of the hypervisor connection.
|
long | getVersion()
Gets the version level of the Hypervisor running.
|
long | GetHypervisorVersion(String type)
Returns the version of the hypervisor against which the library was compiled.
|
String[] | listDefinedDomains()
Lists the names of the defined domains
|
String[] | listDefinedNetworks()
Lists the inactive networks
|
String[] | listDefinedStoragePools()
Provides the list of names of inactive storage pools.
|
int[] | listDomains()
Lists the active domains.
|
String[] | listNetworks()
Lists the active networks.
|
String[] | listStoragePools()
Provides the list of names of active storage pools.
|
Network | networkCreateXML(String xmlDesc)
Creates and starts a new virtual network.
|
Network | networkDefineXML(String xmlDesc)
Defines a network, but does not create it.
|
Network | networkLookupByName(String name)
Looks up a network on the based on its name.
|
Network | networkLookupByUUID(int[] UUID)
Looks up a network based on its UUID represented as an int array.
|
Network | networkLookupByUUIDString(String UUID)
Looks up a network based on its UUID represented as a String.
|
NodeInfo | nodeInfo()
Returns a NodeInfo object describing the hardware configuration of the node.
|
int | numOfDefinedDomains()
Provides the number of inactive domains.
|
int | numOfDefinedNetworks()
Provides the number of inactive networks.
|
int | numOfDefinedStoragePools()
Provides the number of inactive storage pools
|
int | numOfDomains()
Provides the number of active domains.
|
int | numOfNetworks()
Provides the number of active networks.
|
int | numOfStoragePools()
Provides the number of active storage pools
|
void | restore(String from)
Restores a domain saved to disk by Domain.save().
|
void | setDom0Memory(long memory)
change the amount of memory reserved to Domain0.
|
StoragePool | storagePoolCreateXML(String xmlDesc, int flags)
Create a new storage based on its XML description.
|
StoragePool | storagePoolDefineXML(String xml, int flags)
Define a new inactive storage pool based on its XML description.
|
StoragePool | storagePoolLookupByName(String name)
Fetch a storage pool based on its unique name
|
StoragePool | storagePoolLookupByUUID(int[] UUID)
Fetch a storage pool based on its globally unique id
|
StoragePool | storagePoolLookupByUUIDString(String UUID)
Fetch a storage pool based on its globally unique id
|
StorageVol | storageVolLookupByKey(String key)
Fetch a a storage volume based on its globally unique key
|
StorageVol | storageVolLookupByPath(String path)
Fetch a storage volume based on its locally (host) unique path
|
Parameters: uri The connection URI readOnly Whether the connection is read-only
Throws: LibvirtException
See Also: The URI documentation
Parameters: uri The connection URI auth a ConnectAuth object flags
Throws: LibvirtException
See Also: The URI documentation
Parameters: uri The connection URI
Throws: LibvirtException
See Also: The URI documentation
Throws: LibvirtException
Parameters: xmlDesc the Domain description in XML flags an optional set of flags (unused)
Returns: the Domain object
Throws: LibvirtException
See Also: The XML format description
Parameters: xmlDesc
Returns: the Domain object
Throws: LibvirtException
See Also: The XML format description
Parameters: id the hypervisor id
Returns: the Domain object
Throws: LibvirtException
Parameters: name the name of the domain
Returns: the Domain object
Throws: LibvirtException
Parameters: UUID the UUID as an unpacked int array
Returns: the Domain object
Throws: LibvirtException
Parameters: UUID the UUID in canonical String representation
Returns: the Domain object
Throws: LibvirtException
Returns: an XML String describing the capabilities.
Throws: LibvirtException
See Also: The XML format description
Returns: the hostname
Throws: LibvirtException
Throws: LibvirtException
Parameters: type
Returns: the number of CPUs
Throws: LibvirtException
Returns: the name
Throws: LibvirtException
Returns: the URI
Throws: LibvirtException
Returns: major * 1,000,000 + minor * 1,000 + release
Throws: LibvirtException
Parameters: type
Returns: major * 1,000,000 + minor * 1,000 + release
Throws: LibvirtException
Returns: an Array of Strings that contains the names of the defined domains
Throws: LibvirtException
Returns: an Array of Strings that contains the names of the inactive networks
Throws: LibvirtException
Returns: an Array of Strings that contains the names of the defined storage pools
Throws: LibvirtException
Returns: and array of the IDs of the active domains
Throws: LibvirtException
Returns: an Array of Strings that contains the names of the active networks
Throws: LibvirtException
Returns: an Array of Strings that contains the names of the defined storage pools
Throws: LibvirtException
Parameters: xmlDesc the Network Description
Returns: the Network object representing the created network
Throws: LibvirtException
See Also: The XML format description
Parameters: xmlDesc
Returns: the resulting Network object
Throws: LibvirtException
See Also: The XML format description
Parameters: name name of the network
Returns: The Network object found
Throws: LibvirtException
Parameters: UUID the UUID as an unpacked int array
Returns: The Network object found
Throws: LibvirtException
Parameters: UUID the UUID in canonical String representation
Returns: The Network object found
Throws: LibvirtException
Returns: a NodeInfo object
Throws: LibvirtException
Returns: the number of inactive domains
Throws: LibvirtException
Returns: the number of inactive networks
Throws: LibvirtException
Returns: the number of pools found
Throws: LibvirtException
Returns: the number of active domains
Throws: LibvirtException
Returns: the number of active networks
Throws: LibvirtException
Returns: the number of pools found
Throws: LibvirtException
Parameters: from the path of the saved file on the remote host
Throws: LibvirtException
Parameters: memory in kilobytes
Throws: LibvirtException
Parameters: xmlDesc XML description for new pool flags future flags, use 0 for now
Returns: StoragePool object
Throws: LibvirtException
Parameters: xml XML description for new pool flags flags future flags, use 0 for now
Returns: StoragePool object
Throws: LibvirtException
Parameters: name name of pool to fetch
Returns: StoragePool object
Throws: LibvirtException
Parameters: UUID globally unique id of pool to fetch
Returns: a new network object
Throws: LibvirtException
Parameters: UUID globally unique id of pool to fetch
Returns: VirStoragePool object
Throws: LibvirtException
Parameters: key globally unique key
Returns: a storage volume
Parameters: path locally unique path
Returns: a storage volume