1Sys::Virt(3)          User Contributed Perl Documentation         Sys::Virt(3)
2
3
4

NAME

6       Sys::Virt - Represent and manage a libvirt hypervisor connection
7

SYNOPSIS

9         my $conn = Sys::Virt->new(uri => $uri);
10
11         my @domains = $conn->list_domains();
12
13         foreach my $dom (@domains) {
14           print "Domain ", $dom->get_id, " ", $dom->get_name, "\n";
15         }
16

DESCRIPTION

18       The Sys::Virt module provides a Perl XS binding to the libvirt virtual
19       machine management APIs. This allows machines running within arbitrary
20       virtualization containers to be managed with a consistent API.
21

ERROR HANDLING

23       Any operations in the Sys::Virt API which have failure scenarios will
24       result in an instance of the Sys::Virt::Error module being thrown. To
25       catch these errors, simply wrap the method in an eval block:
26
27         eval { my $conn = Sys::Virt->new(uri => $uri); };
28         if ($@) {
29           print STDERR "Unable to open connection to $addr" . $@->message . "\n";
30         }
31
32       For details of the information contained in the error objects, consult
33       the Sys::Virt::Error manual page.
34

METHODS

36       my $conn = Sys::Virt->new(uri => $uri, readonly => $ro, flags =>
37       $flags);
38           Attach to the virtualization host identified by "uri". The "uri"
39           parameter may be omitted, in which case the default connection made
40           will be to the local Xen hypervisor. Some example URIs include:
41
42           xen:///
43               Xen on the local machine
44
45           test:///default
46               Dummy "in memory" driver for test suites
47
48           qemu:///system
49               System-wide driver for QEMU / KVM virtualization
50
51           qemu:///session
52               Per-user driver for QEMU virtualization
53
54           qemu+tls://somehost/system
55               System-wide QEMU driver on "somehost" using TLS security
56
57           xen+tcp://somehost/
58               Xen driver on "somehost" using TCP / SASL security
59
60           For further details consult "http://libvirt.org/uri.html"
61
62           If the optional "readonly" parameter is supplied, then an
63           unprivileged connection to the hypervisor will be attempted. If it
64           is not supplied, then it defaults to making a fully privileged
65           connection to the hypervisor. If the calling application is not
66           running as root, it may be necessary to provide authentication
67           callbacks.
68
69           If the optional "auth" parameter is set to a non-zero value,
70           authentication will be enabled during connection, using the default
71           set of credential gathering callbacks. The default callbacks prompt
72           for credentials on the console, so are not suitable for graphical
73           applications. For such apps a custom implementation should be
74           supplied. The "credlist" parameter should be an array reference
75           listing the set of credential types that will be supported. The
76           credential constants in this module can be used as values in this
77           list. The "callback" parameter should be a subroutine reference
78           containing the code necessary to gather the credentials. When
79           invoked it will be supplied with a single parameter, an array
80           reference of requested credentials. The elements of the array are
81           hash references, with keys "type" giving the type of credential,
82           "prompt" giving a user descriptive user prompt, "challenge" giving
83           name of the credential required. The answer should be collected
84           from the user, and returned by setting the "result" key. This key
85           may already be set with a default result if applicable
86
87           As a simple example returning hardcoded credentials
88
89               my $uri  = "qemu+tcp://192.168.122.1/system";
90               my $username = "test";
91               my $password = "123456";
92
93               my $con = Sys::Virt->new(uri => $uri,
94                                        auth => 1,
95                                        credlist => [
96                                          Sys::Virt::CRED_AUTHNAME,
97                                          Sys::Virt::CRED_PASSPHRASE,
98                                        ],
99                                        callback =>
100                    sub {
101                          my $creds = shift;
102
103                          foreach my $cred (@{$creds}) {
104                             if ($cred->{type} == Sys::Virt::CRED_AUTHNAME) {
105                                 $cred->{result} = $username;
106                             }
107                             if ($cred->{type} == Sys::Virt::CRED_PASSPHRASE) {
108                                 $cred->{result} = $password;
109                             }
110                          }
111                          return 0;
112                    });
113
114           For backwards compatibility with earlier releases, the "address"
115           parameter is accepted as a synonym for the "uri" parameter. The use
116           of "uri" is recommended for all newly written code.
117
118       $conn->set_identity($identity, $flags=0)
119           Change the identity that is used for access control over the
120           connection. Normally the remote daemon will use the identity
121           associated with the UNIX domain socket that the app opens.  Only a
122           privileged client is usually able to override this.  The $identity
123           should be a hash reference whose keys are one of the IDENTITY
124           constants. The $flags parameter is currently unused, and defaults
125           to 0 if omitted.
126
127       my $st = $conn->new_stream($flags)
128           Create a new stream, with the given flags
129
130       my $dom = $conn->create_domain($xml, $flags);
131           Create a new domain based on the XML description passed into the
132           $xml parameter. The returned object is an instance of the
133           Sys::Virt::Domain class. This method is not available with
134           unprivileged connections to the hypervisor. The $flags parameter
135           accepts one of the DOMAIN CREATION constants documented in
136           Sys::Virt::Domain, and defaults to 0 if omitted.
137
138       my $dom = $conn->create_domain_with_files($xml, $fds, $flags);
139           Create a new domain based on the XML description passed into the
140           $xml parameter. The returned object is an instance of the
141           Sys::Virt::Domain class. This method is not available with
142           unprivileged connections to the hypervisor. The $fds parameter is
143           an array of UNIX file descriptors which will be passed to the init
144           process of the container. This is only supported with container
145           based virtualization. The $flags parameter accepts one of the
146           DOMAIN CREATION constants documented in Sys::Virt::Domain, and
147           defaults to 0 if omitted.
148
149       my $dom = $conn->define_domain($xml, $flags=0);
150           Defines, but does not start, a new domain based on the XML
151           description passed into the $xml parameter. The returned object is
152           an instance of the Sys::Virt::Domain class. This method is not
153           available with unprivileged connections to the hypervisor. The
154           defined domain can be later started by calling the "create" method
155           on the returned "Sys::Virt::Domain" object.
156
157       my $net = $conn->create_network($xml);
158           Create a new network based on the XML description passed into the
159           $xml parameter. The returned object is an instance of the
160           Sys::Virt::Network class. This method is not available with
161           unprivileged connections to the hypervisor.
162
163       my $net = $conn->define_network($xml);
164           Defines, but does not start, a new network based on the XML
165           description passed into the $xml parameter. The returned object is
166           an instance of the Sys::Virt::Network class. This method is not
167           available with unprivileged connections to the hypervisor. The
168           defined network can be later started by calling the "create" method
169           on the returned "Sys::Virt::Network" object.
170
171       my $nwfilter = $conn->define_nwfilter($xml);
172           Defines a new network filter based on the XML description passed
173           into the $xml parameter. The returned object is an instance of the
174           Sys::Virt::NWFilter class. This method is not available with
175           unprivileged connections to the hypervisor.
176
177       my $secret = $conn->define_secret($xml);
178           Defines a new secret based on the XML description passed into the
179           $xml parameter. The returned object is an instance of the
180           Sys::Virt::Secret class. This method is not available with
181           unprivileged connections to the hypervisor.
182
183       my $pool = $conn->create_storage_pool($xml);
184           Create a new storage pool based on the XML description passed into
185           the $xml parameter. The returned object is an instance of the
186           Sys::Virt::StoragePool class. This method is not available with
187           unprivileged connections to the hypervisor.
188
189       my $pool = $conn->define_storage_pool($xml);
190           Defines, but does not start, a new storage pol based on the XML
191           description passed into the $xml parameter. The returned object is
192           an instance of the Sys::Virt::StoragePool class. This method is not
193           available with unprivileged connections to the hypervisor. The
194           defined pool can be later started by calling the "create" method on
195           the returned "Sys::Virt::StoragePool" object.
196
197       my $pool = $conn->create_interface($xml);
198           Create a new interface based on the XML description passed into the
199           $xml parameter. The returned object is an instance of the
200           Sys::Virt::Interface class. This method is not available with
201           unprivileged connections to the hypervisor.
202
203       my $binding = $conn->create_nwfilter_binding($xml);
204           Create a new network filter binding based on the XML description
205           passed into the $xml parameter. The returned object is an instance
206           of the Sys::Virt::NWFilterBinding class.
207
208       my $iface = $conn->define_interface($xml);
209           Defines, but does not start, a new interface based on the XML
210           description passed into the $xml parameter. The returned object is
211           an instance of the Sys::Virt::Interface class. This method is not
212           available with unprivileged connections to the hypervisor. The
213           defined interface can be later started by calling the "create"
214           method on the returned "Sys::Virt::Interface" object.
215
216       my $dev = $conn->create_node_device($xml);
217           Create a new virtual node device based on the XML description
218           passed into the $xml parameter. The returned object is an instance
219           of the Sys::Virt::NodeDevice class. This method is not available
220           with unprivileged connections to the hypervisor.
221
222       my @doms = $conn->list_domains()
223           Return a list of all running domains currently known to the
224           hypervisor. The elements in the returned list are instances of the
225           Sys::Virt::Domain class. This method requires O(n) RPC calls, so
226           the "list_all_domains" method is recommended as a more efficient
227           alternative.
228
229       my $nids = $conn->num_of_domains()
230           Return the number of running domains known to the hypervisor. This
231           can be used as the "maxids" parameter to "list_domain_ids".
232
233       my @domIDs = $conn->list_domain_ids($maxids)
234           Return a list of all domain IDs currently known to the hypervisor.
235           The IDs can be used with the "get_domain_by_id" method.
236
237       my @doms = $conn->list_defined_domains()
238           Return a list of all domains defined, but not currently running, on
239           the hypervisor. The elements in the returned list are instances of
240           the Sys::Virt::Domain class. This method requires O(n) RPC calls,
241           so the "list_all_domains" method is recommended as a more efficient
242           alternative.
243
244       my $ndoms = $conn->num_of_defined_domains()
245           Return the number of running domains known to the hypervisor. This
246           can be used as the "maxnames" parameter to
247           "list_defined_domain_names".
248
249       my @names = $conn->list_defined_domain_names($maxnames)
250           Return a list of names of all domains defined, but not currently
251           running, on the hypervisor. The names can be used with the
252           "get_domain_by_name" method.
253
254       my @doms = $conn->list_all_domains($flags)
255           Return a list of all domains currently known to the hypervisor,
256           whether running or shutoff. The elements in the returned list are
257           instances of the Sys::Virt::Domain class. The $flags parameter can
258           be used to filter the list of returned domains.
259
260       my @nets = $conn->list_networks()
261           Return a list of all networks currently known to the hypervisor.
262           The elements in the returned list are instances of the
263           Sys::Virt::Network class.  This method requires O(n) RPC calls, so
264           the "list_all_networks" method is recommended as a more efficient
265           alternative.
266
267       my $nnets = $conn->num_of_networks()
268           Return the number of running networks known to the hypervisor. This
269           can be used as the "maxids" parameter to "list_network_ids".
270
271       my @netNames = $conn->list_network_names($maxnames)
272           Return a list of all network names currently known to the
273           hypervisor. The names can be used with the "get_network_by_name"
274           method.
275
276       my @nets = $conn->list_defined_networks()
277           Return a list of all networks defined, but not currently running,
278           on the hypervisor. The elements in the returned list are instances
279           of the Sys::Virt::Network class. This method requires O(n) RPC
280           calls, so the "list_all_networks" method is recommended as a more
281           efficient alternative.
282
283       my $nnets = $conn->num_of_defined_networks()
284           Return the number of running networks known to the host. This can
285           be used as the "maxnames" parameter to
286           "list_defined_network_names".
287
288       my @names = $conn->list_defined_network_names($maxnames)
289           Return a list of names of all networks defined, but not currently
290           running, on the host. The names can be used with the
291           "get_network_by_name" method.
292
293       my @nets = $conn->list_all_networks($flags)
294           Return a list of all networks currently known to the hypervisor,
295           whether running or shutoff. The elements in the returned list are
296           instances of the Sys::Virt::Network class. The $flags parameter can
297           be used to filter the list of returned networks.
298
299       my @pools = $conn->list_storage_pools()
300           Return a list of all storage pools currently known to the host. The
301           elements in the returned list are instances of the
302           Sys::Virt::StoragePool class.  This method requires O(n) RPC calls,
303           so the "list_all_storage_pools" method is recommended as a more
304           efficient alternative.
305
306       my $npools = $conn->num_of_storage_pools()
307           Return the number of running storage pools known to the hypervisor.
308           This can be used as the "maxids" parameter to
309           "list_storage_pool_names".
310
311       my @poolNames = $conn->list_storage_pool_names($maxnames)
312           Return a list of all storage pool names currently known to the
313           hypervisor. The IDs can be used with the "get_network_by_id"
314           method.
315
316       my @pools = $conn->list_defined_storage_pools()
317           Return a list of all storage pools defined, but not currently
318           running, on the host. The elements in the returned list are
319           instances of the Sys::Virt::StoragePool class. This method requires
320           O(n) RPC calls, so the "list_all_storage_pools" method is
321           recommended as a more efficient alternative.
322
323       my $npools = $conn->num_of_defined_storage_pools()
324           Return the number of running networks known to the host. This can
325           be used as the "maxnames" parameter to
326           "list_defined_storage_pool_names".
327
328       my @names = $conn->list_defined_storage_pool_names($maxnames)
329           Return a list of names of all storage pools defined, but not
330           currently running, on the host. The names can be used with the
331           "get_storage_pool_by_name" method.
332
333       my @pools = $conn->list_all_storage_pools($flags)
334           Return a list of all storage pools currently known to the
335           hypervisor, whether running or shutoff. The elements in the
336           returned list are instances of the Sys::Virt::StoragePool class.
337           The $flags parameter can be used to filter the list of returned
338           pools.
339
340       my @devs = $conn->list_node_devices($capability)
341           Return a list of all devices currently known to the host OS. The
342           elements in the returned list are instances of the
343           Sys::Virt::NodeDevice class.  The optional "capability" parameter
344           allows the list to be restricted to only devices with a particular
345           capability type. This method requires O(n) RPC calls, so the
346           "list_all_node_devices" method is recommended as a more efficient
347           alternative.
348
349       my $ndevs = $conn->num_of_node_devices($capability[, $flags])
350           Return the number of host devices known to the hypervisor. This can
351           be used as the "maxids" parameter to "list_node_device_names".  The
352           "capability" parameter allows the list to be restricted to only
353           devices with a particular capability type, and should be left as
354           "undef" if the full list is required. The optional <flags>
355           parameter is currently unused and defaults to 0 if omitted.
356
357       my @devNames = $conn->list_node_device_names($capability, $maxnames[,
358       $flags])
359           Return a list of all host device names currently known to the
360           hypervisor. The names can be used with the
361           "get_node_device_by_name" method.  The "capability" parameter
362           allows the list to be restricted to only devices with a particular
363           capability type, and should be left as "undef" if the full list is
364           required. The optional <flags> parameter is currently unused and
365           defaults to 0 if omitted.
366
367       my @devs = $conn->list_all_node_devices($flags)
368           Return a list of all node devices currently known to the
369           hypervisor. The elements in the returned list are instances of the
370           Sys::Virt::NodeDevice class. The $flags parameter can be used to
371           filter the list of returned devices.
372
373       my @ifaces = $conn->list_interfaces()
374           Return a list of all network interfaces currently known to the
375           hypervisor. The elements in the returned list are instances of the
376           Sys::Virt::Interface class.  This method requires O(n) RPC calls,
377           so the "list_all_interfaces" method is recommended as a more
378           efficient alternative.
379
380       my $nifaces = $conn->num_of_interfaces()
381           Return the number of running interfaces known to the hypervisor.
382           This can be used as the "maxnames" parameter to
383           "list_interface_names".
384
385       my @names = $conn->list_interface_names($maxnames)
386           Return a list of all interface names currently known to the
387           hypervisor. The names can be used with the "get_interface_by_name"
388           method.
389
390       my @ifaces = $conn->list_defined_interfaces()
391           Return a list of all network interfaces currently known to the
392           hypervisor. The elements in the returned list are instances of the
393           Sys::Virt::Interface class.  This method requires O(n) RPC calls,
394           so the "list_all_interfaces" method is recommended as a more
395           efficient alternative.
396
397       my $nifaces = $conn->num_of_defined_interfaces()
398           Return the number of inactive interfaces known to the hypervisor.
399           This can be used as the "maxnames" parameter to
400           "list_defined_interface_names".
401
402       my @names = $conn->list_defined_interface_names($maxnames)
403           Return a list of inactive interface names currently known to the
404           hypervisor. The names can be used with the "get_interface_by_name"
405           method.
406
407       my @ifaces = $conn->list_all_interfaces($flags)
408           Return a list of all interfaces currently known to the hypervisor,
409           whether running or shutoff. The elements in the returned list are
410           instances of the Sys::Virt::Interface class. The $flags parameter
411           can be used to filter the list of returned interfaces.
412
413       my @ifaces = $conn->list_secrets()
414           Return a list of all secrets currently known to the hypervisor. The
415           elements in the returned list are instances of the
416           Sys::Virt::Secret class.  This method requires O(n) RPC calls, so
417           the "list_all_secrets" method is recommended as a more efficient
418           alternative.
419
420       my $nuuids = $conn->num_of_secrets()
421           Return the number of secrets known to the hypervisor. This can be
422           used as the "maxuuids" parameter to "list_secrets".
423
424       my @uuids = $conn->list_secret_uuids($maxuuids)
425           Return a list of all secret uuids currently known to the
426           hypervisor. The uuids can be used with the "get_secret_by_uuid"
427           method.
428
429       my @secrets = $conn->list_all_secrets($flags)
430           Return a list of all secrets currently known to the hypervisor. The
431           elements in the returned list are instances of the
432           Sys::Virt::Network class.  The $flags parameter can be used to
433           filter the list of returned secrets.
434
435       my @nwfilters = $conn->list_nwfilters()
436           Return a list of all nwfilters currently known to the hypervisor.
437           The elements in the returned list are instances of the
438           Sys::Virt::NWFilter class.  This method requires O(n) RPC calls, so
439           the "list_all_nwfilters" method is recommended as a more efficient
440           alternative.
441
442       my $nnwfilters = $conn->num_of_nwfilters()
443           Return the number of running nwfilters known to the hypervisor.
444           This can be used as the "maxids" parameter to
445           "list_nwfilter_names".
446
447       my @filterNames = $conn->list_nwfilter_names($maxnames)
448           Return a list of all nwfilter names currently known to the
449           hypervisor. The names can be used with the "get_nwfilter_by_name"
450           method.
451
452       my @nwfilters = $conn->list_all_nwfilters($flags)
453           Return a list of all nwfilters currently known to the hypervisor.
454           The elements in the returned list are instances of the
455           Sys::Virt::NWFilter class.  The $flags parameter is currently
456           unused and defaults to zero.
457
458       my @bindings = $conn->list_all_nwfilter_bindings($flags)
459           Return a list of all nwfilter bindings currently known to the
460           hypervisor. The elements in the returned list are instances of the
461           Sys::Virt::NWFilterBinding class. The $flags parameter is currently
462           unused and defaults to zero.
463
464       $conn->define_save_image_xml($file, $dxml, $flags=0)
465           Update the XML associated with a virtual machine's save image. The
466           $file parameter is the fully qualified path to the save image XML,
467           while $dxml is the new XML document to write. The $flags parameter
468           is currently unused and defaults to zero.
469
470       $xml = $conn->get_save_image_xml_description($file, $flags=1)
471           Retrieve the current XML configuration associated with the virtual
472           machine's save image identified by $file. The $flags parameter
473           accepts the same constants as
474           "Sys::Virt::Domain::managed_save_get_xml_description".
475
476       my $dom = $conn->get_domain_by_name($name)
477           Return the domain with a name of $name. The returned object is an
478           instance of the Sys::Virt::Domain class.
479
480       my $dom = $conn->get_domain_by_id($id)
481           Return the domain with a local id of $id. The returned object is an
482           instance of the Sys::Virt::Domain class.
483
484       my $dom = $conn->get_domain_by_uuid($uuid)
485           Return the domain with a globally unique id of $uuid. The returned
486           object is an instance of the Sys::Virt::Domain class.
487
488       my $net = $conn->get_network_by_name($name)
489           Return the network with a name of $name. The returned object is an
490           instance of the Sys::Virt::Network class.
491
492       my $net = $conn->get_network_by_uuid($uuid)
493           Return the network with a globally unique id of $uuid. The returned
494           object is an instance of the Sys::Virt::Network class.
495
496       my $pool = $conn->get_storage_pool_by_name($name)
497           Return the storage pool with a name of $name. The returned object
498           is an instance of the Sys::Virt::StoragePool class.
499
500       my $pool = $conn->get_storage_pool_by_uuid($uuid)
501           Return the storage pool with a globally unique id of $uuid. The
502           returned object is an instance of the Sys::Virt::StoragePool class.
503
504       my $pool = $conn->get_storage_pool_by_volume($vol)
505           Return the storage pool with a storage volume $vol. The $vol
506           parameter must be an instance of the Sys::Virt::StorageVol class.
507           The returned object is an instance of the Sys::Virt::StoragePool
508           class.
509
510       my $pool = $conn->get_storage_pool_by_target_path($path)
511           Return the storage pool with a target path of $path. The returned
512           object is an instance of the Sys::Virt::StoragePool class.
513
514       my $vol = $conn->get_storage_volume_by_path($path)
515           Return the storage volume with a location of $path. The returned
516           object is an instance of the Sys::Virt::StorageVol class.
517
518       my $vol = $conn->get_storage_volume_by_key($key)
519           Return the storage volume with a globally unique id of $key. The
520           returned object is an instance of the Sys::Virt::StorageVol class.
521
522       my $dev = $conn->get_node_device_by_name($name)
523           Return the node device with a name of $name. The returned object is
524           an instance of the Sys::Virt::NodeDevice class.
525
526       my $dev = $conn->get_node_device_scsihost_by_wwn($wwnn, $wwpn,
527       $flags=0)
528           Return the node device which is a SCSI host identified by $wwnn and
529           $wwpn.  The $flags parameter is unused and defaults to zero.  The
530           returned object is an instance of the Sys::Virt::NodeDevice class.
531
532       my $iface = $conn->get_interface_by_name($name)
533           Return the interface with a name of $name. The returned object is
534           an instance of the Sys::Virt::Interface class.
535
536       my $iface = $conn->get_interface_by_mac($mac)
537           Return the interface with a MAC address of $mac. The returned
538           object is an instance of the Sys::Virt::Interface class.
539
540       my $sec = $conn->get_secret_by_uuid($uuid)
541           Return the secret with a globally unique id of $uuid. The returned
542           object is an instance of the Sys::Virt::Secret class.
543
544       my $sec = $conn->get_secret_by_usage($usageType, $usageID)
545           Return the secret with a usage type of $usageType, identified by
546           $usageID. The returned object is an instance of the
547           Sys::Virt::Secret class.
548
549       my $nwfilter = $conn->get_nwfilter_by_name($name)
550           Return the domain with a name of $name. The returned object is an
551           instance of the Sys::Virt::NWFilter class.
552
553       my $nwfilter = $conn->get_nwfilter_by_uuid($uuid)
554           Return the nwfilter with a globally unique id of $uuid. The
555           returned object is an instance of the Sys::Virt::NWFilter class.
556
557       my $binding = $conn->get_nwfilter_binding_by_port_dev($name)
558           Return the network filter binding for the port device $name. The
559           returned object is an instance of the Sys::Virt::NWFilterBinding
560           class.
561
562       my $xml = $conn->find_storage_pool_sources($type, $srcspec[, $flags])
563           Probe for available storage pool sources for the pool of type
564           $type.  The $srcspec parameter can be "undef", or a parameter to
565           refine the discovery process, for example a server hostname for NFS
566           discovery. The $flags parameter is optional, and if omitted
567           defaults to zero. The returned scalar is an XML document describing
568           the discovered storage pool sources.
569
570       my @stats = $conn->get_all_domain_stats($stats, \@doms=undef,
571       $flags=0);
572           Get a list of all statistics for domains known to the hypervisor.
573           The $stats parameter controls which data fields to return and
574           should be a combination of the DOMAIN STATS FIELD CONSTANTS.
575
576           The optional @doms parameter is a list of Sys::Virt::Domain objects
577           to return stats for. If this is undefined, then all domains will be
578           returned. The $flags method can be used to filter the list of
579           returned domains.
580
581           The return data for the method is a list, one element for each
582           domain.  The element will be a hash with two keys, "dom" pointing
583           to an instance of "Sys::Virt::Domain" and "data" pointing to
584           another hash reference containing the actual statistics.
585
586       $conn->interface_change_begin($flags)
587           Begin a transaction for changing the configuration of one or more
588           network interfaces
589
590       $conn->interface_change_commit($flags)
591           Complete a transaction for changing the configuration of one or
592           more network interfaces
593
594       $conn->interface_change_rollback($flags)
595           Abort a transaction for changing the configuration of one or more
596           network interfaces
597
598       $conn->restore_domain($savefile)
599           Recreate a domain from the saved state file given in the $savefile
600           parameter.
601
602       $conn->get_max_vcpus($domtype)
603           Return the maximum number of vcpus that can be configured for a
604           domain of type $domtype
605
606       my $hostname = $conn->get_hostname()
607           Return the name of the host with which this connection is
608           associated.
609
610       my $uri = $conn->get_uri()
611           Return the URI associated with the open connection. This may be
612           different from the URI used when initially connecting to libvirt,
613           when 'auto-probing' or drivers occurrs.
614
615       my $xml = $conn->get_sysinfo()
616           Return an XML documenting representing the host system information,
617           typically obtained from SMBIOS tables.
618
619       my $type = $conn->get_type()
620           Return the type of virtualization backend accessed by this
621           hypervisor object. Currently the only supported type is "Xen".
622
623       my $xml = $conn->domain_xml_from_native($format, $config);
624           Convert the native hypervisor configuration $config which is in
625           format <$format> into libvirrt domain XML. Valid values of $format
626           vary between hypervisor drivers.
627
628       my $config = $conn->domain_xml_to_native($format, $xml)
629           Convert the libvirt domain XML configuration $xml to a native
630           hypervisor configuration in format $format
631
632       my $ver = $conn->get_version()
633           Return the complete version number as a string encoded in the
634           formula "(major * 1000000) + (minor * 1000) + micro".
635
636       my $ver = $conn->get_major_version
637           Return the major version number of the libvirt library.
638
639       my $ver = $conn->get_minor_version
640           Return the minor version number of the libvirt library.
641
642       my $ver = $conn->get_micro_version
643           Return the micro version number of the libvirt library.
644
645       my $ver = $conn->get_library_version
646           Return the version number of the API associated with the active
647           connection. This differs from "get_version" in that if the
648           connection is to a remote libvirtd daemon, it will return the API
649           version of the remote libvirt, rather than the local client.
650
651       $conn->is_secure()
652           Returns a true value if the current connection is secure against
653           network interception. This implies either use of UNIX sockets, or
654           encryption with a TCP stream.
655
656       $conn->is_encrypted()
657           Returns a true value if the current connection data stream is
658           encrypted.
659
660       $conn->is_alive()
661           Returns a true value if the connection is alive, as determined by
662           keep-alive packets or other recent RPC traffic.
663
664       $conn->set_keep_alive($interval, $count)
665           Change the operation of the keep alive protocol to send $count
666           packets spaced $interval seconds apart before considering the
667           connection dead.
668
669       my $info = $con->get_node_info()
670           Returns a hash reference summarising the capabilities of the host
671           node. The elements of the hash are as follows:
672
673           memory
674               The amount of physical memory in the host
675
676           model
677               The model of the CPU, eg x86_64
678
679           cpus
680               The total number of logical CPUs.
681
682           mhz The peak MHZ of the CPU
683
684           nodes
685               The number of NUMA cells
686
687           sockets
688               The number of CPU sockets
689
690           cores
691               The number of cores per socket
692
693           threads
694               The number of threads per core
695
696           NB, more accurate information about the total number of CPUs and
697           those online can be obtained using the "get_node_cpu_map" method.
698
699       my ($totcpus, $onlinemap, $totonline) = $con->get_node_cpu_map();
700           Returns an array containing information about the CPUs available on
701           the host. The first element, "totcpus", specifies the total number
702           of CPUs available to the host regardles of their online stat. The
703           second element, "onlinemap", provides a bitmap detailing which CPUs
704           are currently online. The third element, "totonline", specifies the
705           total number of online CPUs. The values in the bitmap can be
706           extracted using the "unpack" method as follows:
707
708             my @onlinemap = split(//, unpack("b*", $onlinemap));
709
710       my $info = $con->get_node_cpu_stats($cpuNum=-1, $flags=0)
711           Returns a hash reference providing information about the host CPU
712           statistics. If <$cpuNum> is omitted, it defaults to
713           "Sys::Virt::NODE_CPU_STATS_ALL_CPUS" which causes it to return
714           cumulative information for all CPUs in the host. If $cpuNum is zero
715           or larger, it returns information just for the specified number.
716           The $flags parameter is currently unused and defaults to zero. The
717           fields in the returned hash reference are
718
719           kernel
720               The time spent in kernelspace
721
722           user
723               The time spent in userspace
724
725           idle
726               The idle time
727
728           iowait
729               The I/O wait time
730
731           utilization
732               The overall percentage utilization.
733
734       my $info = $con->get_node_memory_stats($cellNum=-1, $flags=0)
735           Returns a hash reference providing information about the host
736           memory statistics. If <$cellNum> is omitted, it defaults to
737           "Sys::Virt::NODE_MEMORY_STATS_ALL_CELLS" which causes it to return
738           cumulative information for all NUMA cells in the host. If $cellNum
739           is zero or larger, it returns information just for the specified
740           number. The $flags parameter is currently unused and defaults to
741           zero. The fields in the returned hash reference are
742
743           total
744               The total memory
745
746           free
747               The free memory
748
749           buffers
750               The memory consumed by buffers
751
752           cached
753               The memory consumed for cache
754
755       my $params = $conn->get_node_memory_parameters($flags=0)
756           Return a hash reference containing the set of memory tunable
757           parameters for the node. The keys in the hash are one of the
758           constants MEMORY PARAMETERS described later. The $flags parameter
759           is currently unused, and defaults to 0 if omitted.
760
761       $conn->set_node_memory_parameters($params, $flags=0)
762           Update the memory tunable parameters for the node. The $params
763           should be a hash reference whose keys are one of the MEMORY
764           PARAMETERS constants. The $flags parameter is currently unused, and
765           defaults to 0 if omitted.
766
767       $info = $conn->get_node_sev_info($flags=0)
768           Get the AMD SEV information for the host. $flags is currently
769           unused and defaults to 0 if omitted. The returned hash contains the
770           following keys:
771
772           Sys::Virt::SEV_CBITPOS
773               The CBit position
774
775           Sys::Virt::SEV_CERT_CHAIN
776               The certificate chain
777
778           Sys::Virt::SEV_PDH
779               Platform diffie-hellman key
780
781           Sys::Virt::SEV_REDUCED_PHYS_BITS
782               The number of physical address bits used by SEV
783
784       $conn->node_suspend_for_duration($target, $duration, $flags=0)
785           Suspend the the host, using mode $target which is one of the NODE
786           SUSPEND constants listed later. The $duration parameter controls
787           how long the node is suspended for before waking up.
788
789       $conn->domain_event_register($callback)
790           Register a callback to received notifications of domain state
791           change events. Only a single callback can be registered with each
792           connection instance. The callback will be invoked with four
793           parameters, an instance of "Sys::Virt" for the connection, an
794           instance of "Sys::Virt::Domain" for the domain changing state, and
795           a "event" and "detail" arguments, corresponding to the event
796           constants defined in the "Sys::Virt::Domain" module. Before
797           discarding the connection object, the callback must be
798           deregistered, otherwise the connection object memory will never be
799           released in garbage collection.
800
801       $conn->domain_event_deregister()
802           Unregister a callback, allowing the connection object to be garbage
803           collected.
804
805       $callback = $conn->domain_event_register_any($dom, $eventID, $callback)
806           Register a callback to received notifications of domain events.
807           The $dom parameter can be "undef" to request events on all known
808           domains, or a specific "Sys::Virt::Domain" object to filter events.
809           The $eventID parameter is one of the EVENT ID constants described
810           later in this document. The $callback is a subroutine reference
811           that will receive the events.
812
813           All callbacks receive a "Sys::Virt" connection as the first
814           parameter and a "Sys::Virt::Domain" object indicating the domain on
815           which the event occurred as the second parameter. Subsequent
816           parameters vary according to the event type
817
818           EVENT_ID_LIFECYCLE
819               Extra "event" and "detail" parameters defining the lifecycle
820               transition that occurred.
821
822           EVENT_ID_REBOOT
823               No extra parameters
824
825           EVENT_ID_RTC_CHANGE
826               The "utcoffset" gives the offset from UTC in seconds
827
828           EVENT_ID_WATCHDOG
829               The "action" defines the action that is taken as a result of
830               the watchdog triggering. One of the WATCHDOG constants
831               described later
832
833           EVENT_ID_IO_ERROR
834               The "srcPath" is the file on the host which had the error.  The
835               "devAlias" is the unique device alias from the guest
836               configuration associated with "srcPath". The "action" is the
837               action taken as a result of the error, one of the IO ERROR
838               constants described later
839
840           EVENT_ID_GRAPHICS
841               The "phase" is the stage of the connection, one of the GRAPHICS
842               PHASE constants described later. The "local" and "remote"
843               parameters follow with the details of the local and remote
844               network addresses. The "authScheme" describes how the user was
845               authenticated (if at all). Finally "identities" is an array ref
846               containing authenticated identities for the user, if any.
847
848           The return value is a unique callback ID that must be used when
849           unregistering the event.
850
851       $conn->domain_event_deregister_any($callbackID)
852           Unregister a callback, associated with the $callbackID previously
853           obtained from "domain_event_register_any".
854
855       $callback = $conn->network_event_register_any($net, $eventID,
856       $callback)
857           Register a callback to received notifications of network events.
858           The $net parameter can be "undef" to request events on all known
859           networks, or a specific "Sys::Virt::Network" object to filter
860           events. The $eventID parameter is one of the EVENT ID constants
861           described later in this document. The $callback is a subroutine
862           reference that will receive the events.
863
864           All callbacks receive a "Sys::Virt" connection as the first
865           parameter and a "Sys::Virt::Network" object indicating the network
866           on which the event occurred as the second parameter. Subsequent
867           parameters vary according to the event type
868
869           EVENT_ID_LIFECYCLE
870               Extra "event" and "detail" parameters defining the lifecycle
871               transition that occurred.
872
873           The return value is a unique callback ID that must be used when
874           unregistering the event.
875
876       $conn->network_event_deregister_any($callbackID)
877           Unregister a callback, associated with the $callbackID previously
878           obtained from "network_event_register_any".
879
880       $callback = $conn->storage_pool_event_register_any($pool, $eventID,
881       $callback)
882           Register a callback to received notifications of storage pool
883           events.  The $pool parameter can be "undef" to request events on
884           all known storage pools, or a specific "Sys::Virt::StoragePool"
885           object to filter events. The $eventID parameter is one of the EVENT
886           ID constants described later in this document. The $callback is a
887           subroutine reference that will receive the events.
888
889           All callbacks receive a "Sys::Virt" connection as the first
890           parameter and a "Sys::Virt::StoragePool" object indicating the
891           storage pool on which the event occurred as the second parameter.
892           Subsequent parameters vary according to the event type
893
894           EVENT_ID_LIFECYCLE
895               Extra "event" and "detail" parameters defining the lifecycle
896               transition that occurred.
897
898           EVENT_ID_REFRESH
899               No extra parameters.
900
901           The return value is a unique callback ID that must be used when
902           unregistering the event.
903
904       $conn->storage_pool_event_deregister_any($callbackID)
905           Unregister a callback, associated with the $callbackID previously
906           obtained from "storage_pool_event_register_any".
907
908       $callback = $conn->node_device_event_register_any($dev, $eventID,
909       $callback)
910           Register a callback to received notifications of node device
911           events.  The $dev parameter can be "undef" to request events on all
912           known node devices, or a specific "Sys::Virt::NodeDevice" object to
913           filter events. The $eventID parameter is one of the EVENT ID
914           constants described later in this document. The $callback is a
915           subroutine reference that will receive the events.
916
917           All callbacks receive a "Sys::Virt" connection as the first
918           parameter and a "Sys::Virt::NodeDevice" object indicating the node
919           device on which the event occurred as the second parameter.
920           Subsequent parameters vary according to the event type
921
922           EVENT_ID_LIFECYCLE
923               Extra "event" and "detail" parameters defining the lifecycle
924               transition that occurred.
925
926           The return value is a unique callback ID that must be used when
927           unregistering the event.
928
929       $conn->node_device_event_deregister_any($callbackID)
930           Unregister a callback, associated with the $callbackID previously
931           obtained from "node_device_event_register_any".
932
933       $callback = $conn->secret_event_register_any($secret, $eventID,
934       $callback)
935           Register a callback to received notifications of secret events.
936           The $secret parameter can be "undef" to request events on all known
937           secrets, or a specific "Sys::Virt::Secret" object to filter events.
938           The $eventID parameter is one of the EVENT ID constants described
939           later in this document. The $callback is a subroutine reference
940           that will receive the events.
941
942           All callbacks receive a "Sys::Virt" connection as the first
943           parameter and a "Sys::Virt::Secret" object indicating the secret on
944           which the event occurred as the second parameter. Subsequent
945           parameters vary according to the event type
946
947           EVENT_ID_LIFECYCLE
948               Extra "event" and "detail" parameters defining the lifecycle
949               transition that occurred.
950
951           EVENT_ID_VALUE_CHANGED
952               No extra parameters.
953
954           The return value is a unique callback ID that must be used when
955           unregistering the event.
956
957       $conn->secret_event_deregister_any($callbackID)
958           Unregister a callback, associated with the $callbackID previously
959           obtained from "secret_event_register_any".
960
961       $conn->register_close_callback($coderef);
962           Register a callback to be invoked when the connection is closed.
963           The callback will be invoked with two parameters, the $conn it was
964           registered against, and the reason for the close event.  The reason
965           value will be one of the "CLOSE REASON CONSTANTS" listed later in
966           this document.
967
968       $conn->unregister_close_callback();
969           Remove the previously registered close callback.
970
971       my $xml = $con->baseline_cpu(\@xml, $flags=0)
972           Given an array ref whose elements are XML documents describing host
973           CPUs, compute the baseline CPU model that is operable across all
974           hosts. The XML for the baseline CPU model is returned. The optional
975           $flags parameter can take one of
976
977           Sys::Virt::BASELINE_CPU_EXPAND_FEATURES
978               Expand the CPU definition to list all feature flags, even those
979               implied by the model name.
980
981           Sys::Virt::BASELINE_CPU_MIGRATABLE
982               Only include features which can be live migrated.
983
984       my $xml = $con->baseline_hypervisor_cpu($emulator, $arch, $machine,
985       $virttype, \@xml, $flags=0)
986           Given an array ref whose elements are XML documents describing host
987           CPUs, compute the baseline CPU model that is operable across all
988           hosts. The XML for the baseline CPU model is returned. Either
989           $emulator or $arch must be a valid string referring to an emulator
990           binary or an architecture name respectively. The $machine parameter
991           is an optional name of a guest machine, and $virttype is an
992           optional name of the virtualization type. The optional $flags
993           parameter accepts the same values as "baseline_cpu".
994
995       @names = $con->get_cpu_model_names($arch, $flags=0)
996           Get a list of valid CPU models names for the architecture given by
997           $arch. The $arch value should be one of the architectures listed in
998           the capabilities XML document.  The $flags parameter is currently
999           unused and defaults to 0.
1000
1001       my $info = $con->get_node_security_model()
1002           Returns a hash reference summarising the security model of the host
1003           node. There are two keys in the hash, "model" specifying the name
1004           of the security model (eg 'selinux') and "doi" specifying the
1005           'domain of interpretation' for security labels.
1006
1007       my $xml = $con->get_capabilities();
1008           Returns an XML document describing the hypervisor capabilities
1009
1010       my $xml = $con->get_domain_capabilities($emulator, $arch, $machine,
1011       $virttype, flags=0);
1012           Returns an XML document describing the capabilities of the
1013           requested guest configuration. Either $emulator or $arch must be a
1014           valid string referring to an emulator binary or an architecture
1015           name respectively. The $machine parameter is an optional name of a
1016           guest machine, and $virttype is an optional name of the
1017           virtualization type. $flags is unused and defaults to zero.
1018
1019       my $xml = $con->get_storage_pool_capabilities($flags=0);
1020           Returns an XML document describing the storage pool driver
1021           capabilities (e.g. which storage pool types are supported and so
1022           on). $flags is currently unused and defaults to zero.
1023
1024       my $result = $con->compare_cpu($xml, $flags=0);
1025           Checks whether the CPU definition in $xml is compatible with the
1026           current hypervisor connection. This can be used to determine
1027           whether it is safe to migrate a guest to this host. The returned
1028           result is one of the constants listed later The optional $flags
1029           parameter can take one of the following constants
1030
1031           Sys::Virt::COMPARE_CPU_FAIL_INCOMPATIBLE
1032               Raise a fatal error if the CPUs are not compatible, instead of
1033               just returning a special error code.
1034
1035       my $result = $con->compare_hypervisor_cpu($emulator, $arch, $machine,
1036       $virttype, $xml, $flags=0);
1037           Checks whether the CPU definition in $xml is compatible with the
1038           current hypervisor connection. This can be used to determine
1039           whether it is safe to migrate a guest to this host. Either
1040           $emulator or $arch must be a valid string referring to an emulator
1041           binary or an architecture name respectively. The $machine parameter
1042           is an optional name of a guest machine, and $virttype is an
1043           optional name of the virtualization type. The returned result is
1044           one of the constants listed later The optional $flags parameter can
1045           take the same values as the "compare_cpu" method.
1046
1047       $mem = $con->get_node_free_memory();
1048           Returns the current free memory on the host
1049
1050       @mem = $con->get_node_cells_free_memory($start, $end);
1051           Returns the free memory on each NUMA cell between $start and $end.
1052
1053       @pages = $con->get_node_free_pages(\@pagesizes, $start, $end);
1054           Returns information about the number of pages free on each NUMA
1055           cell between $start and $end inclusive. The @pagesizes parameter
1056           should be an arrayref specifying which pages sizes information
1057           should be returned for. Information about supported page sizes is
1058           available in the capabilities XML. The returned array has an
1059           element for each NUMA cell requested. The elements are hash
1060           references with two keys, 'cell' specifies the NUMA cell number and
1061           'pages' specifies the free page information for that cell. The
1062           'pages' value is another hash reference where the keys are the page
1063           sizes and the values are the free count for that size.
1064
1065       $con->node_alloc_pages(\@pages, $start, $end, $flags=0)
1066           Allocate further huge pages for the reserved dev. The <\@pages>
1067           parameter is an array reference with one entry per page size to
1068           allocate for. Each entry is a further array reference where the
1069           first element is the page size and the second element is the page
1070           count. The same number of pages will be allocated on each NUMA node
1071           in the range $start to $end inclusive. The $flags parameter accepts
1072           two contants
1073
1074           Sys::Virt::NODE_ALLOC_PAGES_ADD
1075               The requested number of pages will be added to the existing
1076               huge page reservation.
1077
1078           Sys::Virt::NODE_ALLOC_PAGES_SET
1079               The huge page reservation will be set to exactly the requested
1080               number
1081

CONSTANTS

1083       The following sets of constants are useful when dealing with APIs in
1084       this package
1085
1086   CONNECTION
1087       When opening a connection the following constants can be used:
1088
1089       Sys::Virt::CONNECT_RO
1090           Request a read-only connection
1091
1092       Sys::Virt::CONNECT_NO_ALIASES
1093           Prevent the resolution of URI aliases
1094
1095   CREDENTIAL TYPES
1096       When providing authentication callbacks, the following constants
1097       indicate the type of credential being requested
1098
1099       Sys::Virt::CRED_AUTHNAME
1100           Identity to act as
1101
1102       Sys::Virt::CRED_USERNAME
1103           Identity to authorize as
1104
1105       Sys::Virt::CRED_CNONCE
1106           Client supplies a nonce
1107
1108       Sys::Virt::CRED_REALM
1109           Authentication realm
1110
1111       Sys::Virt::CRED_ECHOPROMPT
1112           Challenge response non-secret
1113
1114       Sys::Virt::CRED_NOECHOPROMPT
1115           Challenge response secret
1116
1117       Sys::Virt::CRED_PASSPHRASE
1118           Passphrase secret
1119
1120       Sys::Virt::CRED_LANGUAGE
1121           RFC 1766 language code
1122
1123       Sys::Virt::CRED_EXTERNAL
1124           Externally provided credential
1125
1126   IDENTITY CONSTANTS
1127       The following constants are useful to change the connection identity
1128
1129       Sys::Virt::IDENTITY_USER_NAME
1130           The process user name
1131
1132       Sys::Virt::IDENTITY_UNIX_USER_ID
1133           The process UNIX user ID
1134
1135       Sys::Virt::IDENTITY_GROUP_NAME
1136           The process group name
1137
1138       Sys::Virt::IDENTITY_UNIX_GROUP_ID
1139           The process UNIX group ID
1140
1141       Sys::Virt::IDENTITY_PROCESS_ID
1142           The process ID.
1143
1144       Sys::Virt::IDENTITY_PROCESS_TIME
1145           The process start time.
1146
1147       Sys::Virt::IDENTITY_SASL_USER_NAME
1148           The SASL authenticated user name
1149
1150       Sys::Virt::IDENTITY_X509_DISTINGUISHED_NAME
1151           The X509 certificate distinguished name for the TLS connection
1152
1153       Sys::Virt::IDENTITY_SELINUX_CONTEXT
1154           The SELinux process context
1155
1156   CPU COMPARISON CONSTANTS
1157       Sys::Virt::CPU_COMPARE_INCOMPATIBLE
1158           This host is missing one or more CPU features in the CPU
1159           description
1160
1161       Sys::Virt::CPU_COMPARE_IDENTICAL
1162           The host has an identical CPU description
1163
1164       Sys::Virt::CPU_COMPARE_SUPERSET
1165           The host offers a superset of the CPU descriptoon
1166
1167   NODE SUSPEND CONSTANTS
1168       Sys::Virt::NODE_SUSPEND_TARGET_MEM
1169           Suspends to memory (equivalent of S3 on x86 architectures)
1170
1171       Sys::Virt::NODE_SUSPEND_TARGET_DISK
1172           Suspends to disk (equivalent of S5 on x86 architectures)
1173
1174       Sys::Virt::NODE_SUSPEND_TARGET_HYBRID
1175           Suspends to memory and disk (equivalent of S3+S5 on x86
1176           architectures)
1177
1178   NODE VCPU CONSTANTS
1179       Sys::Virt::NODE_CPU_STATS_ALL_CPUS
1180           Request statistics for all CPUs
1181
1182   NODE MEMORY CONSTANTS
1183       Sys::Virt::NODE_MEMORY_STATS_ALL_CELLS
1184           Request statistics for all memory cells
1185
1186   MEMORY PARAMETERS
1187       The following constants are used to name memory parameters of the node
1188
1189       Sys::Virt::NODE_MEMORY_SHARED_FULL_SCANS
1190           How many times all mergeable areas have been scanned.
1191
1192       Sys::Virt::NODE_MEMORY_SHARED_PAGES_SHARED
1193           How many the shared memory pages are being used.
1194
1195       Sys::Virt::NODE_MEMORY_SHARED_PAGES_SHARING
1196           How many sites are sharing the pages
1197
1198       Sys::Virt::NODE_MEMORY_SHARED_PAGES_TO_SCAN
1199           How many present pages to scan before the shared memory service
1200           goes to sleep
1201
1202       Sys::Virt::NODE_MEMORY_SHARED_PAGES_UNSHARED
1203           How many pages unique but repeatedly checked for merging.
1204
1205       Sys::Virt::NODE_MEMORY_SHARED_PAGES_VOLATILE
1206           How many pages changing too fast to be placed in a tree.
1207
1208       Sys::Virt::NODE_MEMORY_SHARED_SLEEP_MILLISECS
1209           How many milliseconds the shared memory service should sleep before
1210           next scan.
1211
1212       Sys::Virt::NODE_MEMORY_SHARED_MERGE_ACROSS_NODES
1213           Whether pages can be merged across NUMA nodes
1214
1215   CLOSE REASON CONSTANTS
1216       The following constants related to the connection close callback,
1217       describe the reason for the closing of the connection.
1218
1219       Sys::Virt::CLOSE_REASON_CLIENT
1220           The client application requested the connection be closed
1221
1222       Sys::Virt::CLOSE_REASON_EOF
1223           End-of-file was encountered reading data from the connection
1224
1225       Sys::Virt::CLOSE_REASON_ERROR
1226           An I/O error was encountered reading/writing data from/to the
1227           connection
1228
1229       Sys::Virt::CLOSE_REASON_KEEPALIVE
1230           The connection keepalive timer triggered due to lack of response
1231           from the server
1232
1233   CPU STATS CONSTANTS
1234       The following constants provide the names of known CPU stats fields
1235
1236       Sys::Virt::NODE_CPU_STATS_IDLE
1237           Time spent idle
1238
1239       Sys::Virt::NODE_CPU_STATS_IOWAIT
1240           Time spent waiting for I/O to complete
1241
1242       Sys::Virt::NODE_CPU_STATS_KERNEL
1243           Time spent executing kernel code
1244
1245       Sys::Virt::NODE_CPU_STATS_USER
1246           Time spent executing user code
1247
1248       Sys::Virt::NODE_CPU_STATS_INTR
1249           Time spent processing interrupts
1250
1251       Sys::Virt::NODE_CPU_STATS_UTILIZATION
1252           Percentage utilization of the CPU.
1253
1254   MEMORY STAS CONSTANTS
1255       The following constants provide the names of known memory stats fields
1256
1257       Sys::Virt::NODE_MEMORY_STATS_BUFFERS
1258           The amount of memory consumed by I/O buffers
1259
1260       Sys::Virt::NODE_MEMORY_STATS_CACHED
1261           The amount of memory consumed by disk cache
1262
1263       Sys::Virt::NODE_MEMORY_STATS_FREE
1264           The amount of free memory
1265
1266       Sys::Virt::NODE_MEMORY_STATS_TOTAL
1267           The total amount of memory
1268
1269   IP address constants
1270       The following constants are used to interpret IP address types
1271
1272       Sys::Virt::IP_ADDR_TYPE_IPV4
1273           An IPv4 address type
1274
1275       Sys::Virt::IP_ADDR_TYPE_IPV6
1276           An IPv6 address type
1277

BUGS

1279       Hopefully none, but the XS code needs to be audited to ensure it is not
1280       leaking memory.
1281

AUTHORS

1283       Daniel P. Berrange <berrange@redhat.com>
1284
1286       Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P.
1287       Berrange
1288

LICENSE

1290       This program is free software; you can redistribute it and/or modify it
1291       under the terms of either the GNU General Public License as published
1292       by the Free Software Foundation (either version 2 of the License, or at
1293       your option any later version), or, the Artistic License, as specified
1294       in the Perl README file.
1295

SEE ALSO

1297       Sys::Virt::Domain, Sys::Virt::Network, Sys::Virt::StoragePool,
1298       Sys::Virt::StorageVol, Sys::Virt::Error, "http://libvirt.org"
1299
1300
1301
1302perl v5.32.0                      2020-07-28                      Sys::Virt(3)
Impressum