force migration是force什么意思思

转轨中的中国工业化、城市化与农业劳动力转移关系研究_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
&&¥2.00
&&¥1.00
&&¥3.00
喜欢此文档的还喜欢
转轨中的中国工业化、城市化与农业劳动力转移关系研究
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
NAME& & libvirtFILE& & /usr/lib64/python2.6/site-packages/libvirt.pyDESCRIPTION& & # WARNING WARNING WARNING WARNING& & #& & # This file is automatically written by generator.py. Any changes& & # made here will be lost.& & #& & # To change the manually written methods edit libvirt-override.py& & # To change the automatically written methods edit generator.py& & #& & # WARNING WARNING WARNING WARNING& & #& & #& & # Manually written part of python bindings for libvirt& & #CLASSES& & exceptions.Exception(exceptions.BaseException)& & & & libvirtError& & virConnect& & virDomain& & virDomainSnapshot& & virInterface& & virNWFilter& & virNetwork& & virNodeDevice& & virSecret& & virStoragePool& & virStorageVol& & virStreamclass libvirtError(exceptions.Exception)& & &| &# The root of all libvirt errors.& & &| && & &| &Method resolution order:& & &| & & &libvirtError& & &| & & &exceptions.Exception& & &| & & &exceptions.BaseException& & &| & & &__builtin__.object& & &| && & &| &Methods defined here:& & &| && & &| &__init__(self, defmsg, conn=None, dom=None, net=None, pool=None, vol=None)& & &| && & &| &get_error_code(self)& & &| && & &| &get_error_domain(self)& & &| && & &| &get_error_level(self)& & &| && & &| &get_error_message(self)& & &| && & &| &get_int1(self)& & &| && & &| &get_int2(self)& & &| && & &| &get_str1(self)& & &| && & &| &get_str2(self)& & &| && & &| &get_str3(self)& & &| && & &| &----------------------------------------------------------------------& & &| &Data descriptors defined here:& & &| && & &| &__weakref__ & & | & & &list of weak references to the object (if defined)& & &| && & &| &----------------------------------------------------------------------& & &| &Data and other attributes inherited from exceptions.Exception:& & &| && & &| &__new__ = &built-in method __new__ of type object&& & &| & & &T.__new__(S, ...) -& a new object with type S, a subtype of T& & &| && & &| &----------------------------------------------------------------------& & &| &Methods inherited from exceptions.BaseException:& & &| && & &| &__delattr__(...)& & &| & & &x.__delattr__('name') &==& del x.name& & &| && & &| &__getattribute__(...)& & &| & & &x.__getattribute__('name') &==& x.name& & &| && & &| &__getitem__(...)& & &| & & &x.__getitem__(y) &==& x[y]& & &| && & &| &__getslice__(...)& & &| & & &x.__getslice__(i, j) &==& x[i:j]& & &| & & && & &| & & &Use of negative indices is not supported.& & &| && & &| &__reduce__(...)& & &| && & &| &__repr__(...)& & &| & & &x.__repr__() &==& repr(x)& & &| && & &| &__setattr__(...)& & &| & & &x.__setattr__('name', value) &==& x.name = value& & &| && & &| &__setstate__(...)& & &| && & &| &__str__(...)& & &| & & &x.__str__() &==& str(x)& & &| && & &| &__unicode__(...)& & &| && & &| &----------------------------------------------------------------------& & &| &Data descriptors inherited from exceptions.BaseException:& & &| && & &| &__dict__& & &| && & &| &args& & &| && & &| &message& &&& & class virConnect& & &| &Methods defined here:& & &| && & &| &__del__(self)& & &| & & &# virConnect methods from virConnect.py (hand coded)& & &| && & &| &__init__(self, _obj=None)& & &| && & &| &baselineCPU(self, xmlCPUs, flags)& & &| & & &Computes the most feature-rich CPU which is compatible with all given host CPUs.& & &| && & &| &changeBegin(self, flags)& & &| & & &This function creates a restore point to which one can return& & &| & & &later by calling virInterfaceChangeRollback(). This function should& & &| & & &be called before any transaction with interface configuration.& & &| & & &Once it is known that a new configuration works, it can be committed via& & &| & & &virInterfaceChangeCommit(), which frees the restore point.& & &| & & && & &| & & &If virInterfaceChangeBegin() is called when a transaction is& & &| & & &already opened, this function will fail, and a& & &| & & &VIR_ERR_INVALID_OPERATION will be logged.& & &| && & &| &changeCommit(self, flags)& & &| & & &This commits the changes made to interfaces and frees the restore point& & &| & & &created by virInterfaceChangeBegin().& & &| & & && & &| & & &If virInterfaceChangeCommit() is called when a transaction is not& & &| & & &opened, this function will fail, and a VIR_ERR_INVALID_OPERATION& & &| & & &will be logged.& & &| && & &| &changeRollback(self, flags)& & &| & & &This cancels changes made to interfaces settings by restoring previous& & &| & & &state created by virInterfaceChangeBegin().& & &| & & && & &| & & &If virInterfaceChangeRollback() is called when a transaction is not& & &| & & &opened, this function will fail, and a VIR_ERR_INVALID_OPERATION& & &| & & &will be logged.& & &| && & &| &close(self)& & &| & & &This function closes the connection to the Hypervisor. This should& & &| & & &not be called if further interaction with the Hypervisor are needed& & &| & & &especially if there is running domain which need further monitoring by& & &| & & &the application.& & &| & & && & &| & & &Connections a the count is explicitly& & &| & & &increased by the initial open (virConnectOpen, virConnectOpenAuth,& & &| & & &and the like) as well as virConnectR it is also temporarily& & &| & & &increased by other API that depend on the connection remaining& & &| & & &alive. &The open and every virConnectRef call should have a& & &| & & &matching virConnectClose, and all other references will be released& & &| & & &after the corresponding operation completes.& & &| && & &| &compareCPU(self, xmlDesc, flags)& & &| & & &Compares the given CPU description with the host CPU& & &| && & &| &createLinux(self, xmlDesc, flags)& & &| & & &Deprecated after 0.4.6.& & &| & & &Renamed to virDomainCreateXML() providing identical functionality.& & &| & & &This existing name will left indefinitely for API compatibility.& & &| && & &| &createXML(self, xmlDesc, flags)& & &| & & &Launch a new guest domain, based on an XML description similar& & &| & & &to the one returned by virDomainGetXMLDesc()& & &| & & &This function may require privileged access to the hypervisor.& & &| & & &The domain is not persistent, so its definition will disappear when it& & &| & & &is destroyed, or if the host is restarted (see virDomainDefineXML() to& & &| & & &define persistent domains).& & &| & & && & &| & & &If the VIR_DOMAIN_START_PAUSED flag is set, the guest domain& & &| & & &will be started, but its CPUs will remain paused. The CPUs& & &| & & &can later be manually started using virDomainResume.& & &| & & && & &| & & &If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest& & &| & & &domain will be automatically destroyed when the virConnectPtr& & &| & & &object is finally released. This will also happen if the& & &| & & &client application crashes / loses its connection to the& & &| & & &libvirtd daemon. Any domains marked for auto destroy will& & &| & & &block attempts at migration, save-to-file, or snapshots.& & &| && & &| &defineXML(self, xml)& & &| & & &Define a domain, but does not start it.& & &| & & &This definition is persistent, until explicitly undefined with& & &| & & &virDomainUndefine(). A previous definition for this domain would be& & &| & & &overriden if it already exists.& & &| & & && & &| & & &Some hypervisors may prevent this operation if there is a current& & &| & & &block copy operation on a transient domain with the same id as the& & &| & & & in that case, use virDomainBlockJobAbort() to& & | & & &stop the block copy first.& & &| && & &| &dispatchDomainEventBlockPullCallback(self, dom, path, type, status, cbData)& & &| & & &Dispatches events to python user domain blockJob event callbacks& & &| && & &| &domainEventDeregister(self, cb)& & &| & & &Removes a Domain Event Callback. De-registering for a& & &| & & &domain callback will disable delivery of this event type& & &| && & &| &domainEventDeregisterAny(self, callbackID)& & &| & & &Removes a Domain Event Callback. De-registering for a& & &| & & &domain callback will disable delivery of this event type& & &| && & &| &domainEventRegister(self, cb, opaque)& & &| & & &Adds a Domain Event Callback. Registering for a domain& & &| & & &callback will enable delivery of the events& & &| && & &| &domainEventRegisterAny(self, dom, eventID, cb, opaque)& & &| & & &Adds a Domain Event Callback. Registering for a domain& & &| & & &callback will enable delivery of the events& & &| && & &| &domainXMLFromNative(self, nativeFormat, nativeConfig, flags)& & &| & & &Reads native configuration data &describing a domain, and& & &| & & &generates libvirt domain XML. The format of the native& & &| & & &data is hypervisor dependant.& & &| && & &| &domainXMLToNative(self, nativeFormat, domainXml, flags)& & &| & & &Reads a domain XML configuration document, and generates& & &| & & &a native configuration file describing the domain.& & &| & & &The format of the native data is hypervisor dependant.& & &| && & &| &findStoragePoolSources(self, type, srcSpec, flags)& & &| & & &Talks to a storage backend and attempts to auto-discover the set of & && & &| & & &available storage pool sources. e.g. For iSCSI this would be a set of& & &| & & &iSCSI targets. For NFS this would be a list of exported paths. &The& & &| & & &srcSpec (optional for some storage pool types, e.g. local ones) is& & &| & & &an instance of the storage pool's source element specifying where& & &| & & &to look for the pools.& & &| & & && & &| & & &srcSpec is not required for some types (e.g., those querying& & &| & & &local storage resources only)& & &| && & &| &getCPUStats(self, cpuNum, flags)& & &| & & &Extract node's CPU statistics.& & &| && & &| &getCapabilities(self)& & &| & & &Provides capabilities of the hypervisor / driver.& & &| && & &| &getCellsFreeMemory(self, startCell, maxCells)& & &| & & &Returns the available memory for a list of cells& & &| && & &| &getFreeMemory(self)& & &| & & &provides the free memory available on the Node& & &| & & &Note: most libvirt APIs provide memory sizes in kibibytes, but in this& & &| & & &function the returned value is in bytes. Divide by 1024 as necessary.& & &| && & &| &getHostname(self)& & &| & & &This returns the system hostname on which the hypervisor is& & &| & & &running (the result of the gethostname system call). &If& & &| & & &we are connected to a remote system, then this returns the& & &| & & &hostname of the remote system.& & &| && & &| &getInfo(self)& & &| & & &Extract hardware information about the Node.& & &| && & &| &getLibVersion(self)& & &| & & &Returns the libvirt version of the connection host& & &| && & &| &getMaxVcpus(self, type)& & &| & & &Provides the maximum number of virtual CPUs supported for a guest VM of a& & &| & & &specific type. The 'type' parameter here corresponds to the 'type'& & &| & & &attribute in the &domain& element of the XML.& & &| && & &| &getMemoryStats(self, cellNum, flags)& & &| & & &Extract node's memory statistics.& & &| && & &| &getSysinfo(self, flags)& & &| & & &This returns the XML description of the sysinfo details for the& & &| & & &host on which the hypervisor is running, in the same format as the& & &| & & &&sysinfo& element of a domain XML. &This information is generally& & &| & & &available only for hypervisors running with root privileges.& & &| && & &| &getType(self)& & &| & & &Get the name of the Hypervisor software used.& & &| && & &| &getURI(self)& & &| & & &This returns the URI (name) of the hypervisor connection.& & &| & & &Normally this is the same as or similar to the string passed& & &| & & &to the virConnectOpen/virConnectOpenReadOnly call, but& & &| & & &the driver may make the URI canonical. &If name == None& & &| & & &was passed to virConnectOpen, then the driver will return& & &| & & &a non-None URI which can be used to connect to the same& & &| & & &hypervisor later.& & &| && & &| &getVersion(self)& & &| & & &Returns the running hypervisor version of the connection host& & &| && & &| &interfaceDefineXML(self, xml, flags)& & &| & & &Define an interface (or modify existing interface configuration).& & &| & & && & &| & & &Normally this change in the interface configuration is immediately& & &| & & &permanent/persistent, but if virInterfaceChangeBegin() has been& & &| & & &previously called (i.e. if an interface config transaction is& & &| & & &open), the new interface definition will only become permanent if& & &| & & &virInterfaceChangeCommit() is called prior to the next reboot of& & &| & & &the system running libvirtd. Prior to that time, it can be& & &| & & &explicitly removed using virInterfaceChangeRollback(), or will be& & &| & & &automatically removed during the next reboot of the system running& & &| & & &libvirtd.& & &| && & &| &interfaceLookupByMACString(self, macstr)& & &| & & &Try to lookup an interface on the given hypervisor based on its MAC.& & &| && & &| &interfaceLookupByName(self, name)& & &| & & &Try to lookup an interface on the given hypervisor based on its name.& & &| && & &| &isAlive(self)& & &| & & &Determine if the connection to the hypervisor is still alive& & &| & & && & &| & & &A connection will be classed as alive if it is either local, or running& & &| & & &over a channel (TCP or UNIX socket) which is not closed.& & &| && & &| &isEncrypted(self)& & &| & & &Determine if the connection to the hypervisor is encrypted& & &| && & &| &isSecure(self)& & &| & & &Determine if the connection to the hypervisor is secure& & &| & & && & &| & & &A connection will be classed as secure if it is either& & &| & & &encrypted, or running over a channel which is not exposed& & &| & & &to eavesdropping (eg a UNIX domain socket, or pipe)& & &| && & &| &listDefinedDomains(self)& & &| & & &list the defined domains, stores the pointers to the names in @names& & &| && & &| &listDefinedInterfaces(self)& & &| & & &list the defined interfaces, stores the pointers to the names in @names& & &| && & &| &listDefinedNetworks(self)& & &| & & &list the defined networks, stores the pointers to the names in @names& & &| && & &| &listDefinedStoragePools(self)& & &| & & &list the defined storage pool, stores the pointers to the names in @names& & &| && & &| &listDevices(self, cap, flags)& & &| & & &list the node devices& & &| && & &| &listDomainsID(self)& & &| & & &Returns the list of the ID of the domains on the hypervisor& & &| && & &| &listInterfaces(self)& & &| & & &list the running interfaces, stores the pointers to the names in @names& & &| && & &| &listNWFilters(self)& & &| & & &List the defined network filters& & &| && & &| &listNetworks(self)& & &| & & &list the networks, stores the pointers to the names in @names& & &| && & &| &listSecrets(self)& & &| & & &List the defined secret IDs& & &| && & &| &listStoragePools(self)& & &| & & &list the storage pools, stores the pointers to the names in @names& & &| && & &| &lookupByID(self, id)& & &| & & &Try to find a domain based on the hypervisor ID number& & &| & & &Note that this won't work for inactive domains which have an ID of -1,& & &| & & &in that case a lookup based on the Name or UUId need to be done instead.& & &| && & &| &lookupByName(self, name)& & &| & & &Try to lookup a domain on the given hypervisor based on its name.& & &| && & &| &lookupByUUID(self, uuid)& & &| & & &Try to lookup a domain on the given hypervisor based on its UUID.& & &| && & &| &lookupByUUIDString(self, uuidstr)& & &| & & &Try to lookup a domain on the given hypervisor based on its UUID.& & &| && & &| &migrate(self, domain, flags, dname, uri, bandwidth)& & &| & & &Migrate the domain object from its current host to the destination& & &| & & &host given by dconn (a connection to the destination host).& & &| & & && & &| & & &Flags may be one of more of the following:& & &| & & & &VIR_MIGRATE_LIVE & & &Do not pause the VM during migration& & &| & & & &VIR_MIGRATE_PEER2PEER Direct connection between source & destination hosts& & &| & & & &VIR_MIGRATE_TUNNELLED Tunnel migration data over the libvirt RPC channel& & &| & & & &VIR_MIGRATE_PERSIST_DEST If the migration is successful, persist the domain& & &| & & & & & & & & & & & & & & & & on the destination host.& & &| & & & &VIR_MIGRATE_UNDEFINE_SOURCE If the migration is successful, undefine the& & &| & & & & & & & & & & & & & & & & & &domain on the source host.& & &| & & & &VIR_MIGRATE_PAUSED & &Leave the domain suspended on the remote side.& & &| & & & &VIR_MIGRATE_CHANGE_PROTECTION Protect against domain configuration& & &| & & & & & & & & & & & & & & & & & & &changes during the migration process (set& & &| & & & & & & & & & & & & & & & & & & &automatically when supported).& & &| & & & &VIR_MIGRATE_UNSAFE & &Force migration even if it is considered unsafe.& & &| & & && & &| & & &VIR_MIGRATE_TUNNELLED requires that VIR_MIGRATE_PEER2PEER be set.& & &| & & &Applications using the VIR_MIGRATE_PEER2PEER flag will probably& & &| & & &prefer to invoke virDomainMigrateToURI, avoiding the need to& & &| & & &open connection to the destination host themselves.& & &| & & && & &| & & &If a hypervisor supports renaming domains during migration,& & &| & & &then you may set the dname parameter to the new name (otherwise& & &| & & &it keeps the same name). &If this is not supported by the& & &| & & &hypervisor, dname must be None or else you will get an error.& & &| & & && & &| & & &If the VIR_MIGRATE_PEER2PEER flag is set, the uri parameter& & &| & & &must be a valid libvirt connection URI, by which the source& & &| & & &libvirt driver can connect to the destination libvirt. If& & &| & & &omitted, the dconn connection object will be queried for its& & &| & & &current URI.& & &| & & && & &| & & &If the VIR_MIGRATE_PEER2PEER flag is NOT set, the URI parameter& & &| & & &takes a hypervisor specific format. The hypervisor capabilities& & &| & & &XML includes details of the support URI schemes. If omitted& & &| & & &the dconn will be asked for a default URI.& & &| & & && & &| & & &In either case it is typically only necessary to specify a& & &| & & &URI if the destination host has multiple interfaces and a& & &| & & &specific interface is required to transmit migration data.& & &| & & && & &| & & &The maximum bandwidth (in Mbps) that will be used to do migration& & &| & & &can be specified with the bandwidth parameter. &If set to 0,& & &| & & &libvirt will choose a suitable default. &Some hypervisors do& & &| & & &not support this feature and will return an error if bandwidth& & &| & & &is not 0.& & &| & & && & &| & & &To see which features are supported by the current hypervisor,& & &| & & &see virConnectGetCapabilities, /capabilities/host/migration_features.& & &| & & && & &| & & &There are many limitations on migration imposed by the underlying& & &| & & &technology - for example it may not be possible to migrate between& & &| & & &different processors even with the same architecture, or between& & &| & & &different types of hypervisor.& & &| && & &| &migrate2(self, domain, dxml, flags, dname, uri, bandwidth)& & &| & & &Migrate the domain object from its current host to the destination& & &| & & &host given by dconn (a connection to the destination host).& & &| & & && & &| & & &Flags may be one of more of the following:& & &| & & & &VIR_MIGRATE_LIVE & & &Do not pause the VM during migration& & &| & & & &VIR_MIGRATE_PEER2PEER Direct connection between source & destination hosts& & &| & & & &VIR_MIGRATE_TUNNELLED Tunnel migration data over the libvirt RPC channel& & &| & & & &VIR_MIGRATE_PERSIST_DEST If the migration is successful, persist the domain& & &| & & & & & & & & & & & & & & & & on the destination host.& & &| & & & &VIR_MIGRATE_UNDEFINE_SOURCE If the migration is successful, undefine the& & &| & & & & & & & & & & & & & & & & & &domain on the source host.& & &| & & & &VIR_MIGRATE_PAUSED & &Leave the domain suspended on the remote side.& & &| & & & &VIR_MIGRATE_CHANGE_PROTECTION Protect against domain configuration& & &| & & & & & & & & & & & & & & & & & & &changes during the migration process (set& & &| & & & & & & & & & & & & & & & & & & &automatically when supported).& & &| & & & &VIR_MIGRATE_UNSAFE & &Force migration even if it is considered unsafe.& & &| & & && & &| & & &VIR_MIGRATE_TUNNELLED requires that VIR_MIGRATE_PEER2PEER be set.& & &| & & &Applications using the VIR_MIGRATE_PEER2PEER flag will probably& & &| & & &prefer to invoke virDomainMigrateToURI, avoiding the need to& & &| & & &open connection to the destination host themselves.& & &| & & && & &| & & &If a hypervisor supports renaming domains during migration,& & &| & & &then you may set the dname parameter to the new name (otherwise& & &| & & &it keeps the same name). &If this is not supported by the& & &| & & &hypervisor, dname must be None or else you will get an error.& & &| & & && & &| & & &If the VIR_MIGRATE_PEER2PEER flag is set, the uri parameter& & &| & & &must be a valid libvirt connection URI, by which the source& & &| & & &libvirt driver can connect to the destination libvirt. If& & &| & & &omitted, the dconn connection object will be queried for its& & &| & & &current URI.& & &| & & && & &| & & &If the VIR_MIGRATE_PEER2PEER flag is NOT set, the URI parameter& & &| & & &takes a hypervisor specific format. The hypervisor capabilities& & &| & & &XML includes details of the support URI schemes. If omitted& & &| & & &the dconn will be asked for a default URI.& & &| & & && & &| & & &In either case it is typically only necessary to specify a& & &| & & &URI if the destination host has multiple interfaces and a& & &| & & &specific interface is required to transmit migration data.& & &| & & && & &| & & &The maximum bandwidth (in Mbps) that will be used to do migration& & &| & & &can be specified with the bandwidth parameter. &If set to 0,& & &| & & &libvirt will choose a suitable default. &Some hypervisors do& & &| & & &not support this feature and will return an error if bandwidth& & &| & & &is not 0.& & &| & & && & &| & & &To see which features are supported by the current hypervisor,& & &| & & &see virConnectGetCapabilities, /capabilities/host/migration_features.& & &| & & && & &| & & &There are many limitations on migration imposed by the underlying& & &| & & &technology - for example it may not be possible to migrate between& & &| & & &different processors even with the same architecture, or between& & &| & & &different types of hypervisor.& & &| & & && & &| & & &If the hypervisor supports it, @dxml can be used to alter& & &| & & &host-specific portions of the domain XML that will be used on& & &| & & &the destination. &For example, it is possible to alter the& & &| & & &backing filename that is associated with a disk device, in order& & &| & & &to account for naming differences between source and destination& & &| & & &in accessing the underlying storage. &The migration will fail& & &| & & &if @dxml would cause any guest-visible changes. &Pass None& & &| & & &if no changes are needed to the XML between source and destination.& & &| & & &@dxml cannot be used to rename the domain during migration (use& & &| & & &@dname for that purpose). &Domain name in @dxml must match the& & &| & & &original domain name.& & &| && & &| &networkCreateXML(self, xmlDesc)& & &| & & &Create and start a new virtual network, based on an XML description& & &| & & &similar to the one returned by virNetworkGetXMLDesc()& & &| && & &| &networkDefineXML(self, xml)& & &| & & &Define a network, but does not create it& & &| && & &| &networkLookupByName(self, name)& & &| & & &Try to lookup a network on the given hypervisor based on its name.& & &| && & &| &networkLookupByUUID(self, uuid)& & &| & & &Try to lookup a network on the given hypervisor based on its UUID.& & &| && & &| &networkLookupByUUIDString(self, uuidstr)& & &| & & &Try to lookup a network on the given hypervisor based on its UUID.& & &| && & &| &newStream(self, flags)& & &| & & &Creates a new stream object which can be used to perform& & &| & & &streamed I/O with other public API function.& & &| & & && & &| & & &When no longer needed, a stream object must be released& & &| & & &with virStreamFree. If a data stream has been used,& & &| & & &then the application must call virStreamFinish or& & &| & & &virStreamAbort before free'ing to, in order to notify& & &| & & &the driver of termination.& & &| & & && & &| & & &If a non-blocking data stream is required passed& & &| & & &VIR_STREAM_NONBLOCK for flags, otherwise pass 0.& & &| && & &| &nodeDeviceCreateXML(self, xmlDesc, flags)& & &| & & &Create a new device on the VM host machine, for example, virtual& & &| & & &HBAs created using vport_create.& & &| && & &| &nodeDeviceLookupByName(self, name)& & &| & & &Lookup a node device by its name.& & &| && & &| &numOfDefinedDomains(self)& & &| & & &Provides the number of defined but inactive domains.& & &| && & &| &numOfDefinedInterfaces(self)& & &| & & &Provides the number of defined (inactive) interfaces on the physical host.& & &| && & &| &numOfDefinedNetworks(self)& & &| & & &Provides the number of inactive networks.& & &| && & &| &numOfDefinedStoragePools(self)& & &| & & &Provides the number of inactive storage pools& & &| && & &| &numOfDevices(self, cap, flags)& & &| & & &Provides the number of node devices.& & &| & & && & &| & & &If the optional 'cap' &argument is non-None, then the count& & &| & & &will be restricted to devices with the specified capability& & &| && & &| &numOfDomains(self)& & &| & & &Provides the number of active domains.& & &| && & &| &numOfInterfaces(self)& & &| & & &Provides the number of active interfaces on the physical host.& & &| && & &| &numOfNWFilters(self)& & &| & & &Provides the number of nwfilters.& & &| && & &| &numOfNetworks(self)& & &| & & &Provides the number of active networks.& & &| && & &| &numOfSecrets(self)& & &| & & &Fetch number of currently defined secrets.& & &| && & &| &numOfStoragePools(self)& & &| & & &Provides the number of active storage pools& & &| && & &| &nwfilterDefineXML(self, xmlDesc)& & &| & & &Define a new network filter, based on an XML description& & &| & & &similar to the one returned by virNWFilterGetXMLDesc()& & &| && & &| &nwfilterLookupByName(self, name)& & &| & & &Try to lookup a network filter on the given hypervisor based on its name.& & &| && & &| &nwfilterLookupByUUID(self, uuid)& & &| & & &Try to lookup a network filter on the given hypervisor based on its UUID.& & &| && & &| &nwfilterLookupByUUIDString(self, uuidstr)& & &| & & &Try to lookup an nwfilter on the given hypervisor based on its UUID.& & &| && & &| &restore(self, frm)& & &| & & &This method will restore a domain saved to disk by virDomainSave().& & &| & & && & &| & & &See virDomainRestoreFlags() for more control.& & &| && & &| &restoreFlags(self, frm, dxml, flags)& & &| & & &This method will restore a domain saved to disk by virDomainSave().& & &| & & && & &| & & &If the hypervisor supports it, @dxml can be used to alter& & &| & & &host-specific portions of the domain XML that will be used when& & &| & & &restoring an image. &For example, it is possible to alter the& & &| & & &backing filename that is associated with a disk device, in order to& & &| & & &prepare for file renaming done as part of backing up the disk& & &| & & &device while the domain is stopped.& & &| & & && & &| & & &If @flags includes VIR_DOMAIN_SAVE_BYPASS_CACHE, then libvirt will& & &| & & &attempt to bypass the file system cache while restoring the file, or& & &| & & &fail if it cannot do so
this can allow less& & &| & & &pressure on file system cache, but also risks slowing saves to NFS.& & &| & & && & &| & & &Normally, the saved state file will remember whether the domain was& & &| & & &running or paused, and restore defaults to the same state.& & &| & & &Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in& & &| & & &@flags will override the default read from the file. &These two& & &| & & &flags are mutually exclusive.& & &| && & &| &saveImageDefineXML(self, file, dxml, flags)& & &| & & &This updates the definition of a domain stored in a saved state& & &| & & &file. &@file must be a file created previously by virDomainSave()& & &| & & &or virDomainSaveFlags().& & &| & & && & &| & & &@dxml can be used to alter host-specific portions of the domain XML& & &| & & &that will be used when restoring an image. &For example, it is& & | & & &possible to alter the backing filename that is associated with a& & &| & & &disk device, to match renaming done as part of backing up the disk& & &| & & &device while the domain is stopped.& & &| & & && & &| & & &Normally, the saved state file will remember whether the domain was& & &| & & &running or paused, and restore defaults to the same state.& & &| & & &Specifying VIR_DOMAIN_SAVE_RUNNING or VIR_DOMAIN_SAVE_PAUSED in& & &| & & &@flags will override the default omitting both& & &| & & &leaves the file's default unchanged. &These two flags are mutually& & &| & & &exclusive.& & &| && & &| &saveImageGetXMLDesc(self, file, flags)& & &| & & &This method will extract the XML describing the domain at the time& & &| & & &a saved state file was created. &@file must be a file created& & &| & & &previously by virDomainSave() or virDomainSaveFlags().& & &| & & && & &| & & &No security-sensitive data will be included unless @flags contains& & &| & & &VIR_DOMAIN_XML_SECURE; this flag is rejected on read-only& & &| & & &connections. &For this API, @flags should not contain either& & &| & & &VIR_DOMAIN_XML_INACTIVE or VIR_DOMAIN_XML_UPDATE_CPU.& & &| && & &| &secretDefineXML(self, xml, flags)& & &| & & &If XML specifies a UUID, locates the specified secret and replaces all& & &| & & &attributes of the secret specified by UUID by attributes specified in xml& & &| & & &(any attributes not specified in xml are discarded).& & &| & & && & &| & & &Otherwise, creates a new secret with an automatically chosen UUID, and& & &| & & &initializes its attributes from xml.& & &| && & &| &secretLookupByUUID(self, uuid)& & &| & & &Try to lookup a secret on the given hypervisor based on its UUID.& & &| && & &| &secretLookupByUUIDString(self, uuidstr)& & &| & & &Try to lookup a secret on the given hypervisor based on its UUID.& & &| & & &Uses the printable string value to describe the UUID& & &| && & &| &secretLookupByUsage(self, usageType, usageID)& & &| & & &Try to lookup a secret on the given hypervisor based on its usage& & &| & & &The usageID is unique within the set of secrets sharing the& & &| & & &same usageType value.& & &| && & &| &setKeepAlive(self, interval, count)& & &| & & &Start sending keepalive messages after interval second of inactivity and& & &| & & &consider the connection to be broken when no response is received after& & &| & & &count keepalive messages sent in a row. &In other words, sending count + 1& & &| & & &keepalive message results in closing the connection. &When interval is &= 0,& & &| & & &no keepalive messages will be sent. &When count is 0, the connection will be& & &| & & &automatically closed after interval seconds of inactivity without sending& & &| & & &any keepalive messages.& & &| & & && & &| & & &Note: client has to implement and run event loop to be able to use keepalive& & &| & & &messages. &Failure to do so may result in connections being closed& & &| & & &unexpectedly.& & &| && & &| &storagePoolCreateXML(self, xmlDesc, flags)& & &| & & &Create a new storage based on its XML description. The& & &| & & &pool is not persistent, so its definition will disappear& & &| & & &when it is destroyed, or if the host is restarted& & &| && & &| &storagePoolDefineXML(self, xml, flags)& & &| & & &Define a new inactive storage pool based on its XML description. The& & &| & & &pool is persistent, until explicitly undefined.& & &| && & &| &storagePoolLookupByName(self, name)& & &| & & &Fetch a storage pool based on its unique name& & &| && & &| && & &| &storagePoolLookupByUUID(self, uuid)& & &| & & &Fetch a storage pool based on its globally unique id& & &| && & &| &storagePoolLookupByUUIDString(self, uuidstr)& & &| & & &Fetch a storage pool based on its globally unique id& & &| && & &| &storageVolLookupByKey(self, key)& & &| & & &Fetch a pointer to a storage volume based on its& & &| & & &globally unique key& & &| && & &| &storageVolLookupByPath(self, path)& & &| & & &Fetch a pointer to a storage volume based on its& & &| & & &locally (host) unique path& & &| && & &| &suspendForDuration(self, target, duration, flags)& & &| & & &Attempt to suspend the node (host machine) for the given duration of& & &| & & &time in the specified state (Suspend-to-RAM, Suspend-to-Disk or& & &| & & &Hybrid-Suspend). Schedule the node's Real-Time-Clock interrupt to& & &| & & &resume the node after the duration is complete.& & &| && & &| &virConnGetLastError(self)& & &| & & &Provide a pointer to the last error caught on that connection& & &| & & && & &| & & &This method is not protected against access from multiple& & &| & & &threads. In a multi-threaded application, always use the& & &| & & &global virGetLastError() API which is backed by thread& & &| & & &local storage.& & &| & & && & &| & & &If the connection object was discovered to be invalid by& & &| & & &an API call, then the error will be reported against the& & &| & & &global error object.& & &| & & && & &| & & &Since 0.6.0, all errors reported in the per-connection object& & &| & & &are also duplicated in the global error object. As such an& & &| & & &application can always use virGetLastError(). This method& & &| & & &remains for backwards compatibility.& & &| && & &| &virConnResetLastError(self)& & &| & & &The error object is kept in thread local storage, so separate& & &| & & &threads can safely access this concurrently.& & &| & & && & &| & & &Reset the last error caught on that connection& &&
阅读(1487)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'Libvirt Python接口',
blogAbstract:'Help on module libvirt:NAME& & libvirtFILE& & /usr/lib64/python2.6/site-packages/libvirt.pyDESCRIPTION& & # WARNING WARNING WARNING WARNING& & #& & # This file is automatically written by generator.py. Any changes& & # made here will be lost.& & #& & # To change the manually written methods edit libvirt-override.py& & # To',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:5,
publishTime:3,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}

我要回帖

更多关于 force什么意思 的文章

 

随机推荐