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

NAME

6       Sys::Virt::Domain - Represent & manage a libvirt guest domain
7

DESCRIPTION

9       The "Sys::Virt::Domain" module represents a guest domain managed by the
10       virtual machine monitor.
11

METHODS

13       my $id = $dom->get_id()
14           Returns an integer with a locally unique identifier for the domain.
15
16       my $uuid = $dom->get_uuid()
17           Returns a 16 byte long string containing the raw globally unique
18           identifier (UUID) for the domain.
19
20       my $uuid = $dom->get_uuid_string()
21           Returns a printable string representation of the raw UUID, in the
22           format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
23
24       my $name = $dom->get_name()
25           Returns a string with a locally unique name of the domain
26
27       my $hostname = $dom->get_hostname($flags=0)
28           Returns a string representing the hostname of the guest.  $flags
29           can be zero or more of
30
31           Sys::Virt::Domain::GET_HOSTNAME_AGENT
32               Report the guest agent hostname
33
34           Sys::Virt::Domain::GET_HOSTNAME_LEASE
35               Report the DHCP lease hostname
36
37       my $str = $dom->get_metadata($type, $uri, $flags =0)
38           Returns the metadata element of type $type associated with the
39           domain. If $type is "Sys::Virt::Domain::METADATA_ELEMENT" then the
40           $uri parameter specifies the XML namespace to retrieve, otherwise
41           $uri should be "undef". The optional $flags parameter defaults to
42           zero.
43
44       $dom->set_metadata($type, $val, $key, $uri, $flags=0)
45           Sets the metadata element of type $type to hold the value $val. If
46           $type is  "Sys::Virt::Domain::METADATA_ELEMENT" then the $key and
47           $uri elements specify an XML namespace to use, otherwise they
48           should both be "undef". The optional $flags parameter defaults to
49           zero.
50
51       $dom->is_active()
52           Returns a true value if the domain is currently running
53
54       $dom->is_persistent()
55           Returns a true value if the domain has a persistent configuration
56           file defined
57
58       $dom->is_updated()
59           Returns a true value if the domain is running and has a persistent
60           configuration file defined that is out of date compared to the
61           current live config.
62
63       my $xml = $dom->get_xml_description($flags=0)
64           Returns an XML document containing a complete description of the
65           domain's configuration. The optional $flags parameter controls
66           generation of the XML document, defaulting to 0 if omitted. It can
67           be one or more of the XML DUMP constants listed later in this
68           document.
69
70       my $type = $dom->get_os_type()
71           Returns a string containing the name of the OS type running within
72           the domain.
73
74       $dom->create($flags)
75           Start a domain whose configuration was previously defined using the
76           "define_domain" method in Sys::Virt. The $flags parameter accepts
77           one of the DOMAIN CREATION constants documented later, and defaults
78           to 0 if omitted.
79
80       $dom->create_with_files($fds, $flags)
81           Start a domain whose configuration was previously defined using the
82           "define_domain" method in Sys::Virt. The $fds parameter is an array
83           of UNIX file descriptors which will be passed to the init process
84           of the container. This is only supported with container based
85           virtualization.The $flags parameter accepts one of the DOMAIN
86           CREATION constants documented later, and defaults to 0 if omitted.
87
88       $dom->undefine()
89           Remove the configuration associated with a domain previously
90           defined with the "define_domain" method in Sys::Virt. If the domain
91           is running, you probably want to use the "shutdown" or "destroy"
92           methods instead.
93
94       $dom->suspend()
95           Temporarily stop execution of the domain, allowing later
96           continuation by calling the "resume" method.
97
98       $dom->resume()
99           Resume execution of a domain previously halted with the "suspend"
100           method.
101
102       $dom->pm_wakeup()
103           Wakeup the guest from power management suspend state
104
105       $dom->pm_suspend_for_duration($target, $duration, $flags=0)
106           Tells the guest OS to enter the power management suspend state
107           identified by $target. The $target parameter should be one of the
108           NODE SUSPEND CONTANTS listed in "Sys::Virt". The $duration
109           specifies when the guest should automatically wakeup. The $flags
110           parameter is optional and defaults to zero.
111
112       $dom->save($filename)
113           Take a snapshot of the domain's state and save the information to
114           the file named in the $filename parameter. The domain can later be
115           restored from this file with the "restore_domain" method on the
116           Sys::Virt object.
117
118       $dom->managed_save($flags=0)
119           Take a snapshot of the domain's state and save the information to a
120           managed save location. The domain will be automatically restored
121           with this state when it is next started. The $flags parameter is
122           unused and defaults to zero.
123
124       $bool = $dom->has_managed_save_image($flags=0)
125           Return a non-zero value if the domain has a managed save image that
126           will be used at next start. The $flags parameter is unused and
127           defaults to zero.
128
129       $dom->managed_save_remove($flags=0)
130           Remove the current managed save image, causing the guest to perform
131           a full boot next time it is started. The $flags parameter is unused
132           and defaults to zero.
133
134       $dom->managed_save_define_xml($xml, $flags=0)
135           Update the XML of the managed save image to $xml. The $flags
136           parameter is unused and defaults to zero.
137
138       $xml = $dom->managed_save_get_xml_description($flags=0)
139           Get the XML in the managed save image. The $flags parameter accepts
140           the following constants
141
142           Sys::Virt::Domain::SAVE_IMAGE_XML_SECURE
143               Include security sensitive information in the XML dump, such as
144               passwords.
145
146       $dom->core_dump($filename[, $flags])
147           Trigger a core dump of the guest virtual machine, saving its memory
148           image to $filename so it can be analysed by tools such as "crash".
149           The optional $flags flags parameter is currently unused and if
150           omitted will default to 0.
151
152       $dom->core_dump_format($filename, $format, [, $flags])
153           Trigger a core dump of the guest virtual machine, saving its memory
154           image to $filename so it can be analysed by tools such as "crash".
155           The $format parameter is one of the core dump format constants.
156           The optional $flags flags parameter is currently unused and if
157           omitted will default to 0.
158
159           Sys::Virt::Domain::CORE_DUMP_FORMAT_RAW
160               The raw ELF format
161
162           Sys::Virt::Domain::CORE_DUMP_FORMAT_KDUMP_ZLIB
163               The zlib compressed ELF format
164
165           Sys::Virt::Domain::CORE_DUMP_FORMAT_KDUMP_SNAPPY
166               The snappy compressed ELF format
167
168           Sys::Virt::Domain::CORE_DUMP_FORMAT_KDUMP_LZO
169               The lzo compressed ELF format
170
171           Sys::Virt::Domain::CORE_DUMP_FORMAT_WIN_DMP
172               The Windows dump format
173
174       $dom->destroy()
175           Immediately poweroff the machine. This is equivalent to removing
176           the power plug. The guest OS is given no time to cleanup / save
177           state.  For a clean poweroff sequence, use the "shutdown" method
178           instead.
179
180       my $info = $dom->get_info()
181           Returns a hash reference summarising the execution state of the
182           domain. The elements of the hash are as follows:
183
184           maxMem
185               The maximum memory allowed for this domain, in kilobytes
186
187           memory
188               The current memory allocated to the domain in kilobytes
189
190           cpuTime
191               The amount of CPU time used by the domain
192
193           nrVirtCpu
194               The current number of virtual CPUs enabled in the domain
195
196           state
197               The execution state of the machine, which will be one of the
198               constants &Sys::Virt::Domain::STATE_*.
199
200       my ($state, $reason) = $dom->get_state()
201           Returns an array whose values specify the current state of the
202           guest, and the reason for it being in that state.  The $state
203           values are the same as for the "get_info" API, and the $reason
204           values come from:
205
206           Sys::Virt::Domain::STATE_CRASHED_UNKNOWN
207               It is not known why the domain has crashed
208
209           Sys::Virt::Domain::STATE_CRASHED_PANICKED
210               The domain has crashed due to a kernel panic
211
212           Sys::Virt::Domain::STATE_NOSTATE_UNKNOWN
213               It is not known why the domain has no state
214
215           Sys::Virt::Domain::STATE_PAUSED_DUMP
216               The guest is paused due to a core dump operation
217
218           Sys::Virt::Domain::STATE_PAUSED_FROM_SNAPSHOT
219               The guest is paused due to a snapshot
220
221           Sys::Virt::Domain::STATE_PAUSED_IOERROR
222               The guest is paused due to an I/O error
223
224           Sys::Virt::Domain::STATE_PAUSED_MIGRATION
225               The guest is paused due to migration
226
227           Sys::Virt::Domain::STATE_PAUSED_SAVE
228               The guest is paused due to a save operation
229
230           Sys::Virt::Domain::STATE_PAUSED_UNKNOWN
231               It is not known why the domain has paused
232
233           Sys::Virt::Domain::STATE_PAUSED_USER
234               The guest is paused at admin request
235
236           Sys::Virt::Domain::STATE_PAUSED_WATCHDOG
237               The guest is paused due to the watchdog
238
239           Sys::Virt::Domain::STATE_PAUSED_SHUTTING_DOWN
240               The guest is paused while domain shutdown takes place
241
242           Sys::Virt::Domain::STATE_PAUSED_SNAPSHOT
243               The guest is paused while a snapshot takes place
244
245           Sys::Virt::Domain::STATE_PAUSED_CRASHED
246               The guest is paused due to a kernel panic
247
248           Sys::Virt::Domain::STATE_PAUSED_STARTING_UP
249               The guest is paused as it is being started up.
250
251           Sys::Virt::Domain::STATE_PAUSED_POSTCOPY
252               The guest is paused as post-copy migration is taking place
253
254           Sys::Virt::Domain::STATE_PAUSED_POSTCOPY_FAILED
255               The guest is paused as post-copy migration failed
256
257           Sys::Virt::Domain::STATE_RUNNING_BOOTED
258               The guest is running after being booted
259
260           Sys::Virt::Domain::STATE_RUNNING_FROM_SNAPSHOT
261               The guest is running after restore from snapshot
262
263           Sys::Virt::Domain::STATE_RUNNING_MIGRATED
264               The guest is running after migration
265
266           Sys::Virt::Domain::STATE_RUNNING_MIGRATION_CANCELED
267               The guest is running after migration abort
268
269           Sys::Virt::Domain::STATE_RUNNING_RESTORED
270               The guest is running after restore from file
271
272           Sys::Virt::Domain::STATE_RUNNING_SAVE_CANCELED
273               The guest is running after save cancel
274
275           Sys::Virt::Domain::STATE_RUNNING_UNKNOWN
276               It is not known why the domain has started
277
278           Sys::Virt::Domain::STATE_RUNNING_UNPAUSED
279               The guest is running after a resume
280
281           Sys::Virt::Domain::STATE_RUNNING_WAKEUP
282               The guest is running after wakeup from power management suspend
283
284           Sys::Virt::Domain::STATE_RUNNING_CRASHED
285               The guest was restarted after crashing
286
287           Sys::Virt::Domain::STATE_RUNNING_POSTCOPY
288               The guest is running but post-copy is taking place
289
290           Sys::Virt::Domain::STATE_BLOCKED_UNKNOWN
291               The guest is blocked for an unknown reason
292
293           Sys::Virt::Domain::STATE_SHUTDOWN_UNKNOWN
294               It is not known why the domain has shutdown
295
296           Sys::Virt::Domain::STATE_SHUTDOWN_USER
297               The guest is shutdown due to admin request
298
299           Sys::Virt::Domain::STATE_SHUTOFF_CRASHED
300               The guest is shutoff after a crash
301
302           Sys::Virt::Domain::STATE_SHUTOFF_DESTROYED
303               The guest is shutoff after being destroyed
304
305           Sys::Virt::Domain::STATE_SHUTOFF_FAILED
306               The guest is shutoff due to a virtualization failure
307
308           Sys::Virt::Domain::STATE_SHUTOFF_FROM_SNAPSHOT
309               The guest is shutoff after a snapshot
310
311           Sys::Virt::Domain::STATE_SHUTOFF_MIGRATED
312               The guest is shutoff after migration
313
314           Sys::Virt::Domain::STATE_SHUTOFF_SAVED
315               The guest is shutoff after a save
316
317           Sys::Virt::Domain::STATE_SHUTOFF_SHUTDOWN
318               The guest is shutoff due to controlled shutdown
319
320           Sys::Virt::Domain::STATE_SHUTOFF_UNKNOWN
321               It is not known why the domain has shutoff
322
323           Sys::Virt::Domain::STATE_SHUTOFF_DAEMON
324               The daemon stopped the guest due to a failure
325
326           Sys::Virt::Domain::STATE_PMSUSPENDED_UNKNOWN
327               It is not known why the domain was suspended to RAM
328
329           Sys::Virt::Domain::STATE_PMSUSPENDED_DISK_UNKNOWN
330               It is not known why the domain was suspended to disk
331
332       my $info = $dom->get_control_info($flags=0)
333           Returns a hash reference providing information about the control
334           channel. The returned keys in the hash are
335
336           "state"
337               One of the CONTROL INFO constants listed later
338
339           "details"
340               Currently unused, always 0.
341
342           "stateTime"
343               The elapsed time since the control channel entered the current
344               state.
345
346       my $time = $dom->get_time($flags=0);
347           Get the current time of the guest, in seconds and nanoseconds.  The
348           $flags parameter is currently unused and defaults to zero. The
349           return value is an array ref with two elements, the first contains
350           the time in seconds, the second contains the remaining nanoseconds.
351
352       $dom->set_time($secs, $nsecs, $flags=0);
353           Set the current time of the guest, in seconds and nanoseconds.  The
354           $flags parameter accepts one of
355
356           "Sys::Virt::Domain::TIME_SYNC"
357               Re-sync domain time from domain's RTC.
358
359       $dom->set_user_password($username, $password, $flags=0);
360           Update the password for account $username to be $password.
361           $password is the clear-text password string unless the
362           PASSWORD_ENCRYPTED flag is set.
363
364           "Sys::Virt::Domain::PASSWORD_ENCRYPTED"
365               The $password is encrypted with the password scheme required by
366               the guest OS.
367
368       $dom->rename($newname, $flags=0)
369           Change the name of an inactive guest to be $newname.  The $flags
370           parameter is currently unused and defaults to zero.
371
372       my @errs = $dom->get_disk_errors($flags=0)
373           Returns a list of all disk errors that have occurred on the backing
374           store for the guest's virtual disks. The returned array elements
375           are hash references, containing two keys
376
377           "path"
378               The path of the disk with an error
379
380           "error"
381               The error type
382
383       $dom->send_key($keycodeset, $holdtime, \@keycodes, $flags=0)
384           Sends a sequence of keycodes to the guest domain. The $keycodeset
385           should be one of the constants listed later in the KEYCODE SET
386           section. $holdtiem is the duration, in milliseconds, to keep the
387           key pressed before releasing it and sending the next keycode.
388           @keycodes is an array reference containing the list of keycodes to
389           send to the guest. The elements in the array should be keycode
390           values from the specified keycode set. $flags is currently unused.
391
392       my $info = $dom->get_block_info($dev, $flags=0)
393           Returns a hash reference summarising the disk usage of the host
394           backing store for a guest block device. The $dev parameter should
395           be the path to the backing store on the host. $flags is currently
396           unused and defaults to 0 if omitted. The returned hash contains the
397           following elements
398
399           capacity
400               Logical size in bytes of the block device backing image *
401
402           allocation
403               Highest allocated extent in bytes of the block device backing
404               image
405
406           physical
407               Physical size in bytes of the container of the backing image
408
409       $dom->set_max_memory($mem)
410           Set the maximum memory for the domain to the value $mem. The value
411           of the $mem parameter is specified in kilobytes.
412
413       $mem = $dom->get_max_memory()
414           Returns the current maximum memory allowed for this domain in
415           kilobytes.
416
417       $dom->set_memory($mem, $flags)
418           Set the current memory for the domain to the value $mem. The value
419           of the $mem parameter is specified in kilobytes. This must be less
420           than, or equal to the domain's max memory limit.  The $flags
421           parameter can control whether the update affects the live guest, or
422           inactive config, defaulting to modifying the current state.
423
424       $dom->set_memory_stats_period($period, $flags)
425           Set the period on which guests memory stats are refreshed, with
426           $period being a value in seconds. The $flags parameter is currently
427           unused.
428
429       $dom->shutdown()
430           Request that the guest OS perform a graceful shutdown and poweroff.
431           This usually requires some form of cooperation from the guest
432           operating system, such as responding to an ACPI signal, or a guest
433           agent process. For an immediate, forceful poweroff, use the
434           "destroy" method instead.
435
436       $dom->reboot([$flags])
437           Request that the guest OS perform a graceful shutdown and
438           optionally restart. The optional $flags parameter is currently
439           unused and if omitted defaults to zero.
440
441       $dom->reset([$flags])
442           Perform a hardware reset of the virtual machine. The guest OS is
443           given no opportunity to shutdown gracefully. The optional $flags
444           parameter is currently unused and if omitted defaults to zero.
445
446       $dom->get_max_vcpus()
447           Return the maximum number of vcpus that are configured for the
448           domain
449
450       $dom->attach_device($xml[, $flags])
451           Hotplug a new device whose configuration is given by $xml, to the
452           running guest. The optional <$flags> parameter defaults to 0, but
453           can accept one of the device hotplug flags described later.
454
455       $dom->detach_device($xml[, $flags])
456           Hotunplug an existing device whose configuration is given by $xml,
457           from the running guest. The optional <$flags> parameter defaults to
458           0, but can accept one of the device hotplug flags described later.
459
460       $dom->detach_device_alias($alias[, $flags])
461           Hotunplug an existing device which is identified by $alias.  The
462           optional <$flags> parameter defaults to 0, but can accept one of
463           the device hotplug flags described later.
464
465       $dom->update_device($xml[, $flags])
466           Update the configuration of an existing device. The new
467           configuration is given by $xml. The optional <$flags> parameter
468           defaults to 0 but can accept one of the device hotplug flags
469           described later.
470
471       $data = $dom->block_peek($path, $offset, $size[, $flags])
472           Peek into the guest disk $path, at byte $offset capturing $size
473           bytes of data. The returned scalar may contain embedded NULLs. The
474           optional $flags parameter is currently unused and if omitted
475           defaults to zero.
476
477       $data = $dom->memory_peek($offset, $size[, $flags])
478           Peek into the guest memory at byte $offset virtual address,
479           capturing $size bytes of memory. The return scalar may contain
480           embedded NULLs. The optional $flags parameter is currently unused
481           and if omitted defaults to zero.
482
483       $flag = $dom->get_autostart();
484           Return a true value if the guest domain is configured to
485           automatically start upon boot. Return false, otherwise
486
487       $dom->set_autostart($flag)
488           Set the state of the autostart flag, which determines whether the
489           guest will automatically start upon boot of the host OS
490
491       $dom->set_vcpus($count, [$flags])
492           Set the number of virtual CPUs in the guest VM to $count.  The
493           optional $flags parameter can be used to control whether the
494           setting changes the live config or inactive config.
495
496       $dom->set_vcpu($cpumap, $state, [$flags])
497           Set the state of the CPUs in $cpumap to $state. The $flags
498           parameter defaults to zero if not present.
499
500       $count = $dom->get_vcpus([$flags])
501           Get the number of virtual CPUs in the guest VM.  The optional
502           $flags parameter can be used to control whether to query the
503           setting of the live config or inactive config.
504
505       $dom->set_guest_vcpus($cpumap, $state, [$flags=0])
506           Set the online status of the guest OS CPUs. The $cpumap parameter
507           describes the set of CPUs to modify (eg "0-3,^1").  $state is
508           either 1 to set the CPUs online, or 0 to set them offline. The
509           $flags parameter is currently unused and defaults to 0.
510
511       $info $dom->get_guest_vcpus([$flags=0])
512           Query information about the guest OS CPUs. The returned data is a
513           hash reference with the following keys.
514
515           vcpus
516               String containing bitmap representing CPU ids reported
517               currently known to the guest.
518
519           online
520               String containing bitmap representing CPU ids that are
521               currently online in the guest.
522
523           offlinable
524               String containing bitmap representing CPU ids that can be
525               offlined in the guest.
526
527           The $flags parameter is currently unused and defaults to 0.
528
529       $type = $dom->get_scheduler_type()
530           Return the scheduler type for the guest domain
531
532       $stats = $dom->block_stats($path)
533           Fetch the current I/O statistics for the block device given by
534           $path.  The returned hash reference contains keys for
535
536           "rd_req"
537               Number of read requests
538
539           "rd_bytes"
540               Number of bytes read
541
542           "wr_req"
543               Number of write requests
544
545           "wr_bytes"
546               Number of bytes written
547
548           "errs"
549               Some kind of error count
550
551       my $params = $dom->get_scheduler_parameters($flags=0)
552           Return the set of scheduler tunable parameters for the guest, as a
553           hash reference. The precise set of keys in the hash are specific to
554           the hypervisor.
555
556       $dom->set_scheduler_parameters($params, $flags=0)
557           Update the set of scheduler tunable parameters. The value names for
558           tunables vary, and can be discovered using the
559           "get_scheduler_params" call
560
561       my $params = $dom->get_memory_parameters($flags=0)
562           Return a hash reference containing the set of memory tunable
563           parameters for the guest. The keys in the hash are one of the
564           constants MEMORY PARAMETERS described later. The $flags parameter
565           accepts one or more the CONFIG OPTION constants documented later,
566           and defaults to 0 if omitted.
567
568       $dom->set_memory_parameters($params, $flags=0)
569           Update the memory tunable parameters for the guest. The $params
570           should be a hash reference whose keys are one of the MEMORY
571           PARAMETERS constants. The $flags parameter accepts one or more the
572           CONFIG OPTION constants documented later, and defaults to 0 if
573           omitted.
574
575       my $params = $dom->get_blkio_parameters($flags=0)
576           Return a hash reference containing the set of blkio tunable
577           parameters for the guest. The keys in the hash are one of the
578           constants BLKIO PARAMETERS described later. The $flags parameter
579           accepts one or more the CONFIG OPTION constants documented later,
580           and defaults to 0 if omitted.
581
582       $dom->set_blkio_parameters($params, $flags=0)
583           Update the blkio tunable parameters for the guest. The $params
584           should be a hash reference whose keys are one of the BLKIO
585           PARAMETERS constants. The $flags parameter accepts one or more the
586           CONFIG OPTION constants documented later, and defaults to 0 if
587           omitted.
588
589       $stats = $dom->get_block_iotune($disk, $flags=0)
590           Return a hash reference containing the set of blkio tunable
591           parameters for the guest disk $disk. The keys in the hash are one
592           of the constants BLOCK IOTUNE PARAMETERS described later.
593
594       $dom->set_block_iotune($disk, $params, $flags=0);
595           Update the blkio tunable parameters for the guest disk $disk. The
596           $params should be a hash reference whose keys are one of the BLOCK
597           IOTUNE PARAMETERS constants.
598
599       my $params = $dom->get_interface_parameters($intf, $flags=0)
600           Return a hash reference containing the set of interface tunable
601           parameters for the guest. The keys in the hash are one of the
602           constants INTERFACE PARAMETERS described later.
603
604       $dom->set_interface_parameters($intf, $params, $flags=0)
605           Update the interface tunable parameters for the guest. The $params
606           should be a hash reference whose keys are one of the INTERFACE
607           PARAMETERS constants.
608
609       my $params = $dom->get_numa_parameters($flags=0)
610           Return a hash reference containing the set of numa tunable
611           parameters for the guest. The keys in the hash are one of the
612           constants NUMA PARAMETERS described later. The $flags parameter
613           accepts one or more the CONFIG OPTION constants documented later,
614           and defaults to 0 if omitted.
615
616       $dom->set_numa_parameters($params, $flags=0)
617           Update the numa tunable parameters for the guest. The $params
618           should be a hash reference whose keys are one of the NUMA
619           PARAMETERS constants. The $flags parameter accepts one or more the
620           CONFIG OPTION constants documented later, and defaults to 0 if
621           omitted.
622
623       my $params = $dom->get_perf_events($flags=0)
624           Return a hash reference containing the set of performance events
625           that are available for the guest. The keys in the hash are one of
626           the constants PERF EVENTS described later.  The $flags parameter
627           accepts one or more the CONFIG OPTION constants documented later,
628           and defaults to 0 if omitted.
629
630       $dom->set_perf_events($params, $flags=0)
631           Update the enabled state for performance events for the guest. The
632           $params should be a hash reference whose keys are one of the PERF
633           EVENTS constants. The $flags parameter accepts one or more the
634           CONFIG OPTION constants documented later, and defaults to 0 if
635           omitted.
636
637       $dom->block_resize($disk, $newsize, $flags=0)
638           Resize the disk $disk to have new size $newsize KB. If the disk is
639           backed by a special image format, the actual resize is done by the
640           hypervisor. If the disk is backed by a raw file, or block device,
641           the resize must be done prior to invoking this API call, and it
642           merely updates the hypervisor's view of the disk size. The
643           following flags may be used
644
645           Sys::Virt::Domain::BLOCK_RESIZE_BYTES
646               Treat $newsize as if it were in bytes, rather than KB.
647
648       $dom->interface_stats($path)
649           Fetch the current I/O statistics for the block device given by
650           $path.  The returned hash containins keys for
651
652           "rx_bytes"
653               Total bytes received
654
655           "rx_packets"
656               Total packets received
657
658           "rx_errs"
659               Total packets received with errors
660
661           "rx_drop"
662               Total packets drop at reception
663
664           "tx_bytes"
665               Total bytes transmitted
666
667           "tx_packets"
668               Total packets transmitted
669
670           "tx_errs"
671               Total packets transmitted with errors
672
673           "tx_drop"
674               Total packets dropped at transmission.
675
676       $dom->memory_stats($flags=0)
677           Fetch the current memory statistics for the guest domain. The
678           $flags parameter is currently unused and can be omitted.  The
679           returned hash containins keys for
680
681           "swap_in"
682               Data read from swap space
683
684           "swap_out"
685               Data written to swap space
686
687           "major_fault"
688               Page fault involving disk I/O
689
690           "minor_fault"
691               Page fault not involving disk I/O
692
693           "unused"
694               Memory not used by the system
695
696           "available"
697               Total memory seen by guest
698
699           "rss"
700               Resident set size. Size of memory resident in host RAM.
701
702       $info = $dom->get_security_label()
703           Fetch information about the security label assigned to the guest
704           domain. The returned hash reference has two keys, "model" gives the
705           name of the security model in effect (eg "selinux"), while "label"
706           provides the name of the security label applied to the domain. This
707           method only returns information about the first security label. To
708           retrieve all labels, use "get_security_label_list".
709
710       @info = $dom->get_security_label_list()
711           Fetches information about all security labels assigned to the guest
712           domain. The elements in the returned array are all hash references,
713           whose keys are as described for "get_security_label".
714
715       $ddom = $dom->migrate(destcon, \%params, flags=0)
716           Migrate a domain to an alternative host. The "destcon" parameter
717           should be a "Sys::Virt" connection to the remote target host.  The
718           "flags" parameter takes one or more of the
719           "Sys::Virt::Domain::MIGRATE_XXX" constants described later in this
720           document. The %params parameter is a hash reference used to set
721           various parameters for the migration operation, with the following
722           valid keys.
723
724           "Sys::Virt::Domain::MIGRATE_PARAM_URI"
725               The URI to use for initializing the domain migration. It takes
726               a hypervisor specific format. The uri_transports element of the
727               hypervisor capabilities XML includes details of the supported
728               URI schemes. When omitted libvirt will auto-generate suitable
729               default URI. It is typically only necessary to specify this URI
730               if the destination host has multiple interfaces and a specific
731               interface is required to transmit migration data.
732
733           "Sys::Virt::Domain::MIGRATE_PARAM_DEST_NAME"
734               The name to be used for the domain on the destination host.
735               Omitting this parameter keeps the domain name the same. This
736               field is only allowed to be used with hypervisors that support
737               domain renaming during migration.
738
739           "Sys::Virt::Domain::MIGRATE_PARAM_DEST_XML"
740               The new configuration to be used for the domain on the
741               destination host.  The configuration must include an identical
742               set of virtual devices, to ensure a stable guest ABI across
743               migration. Only parameters related to host side configuration
744               can be changed in the XML. Hypervisors which support this field
745               will forbid migration if the provided XML would cause a change
746               in the guest ABI. This field cannot be used to rename the
747               domain during migration (use VIR_MIGRATE_PARAM_DEST_NAME field
748               for that purpose).  Domain name in the destination XML must
749               match the original domain name.
750
751               Omitting this parameter keeps the original domain
752               configuration. Using this field with hypervisors that do not
753               support changing domain configuration during migration will
754               result in a failure.
755
756           "Sys::Virt::Domain::MIGRATE_PARAM_GRAPHICS_URI"
757               URI to use for migrating client's connection to domain's
758               graphical console as VIR_TYPED_PARAM_STRING. If specified, the
759               client will be asked to automatically reconnect using these
760               parameters instead of the automatically computed ones. This can
761               be useful if, e.g., the client does not have a direct access to
762               the network virtualization hosts are connected to and needs to
763               connect through a proxy. The URI is formed as follows:
764
765                     protocol://hostname[:port]/[?parameters]
766
767               where protocol is either "spice" or "vnc" and parameters is a
768               list of protocol specific parameters separated by '&'.
769               Currently recognized parameters are "tlsPort" and "tlsSubject".
770               For example,
771
772                     spice://target.host.com:1234/?tlsPort=4567
773
774           "Sys::Virt::Domain::MIGRATE_PARAM_BANDWIDTH"
775               The maximum bandwidth (in MiB/s) that will be used for
776               migration. If set to 0 or omitted, libvirt will choose a
777               suitable default. Some hypervisors do not support this feature
778               and will return an error if this field is used and is not 0.
779
780           "Sys::Virt::Domain::MIGRATE_PARAM_BANDWIDTH_POSTCOPY"
781               The maximum bandwidth (in MiB/s) that will be used for
782               migration during post-copy phase. If set to 0 or omitted,
783               libvirt will choose a suitable default. Some hypervisors do not
784               support this feature and return an error if this field is used
785               and is not 0.
786
787           "Sys::Virt::Domain::MIGRATE_PARAM_LISTEN_ADDRESS"
788               The address on which to listen for incoming migration
789               connections.  If omitted, libvirt will listen on the wildcard
790               address (0.0.0.0 or ::). This default may be a security risk if
791               guests, or other untrusted users have the ability to connect to
792               the virtualization host, thus use of an explicit restricted
793               listen address is recommended.
794
795           "Sys::Virt::Domain::MIGRATE_PARAM_DISK_PORT"
796               Port that destination server should use for incoming disks
797               migration. Type is VIR_TYPED_PARAM_INT. If set to 0 or omitted,
798               libvirt will choose a suitable default. At the moment this is
799               only supported by the QEMU driver.
800
801           "Sys::Virt::Domain::MIGRATE_PARAM_MIGRATE_DISKS"
802               The list of disks to migrate when doing block storage
803               migration.  In contrast to other parameters whose values are
804               plain strings, the parameter value should be an array
805               reference, whose elements are in turn strings representing the
806               disk target names.
807
808           "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION"
809               The type of compression method use use, either "xbzrle" or
810               "mt".
811
812           "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_THREADS"
813               The number of compression threads to use
814
815           "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_DTHREADS"
816               The number of decompression threads
817
818           "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_LEVEL"
819               The compression level from 0 (no compression) to 9 (maximum
820               compression)
821
822           "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE"
823               The size of the cache for xbzrle compression
824
825           "Sys::Virt::Domain::MIGRATE_PARAM_PERSIST_XML"
826               The alternative persistent XML config to copy
827
828           "Sys::Virt::Domain::MIGRATE_PARAM_AUTO_CONVERGE_INITIAL"
829               The initial percentage to throttle guest vCPUs
830
831           "Sys::Virt::Domain::MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT"
832               The additional percentage step size to throttle guest vCPUs if
833               progress is not made
834
835           "Sys::Virt::Domain::MIGRATE_PARAM_PARALLEL_CONNECTIONS"
836               The number of connections used during parallel migration.
837
838           "Sys::Virt::Domain::MIGRATE_PARAM_TLS_DESTINATION"
839               Override the destination host name used for TLS verification.
840               Normally the TLS certificate from the destination host must
841               match the host's name for TLS verification to succeed. When the
842               certificate does not match the destination hostname and the
843               expected cetificate's hostname is known, this parameter can be
844               used to pass this expected hostname when starting the
845               migration.
846
847           "Sys::Virt::Domain::MIGRATE_PARAM_DISKS_URI"
848               The URI to use for initializing the domain migration for
849               storage. It takes a hypervisor specific format. The
850               uri_transports element of the hypervisor capabilities XML
851               includes details of the supported URI schemes. When omitted
852               libvirt will auto-generate suitable default URI. It is
853               typically only necessary to specify this URI if the destination
854               host has multiple interfaces and a specific interface is
855               required to transmit storage data.
856
857       $ddom = $dom->migrate(destcon, flags=0, dname=undef, uri=undef,
858       bandwidth=0)
859           Migrate a domain to an alternative host. Use of positional
860           parameters with "migrate" is deprecated in favour of passing a hash
861           reference as described above.
862
863       $ddom = $dom->migrate2(destcon, dxml, flags, dname, uri, bandwidth)
864           Migrate a domain to an alternative host. This method is deprecated
865           in favour of passing a hash ref to "migrate".
866
867       $ddom = $dom->migrate_to_uri(desturi, \%params, flags=0)
868           Migrate a domain to an alternative host. The "desturi" parameter
869           should be a valid libvirt connection URI for the remote target
870           host.  The "flags" parameter takes one or more of the
871           "Sys::Virt::Domain::MIGRATE_XXX" constants described later in this
872           document. The %params parameter is a hash reference used to set
873           various parameters for the migration operation, with the same keys
874           described for the "migrate" API.
875
876       $dom->migrate_to_uri(desturi, flags, dname, bandwidth)
877           Migrate a domain to an alternative host. Use of positional
878           parameters with "migrate_to_uri" is deprecated in favour of passing
879           a hash reference as described above.
880
881       $dom->migrate_to_uri2(dconnuri, miguri, dxml, flags, dname, bandwidth)
882           Migrate a domain to an alternative host. This method is deprecated
883           in favour of passing a hash ref to "migrate_to_uri".
884
885       $dom->migrate_set_max_downtime($downtime, $flags=0)
886           Set the maximum allowed downtime during migration of the guest. A
887           longer downtime makes it more likely that migration will complete,
888           at the cost of longer time blackout for the guest OS at the switch
889           over point. The "downtime" parameter is measured in milliseconds.
890           The $flags parameter is currently unused and defaults to zero.
891
892       $downtime = $dom->migrate_get_max_downtime($flags=0) Get the current
893       value of the maximum downtime allowed during a migration of a guest.
894       The returned <downtime> value is measured in milliseconds. The $flags
895       parameter is currently unused and defaults to zero.
896       $dom->migrate_set_max_speed($bandwidth, $flags=0)
897           Set the maximum allowed bandwidth during migration of the guest.
898           The "bandwidth" parameter is measured in MB/second.  The $flags
899           parameter takes zero or more of the constants:
900
901           $Sys::Virt::Domain::MIGRATE_MAX_SPEED_POSTCOPY
902               Set the post-copy speed instead of the pre-copy speed.
903
904       $bandwidth = $dom->migrate_get_max_speed($flags=0)
905           Get the maximum allowed bandwidth during migration fo the guest.
906           The returned <bandwidth> value is measured in MB/second.  The
907           $flags parameter is accepts the same constants as
908           "migrate_set_max_speed".
909
910       $dom->migrate_set_compression_cache($cacheSize, $flags=0)
911           Set the maximum allowed compression cache size during migration of
912           the guest. The "cacheSize" parameter is measured in bytes.  The
913           $flags parameter is currently unused and defaults to zero.
914
915       $cacheSize = $dom->migrate_get_compression_cache($flags=0)
916           Get the maximum allowed compression cache size during migration of
917           the guest. The returned <bandwidth> value is measured in bytes.
918           The $flags parameter is currently unused and defaults to zero.
919
920       $dom->migrate_start_post_copy($flags=0)
921           Switch the domain from pre-copy to post-copy mode. This requires
922           that the original migrate command had the
923           "Sys::Virt::Domain::MIGRATE_POST_COPY" flag specified.
924
925       $dom->inject_nmi($flags)
926           Trigger an NMI in the guest virtual machine. The $flags parameter
927           is currently unused and defaults to 0.
928
929       $dom->open_console($st, $devname, $flags)
930           Open the text console for a serial, parallel or paravirt console
931           device identified by $devname, connecting it to the stream $st. If
932           $devname is undefined, the default console will be opened. $st must
933           be a "Sys::Virt::Stream" object used for bi-directional
934           communication with the console. $flags is currently unused,
935           defaulting to 0.
936
937       $dom->open_channel($st, $devname, $flags)
938           Open the text console for a data channel device identified by
939           $devname, connecting it to the stream $st. $st must be a
940           "Sys::Virt::Stream" object used for bi-directional communication
941           with the channel. $flags is currently unused, defaulting to 0.
942
943       $dom->open_graphics($idx, $fd, $flags)
944           Open the graphics console for a guest, identified by $idx, counting
945           from 0. The $fd should be a file descriptor for an anoymous socket
946           pair. The $flags argument should be one of the constants listed at
947           the end of this document, and defaults to 0.
948
949       $fd = $dom->open_graphics_fd($idx, $flags)
950           Open the graphics console for a guest, identified by $idx, counting
951           from 0. The $flags argument should be one of the constants listed
952           at the end of this document, and defaults to 0. The return value
953           will be a file descriptor connected to the console which must be
954           closed when no longer needed.  This method is preferred over
955           "open_graphics" since it will work correctly under sVirt mandatory
956           access control policies.
957
958       my $mimetype = $dom->screenshot($st, $screen, $flags)
959           Capture a screenshot of the virtual machine's monitor. The $screen
960           parameter controls which monitor is captured when using a multi-
961           head or multi-card configuration. $st must be a "Sys::Virt::Stream"
962           object from which the data can be read. $flags is currently unused
963           and defaults to 0. The mimetype of the screenshot is returned
964
965       @vcpuinfo = $dom->get_vcpu_info($flags=0)
966           Obtain information about the state of all virtual CPUs in a running
967           guest domain. The returned list will have one element for each
968           vCPU, where each elements contains a hash reference. The keys in
969           the hash are, "number" the vCPU number, "cpu" the physical CPU on
970           which the vCPU is currently scheduled, "cpuTime" the cumulative
971           execution time of the vCPU, "state" the running state and
972           "affinity" giving the allowed shedular placement. The value for
973           "affinity" is a string representing a bitmask against physical
974           CPUs, 8 cpus per character. To extract the bits use the "unpack"
975           function with the "b*" template. NB The "state", "cpuTime", "cpu"
976           values are only available if using $flags value of 0, and the
977           domain is currently running; otherwise they will all be set to
978           zero.
979
980       $dom->pin_vcpu($vcpu, $mask)
981           Pin the virtual CPU given by index $vcpu to physical CPUs given by
982           $mask. The $mask is a string representing a bitmask against
983           physical CPUs, 8 cpus per character.
984
985       $mask = $dom->get_emulator_pin_info()
986           Obtain information about the CPU affinity of the emulator process.
987           The returned $mask is a bitstring against physical CPUs, 8 cpus per
988           character. To extract the bits use the "unpack" function with the
989           "b*" template.
990
991       $dom->pin_emulator($newmask, $flags=0)
992           Pin the emulator threads to the physical CPUs identified by the
993           affinity in $newmask. The $newmask is a bitstring against the
994           physical CPUa, 8 cpus per character. To create a suitable
995           bitstring, use the "vec" function with a value of 1 for the "BITS"
996           parameter.
997
998       @iothreadinfo = $dom->get_iothread_info($flags=0)
999           Obtain information about the state of all IOThreads in a running
1000           guest domain. The returned list will have one element for each
1001           IOThread, where each elements contains a hash reference. The keys
1002           in the hash are, "number" the IOThread number and "affinity" giving
1003           the allowed schedular placement. The value for "affinity" is a
1004           string representing a bitmask against physical CPUs, 8 cpus per
1005           character. To extract the bits use the "unpack" function with the
1006           "b*" template.
1007
1008       $dom->pin_iothread($iothread, $mask)
1009           Pin the IOThread given by index $iothread to physical CPUs given by
1010           $mask. The $mask is a string representing a bitmask against
1011           physical CPUs, 8 cpus per character.
1012
1013       $dom->add_iothread($iothread, $flags=0)
1014           Add a new IOThread by the $iothread value to the guest domain.  The
1015           $flags parameter accepts one or more the CONFIG OPTION constants
1016           documented later, and defaults to 0 if omitted.
1017
1018       $dom->del_iothread($iothread, $flags=0)
1019           Delete an existing IOThread by the $iothread value from the guest
1020           domain.  The $flags parameter accepts one or more the CONFIG OPTION
1021           constants documented later, and defaults to 0 if omitted.
1022
1023       $dom->set_iothread($iothread, $params, $flags=0)
1024           Set parameters for the IOThread by the $iothread value on the guest
1025           domain.  The $params parameter is a hash reference whose keys are
1026           the "IOTHREAD STATS" constants documented later.  The $flags
1027           parameter accepts one or more the CONFIG OPTION constants
1028           documented later, and defaults to 0 if omitted.
1029
1030       my @stats = $dom->get_cpu_stats($startCpu, $numCpus, $flags=0)
1031           Requests the guests host physical CPU usage statistics, starting
1032           from host CPU <$startCpu> counting up to $numCpus. If $startCpu is
1033           -1 and $numCpus is 1, then the utilization across all CPUs is
1034           returned. Returns an array of hash references, each element
1035           containing stats for one CPU.
1036
1037       my $info = $dom->get_job_info()
1038           Returns a hash reference summarising the execution state of the
1039           background job. The elements of the hash are as follows:
1040
1041           type
1042               The type of job, one of the JOB TYPE constants listed later in
1043               this document.
1044
1045           timeElapsed
1046               The elapsed time in milliseconds
1047
1048           timeRemaining
1049               The expected remaining time in milliseconds. Only set if the
1050               "type" is JOB_UNBOUNDED.
1051
1052           dataTotal
1053               The total amount of data expected to be processed by the job,
1054               in bytes.
1055
1056           dataProcessed
1057               The current amount of data processed by the job, in bytes.
1058
1059           dataRemaining
1060               The expected amount of data remaining to be processed by the
1061               job, in bytes.
1062
1063           memTotal
1064               The total amount of mem expected to be processed by the job, in
1065               bytes.
1066
1067           memProcessed
1068               The current amount of mem processed by the job, in bytes.
1069
1070           memRemaining
1071               The expected amount of mem remaining to be processed by the
1072               job, in bytes.
1073
1074           fileTotal
1075               The total amount of file expected to be processed by the job,
1076               in bytes.
1077
1078           fileProcessed
1079               The current amount of file processed by the job, in bytes.
1080
1081           fileRemaining
1082               The expected amount of file remaining to be processed by the
1083               job, in bytes.
1084
1085       my ($type, $stats) = $dom->get_job_stats($flags=0)
1086           Returns an array summarising the execution state of the background
1087           job. The $type value is one of the JOB TYPE constants listed later
1088           in this document. The $stats value is a hash reference, whose
1089           elements are one of the following constants.
1090
1091           type
1092               The type of job, one of the JOB TYPE constants listed later in
1093               this document.
1094
1095               The $flags parameter defaults to zero and can take one of the
1096               following constants.
1097
1098               Sys::Virt::Domain::JOB_STATS_COMPLETED
1099                   Return the stats of the most recently completed job.
1100
1101               Sys::Virt::Domain::JOB_STATS_KEEP_COMPLETED
1102                   Don't clear the completed stats after reading them.
1103
1104           Sys::Virt::Domain::JOB_TIME_ELAPSED
1105               The elapsed time in milliseconds
1106
1107           Sys::Virt::Domain::JOB_TIME_ELAPSED_NET
1108               Time in milliseconds since the beginning of the migration job
1109               NOT including the time required to transfer control flow from
1110               the source host to the destination host.
1111
1112           Sys::Virt::Domain::JOB_TIME_REMAINING
1113               The expected remaining time in milliseconds. Only set if the
1114               "type" is JOB_UNBOUNDED.
1115
1116           Sys::Virt::Domain::JOB_DATA_TOTAL
1117               The total amount of data expected to be processed by the job,
1118               in bytes.
1119
1120           Sys::Virt::Domain::JOB_DATA_PROCESSED
1121               The current amount of data processed by the job, in bytes.
1122
1123           Sys::Virt::Domain::JOB_DATA_REMAINING
1124               The expected amount of data remaining to be processed by the
1125               job, in bytes.
1126
1127           Sys::Virt::Domain::JOB_MEMORY_TOTAL
1128               The total amount of mem expected to be processed by the job, in
1129               bytes.
1130
1131           Sys::Virt::Domain::JOB_MEMORY_PROCESSED
1132               The current amount of mem processed by the job, in bytes.
1133
1134           Sys::Virt::Domain::JOB_MEMORY_REMAINING
1135               The expected amount of mem remaining to be processed by the
1136               job, in bytes.
1137
1138           Sys::Virt::Domain::JOB_MEMORY_CONSTANT
1139               The number of pages filled with a constant byte which have been
1140               transferred
1141
1142           Sys::Virt::Domain::JOB_MEMORY_NORMAL
1143               The number of pages transferred without any compression
1144
1145           Sys::Virt::Domain::JOB_MEMORY_NORMAL_BYTES
1146               The number of bytes transferred without any compression
1147
1148           Sys::Virt::Domain::JOB_MEMORY_BPS
1149               The bytes per second transferred
1150
1151           Sys::Virt::Domain::JOB_MEMORY_DIRTY_RATE
1152               The number of memory pages dirtied per second
1153
1154           Sys::Virt::Domain::JOB_MEMORY_PAGE_SIZE
1155               The memory page size in bytes
1156
1157           Sys::Virt::Domain::JOB_MEMORY_ITERATION
1158               The total number of iterations over guest memory
1159
1160           Sys::Virt::Domain::JOB_MEMORY_POSTCOPY_REQS
1161               The number of page requests received from the destination host
1162               during post-copy migration.
1163
1164           Sys::Virt::Domain::JOB_DISK_TOTAL
1165               The total amount of file expected to be processed by the job,
1166               in bytes.
1167
1168           Sys::Virt::Domain::JOB_DISK_PROCESSED
1169               The current amount of file processed by the job, in bytes.
1170
1171           Sys::Virt::Domain::JOB_DISK_REMAINING
1172               The expected amount of file remaining to be processed by the
1173               job, in bytes.
1174
1175           Sys::Virt::Domain::JOB_DISK_BPS
1176               The bytes per second transferred
1177
1178           Sys::Virt::Domain::JOB_AUTO_CONVERGE_THROTTLE
1179               The percentage by which vCPUs are currently throttled
1180
1181           Sys::Virt::Domain::JOB_COMPRESSION_CACHE
1182               The size of the compression cache in bytes
1183
1184           Sys::Virt::Domain::JOB_COMPRESSION_BYTES
1185               The number of compressed bytes transferred
1186
1187           Sys::Virt::Domain::JOB_COMPRESSION_PAGES
1188               The number of compressed pages transferred
1189
1190           Sys::Virt::Domain::JOB_COMPRESSION_CACHE_MISSES
1191               The number of changing pages not in compression cache
1192
1193           Sys::Virt::Domain::JOB_COMPRESSION_OVERFLOW
1194               The number of changing pages in the compression cache but sent
1195               uncompressed since the compressed page was larger than the non-
1196               compressed page.
1197
1198           Sys::Virt::Domain::JOB_DOWNTIME
1199               The number of milliseconds of downtime expected during
1200               migration switchover.
1201
1202           Sys::Virt::Domain::JOB_DOWNTIME_NET
1203               Real measured downtime (ms) NOT including the time required to
1204               transfer control flow from the source host to the destination
1205               host.
1206
1207           Sys::Virt::Domain::JOB_SETUP_TIME
1208               The number of milliseconds of time doing setup of the job
1209
1210           Sys::Virt::Domain::JOB_OPERATION
1211               The type of operation associated with the job
1212
1213           Sys::Virt::Domain::JOB_SUCCESS
1214               Whether the job was successfully completed.
1215
1216           Sys::Virt::Domain::JOB_DISK_TEMP_TOTAL
1217               Possible total temporary disk space for the job in bytes
1218
1219           Sys::Virt::Domain::JOB_DISK_TEMP_USED
1220               Current total temporary disk space for the job in bytes
1221
1222           Sys::Virt::Domain::JOB_ERRMSG
1223               The error message from a failed job
1224
1225           The values for the Sys::Virt::Domain::JOB_OPERATION field are
1226
1227           Sys::Virt::Domain::JOB_OPERATION_UNKNOWN
1228               No known job type
1229
1230           Sys::Virt::Domain::JOB_OPERATION_START
1231               The guest is starting
1232
1233           Sys::Virt::Domain::JOB_OPERATION_SAVE
1234               The guest is saving to disk
1235
1236           Sys::Virt::Domain::JOB_OPERATION_RESTORE
1237               The guest is restoring from disk
1238
1239           Sys::Virt::Domain::JOB_OPERATION_MIGRATION_IN
1240               The guest is migrating in from another host
1241
1242           Sys::Virt::Domain::JOB_OPERATION_MIGRATION_OUT
1243               The guest is migrating out to another host
1244
1245           Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT
1246               The guest is saving a snapshot
1247
1248           Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT_REVERT
1249               The guest is reverting to a snapshot
1250
1251           Sys::Virt::Domain::JOB_OPERATION_DUMP
1252               The guest is saving a crash dump
1253
1254           Sys::Virt::Domain::JOB_OPERATION_BACKUP
1255               The guest is performing a block backup
1256
1257       $dom->abort_job()
1258           Aborts the currently executing job
1259
1260       my $info = $dom->get_block_job_info($path, $flags=0)
1261           Returns a hash reference summarising the execution state of the
1262           block job. The $path parameter should be the fully qualified path
1263           of the block device being changed. Valid $flags include:
1264
1265           Sys::Virt::Domain::BLOCK_JOB_INFO_BANDWIDTH_BYTES
1266               Treat bandwidth value as bytes instead of MiB.
1267
1268       $dom->set_block_job_speed($path, $bandwidth, $flags=0)
1269           Change the maximum I/O bandwidth used by the block job that is
1270           currently executing for $path. The $bandwidth argument is specified
1271           in MB/s.  The $flags parameter can take the bitwise union of the
1272           values:
1273
1274           Sys::Virt::Domain::BLOCK_JOB_SPEED_BANDWIDTH_BYTES
1275               The $bandwidth parameter value is measured in bytes/s instead
1276               of MB/s.
1277
1278       $dom->abort_block_job($path, $flags=0)
1279           Abort the current job that is executing for the block device
1280           associated with $path
1281
1282       $dom->block_pull($path, $bandwidth, $flags=0)
1283           Merge the backing files associated with $path into the top level
1284           file. The $bandwidth parameter specifies the maximum I/O rate to
1285           allow in MB/s. The $flags parameter can take the bitwise union of
1286           the values:
1287
1288           Sys::Virt::Domain::BLOCK_PULL_BANDWIDTH_BYTES
1289               The $bandwidth parameter value is measured in bytes/s instead
1290               of MB/s.
1291
1292       $dom->block_rebase($path, $base, $bandwidth, $flags=0)
1293           Switch the backing path associated with $path to instead use $base.
1294           The $bandwidth parameter specifies the maximum I/O rate to allow in
1295           MB/s. The $flags parameter can take the bitwise union of the
1296           values:
1297
1298           Sys::Virt::Domain::BLOCK_REBASE_BANDWIDTH_BYTES
1299               The $bandwidth parameter value is measured in bytes/s instead
1300               of MB/s.
1301
1302       $dom->block_copy($path, $destxml, $params, $flags=0)
1303           Copy contents of a disk image <$path> into the target volume
1304           described by $destxml which follows the schema of the <disk>
1305           element in the domain XML. The $params parameter is a hash of
1306           optional parameters to control the process
1307
1308           Sys::Virt::Domain::BLOCK_COPY_BANDWIDTH
1309               The maximum bandwidth in bytes per second.
1310
1311           Sys::Virt::Domain::BLOCK_COPY_GRANULARITY
1312               The granularity in bytes of the copy process
1313
1314           Sys::Virt::Domain::BLOCK_COPY_BUF_SIZE
1315               The maximum amount of data in flight in bytes.
1316
1317       $dom->block_commit($path, $base, $top, $bandwidth, $flags=0)
1318           Commit changes there were made to the temporary top level file
1319           $top.  Takes all the differences between $top and $base and merge
1320           them into $base. The $bandwidth parameter specifies the maximum I/O
1321           rate to allow in MB/s.  The $flags parameter can take the bitwise
1322           union of the values:
1323
1324           Sys::Virt::Domain::BLOCK_COMMIT_BANDWIDTH_BYTES
1325               The $bandwidth parameter value is measured in bytes instead of
1326               MB/s.
1327
1328       $count = $dom->num_of_snapshots()
1329           Return the number of saved snapshots of the domain
1330
1331       @names = $dom->list_snapshot_names()
1332           List the names of all saved snapshots. The names can be used with
1333           the "lookup_snapshot_by_name"
1334
1335       @snapshots = $dom->list_snapshots()
1336           Return a list of all snapshots currently known to the domain. The
1337           elements in the returned list are instances of the
1338           Sys::Virt::DomainSnapshot class.  This method requires O(n) RPC
1339           calls, so the "list_all_snapshots" method is recommended as a more
1340           efficient alternative.
1341
1342       my @snapshots = $dom->list_all_snapshots($flags)
1343           Return a list of all domain snapshots associated with this domain.
1344           The elements in the returned list are instances of the
1345           Sys::Virt::DomainSnapshot class. The $flags parameter can be used
1346           to filter the list of return domain snapshots.
1347
1348       my $snapshot = $dom->get_snapshot_by_name($name)
1349           Return the domain snapshot with a name of $name. The returned
1350           object is an instance of the Sys::Virt::DomainSnapshot class.
1351
1352       $dom->has_current_snapshot()
1353           Returns a true value if the domain has a currently active snapshot
1354
1355       $snapshot = $dom->current_snapshot()
1356           Returns the currently active snapshot for the domain.
1357
1358       $snapshot = $dom->create_snapshot($xml[, $flags])
1359           Create a new snapshot from the $xml. The $flags parameter accepts
1360           the SNAPSHOT CREATION constants listed in
1361           "Sys::Virt::DomainSnapshots".
1362
1363       my @checkpoints = $dom->list_all_checkpoints($flags)
1364           Return a list of all domain checkpoints associated with this
1365           domain.  The elements in the returned list are instances of the
1366           Sys::Virt::DomainCheckpoint class. The $flags parameter can be used
1367           to filter the list of return domain checkpoints.
1368
1369       my $checkpoint = $dom->get_checkpoint_by_name($name)
1370           Return the domain checkpoint with a name of $name. The returned
1371           object is an instance of the Sys::Virt::DomainCheckpoint class.
1372
1373       $checkpoint = $dom->create_checkpoint($xml[, $flags])
1374           Create a new checkpoint from the $xml. The $flags parameter accepts
1375           the CHECKPOINT CREATION constants listed in
1376           "Sys::Virt::DomainCheckpoints".
1377
1378       $dom->backup_begin($backupxml, $checkpointxml=undef, $flags=0);
1379           Start a point-in-time backup job for the specified disks of a
1380           running domain. The $backupxml parameter describes the backup
1381           operation, including which disks to use. The optional
1382           $checkpointxml parameter can be used to create a checkpoint
1383           covering to the same point in time as the backup. The optional
1384           $flags parameter can be one of the following constants:
1385
1386           Sys::Virt::Domain::BACKUP_BEGIN_REUSE_EXTERNAL
1387               Assume that the output/temporary files for the backup have been
1388               precreated by the caller with the correct size and format.
1389
1390       $xml = $dom->backup_get_xml_description($flags=0);
1391           Get the XML description of the currently executing backup job. If
1392           there is no backup job then an error is raised.
1393
1394       $dom->fs_trim($mountPoint, $minimum, $flags=0);
1395           Issue an FS_TRIM command to the device at $mountPoint to remove
1396           chunks of unused space that are at least $minimum bytes in length.
1397           $flags is currently unused and defaults to zero.
1398
1399       $dom->fs_freeze(\@mountPoints, $flags=0);
1400           Freeze all the filesystems associated with the @mountPoints array
1401           reference. If <@mountPoints> is an empty list, then all filesystems
1402           will be frozen. $flags is currently unused and defaults to zero.
1403
1404       $dom->fs_thaw(\@mountPoints, $flags=0);
1405           Thaw all the filesystems associated with the @mountPoints array
1406           reference. If <@mountPoints> is an empty list, then all filesystems
1407           will be thawed. $flags is currently unused and defaults to zero.
1408
1409       @fslist = $dom->get_fs_info($flags=0);
1410           Obtain a list of all guest filesystems. The returned list will
1411           contain one element for each filesystem, whose value will be a hash
1412           reference with the following keys
1413
1414           name
1415               The name of the guest device that is mounted
1416
1417           fstype
1418               The filesystem type (eg 'ext4', 'fat', 'ntfs', etc)
1419
1420           mountpoint
1421               The location in the filesystem tree of the mount
1422
1423           devalias
1424               An array reference containing list of device aliases associated
1425               with the guest device. The device aliases correspond to disk
1426               target names in the guest XML configuration
1427
1428       @nics = $dom->get_interface_addresses($src, $flags=0);
1429           Obtain a list of all guest network interfaces. The $src parameter
1430           is one of the constants
1431
1432           Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_LEASE
1433               Extract the DHCP server lease information
1434
1435           Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_AGENT
1436               Query the guest OS via an agent
1437
1438           Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_ARP
1439               Extract from the local ARP tables
1440
1441           The returned list will contain one element for each interface.  The
1442           values in the list will be a hash reference with the following keys
1443
1444           name
1445               The name of the guest interface that is mounted
1446
1447           hwaddr
1448               The hardware address, aka MAC, if available.
1449
1450           addrs
1451               An array reference containing list of IP addresses associated
1452               with the guest NIC. Each element in the array is a further hash
1453               containing
1454
1455               addr
1456                   The IP address string
1457
1458               prefix
1459                   The IP address network prefix
1460
1461               type
1462                   The IP address type (IPv4 vs IPv6)
1463
1464       $dom->send_process_signal($pid, $signum, $flags=0);
1465           Send the process $pid the signal $signum. The $signum value must be
1466           one of the constants listed later, not a POSIX or Linux signal
1467           value. $flags is currently unused and defaults to zero.
1468
1469       $dom->set_block_threshold($dev, $threshold, $flags=0);
1470           Set the threshold level for delivering the EVENT_ID_BLOCK_THRESHOLD
1471           if the device or backing chain element described by $dev is written
1472           beyond the set $threshold level. The threshold level is unset once
1473           the event fires. The event might not be delivered at all if
1474           libvirtd was not running at the moment when the threshold was
1475           reached.
1476
1477       $dom->set_lifecycle_action($type, $action, $flags=0)
1478           Changes the actions of lifecycle events for domain represented as
1479           <on_$type>$action</on_$type> in the domain XML.
1480
1481       $info = $dom->get_launch_security_info($flags=0)
1482           Get information about the domain launch security policy. $flags is
1483           currently unused and defaults to zero. The returned hash may
1484           contain the following keys
1485
1486           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_MEASUREMENT
1487               The AMD SEV launch measurement
1488
1489           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_API_MAJOR
1490               The host SEV API major version
1491
1492           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_API_MINOR
1493               The host SEV API minor version
1494
1495           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_BUILD_ID
1496               The host SEV firmware build ID
1497
1498           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_POLICY
1499               The guest SEV policy
1500
1501       $dom->set_launch_security_state(\%params, $flags=0)
1502           Set information about the domain launch security state. $flags is
1503           currently unused and defaults to zero. The provided hash may
1504           contain the following keys
1505
1506           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_SECRET
1507               The SEV secret string to inject
1508
1509           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_SECRET_HEADER
1510               The SEV secret header string to inject
1511
1512           Sys::Virt::Domain::LAUNCH_SECURITY_SEV_SECRET_SET_ADDRESS
1513               The address at which to inject the SEV secret. If omitted it
1514               can be automatically determined from the firmware
1515
1516       $info = $dom->get_guest_info($types, $flags=0)
1517           Get information about the domain guest configuration. The $types
1518           parameter determines what pieces of information are returned and
1519           should be the bitwise or of the following constants:
1520
1521           Sys::Virt::Domain::GUEST_INFO_USERS
1522               Active user information
1523
1524           Sys::Virt::Domain::GUEST_INFO_OS
1525               Misc operating system information
1526
1527           Sys::Virt::Domain::GUEST_INFO_TIMEZONE
1528               The guest timezone
1529
1530           Sys::Virt::Domain::GUEST_INFO_HOSTNAME
1531               The guest hostname
1532
1533           Sys::Virt::Domain::GUEST_INFO_FILESYSTEM
1534               Filesystem mount information
1535
1536           Sys::Virt::Domain::GUEST_INFO_DISKS
1537               Block device information
1538
1539           Sys::Virt::Domain::GUEST_INFO_INTERFACES
1540               Network interfaces information
1541
1542           $flags is currently unused and defaults to zero.
1543
1544       $dom->set_agent_response_timeout($timeout, $flags=0)
1545           Set the amount of time to wait for the agent to respond to a
1546           command. $timeout is a positive integer representing the number of
1547           seconds to wait, or one of the constants:
1548
1549           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_BLOCK
1550               Wait forever with no timeout
1551
1552           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_NOWAIT
1553               Don't want at all, return immediately
1554
1555           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_DEFAULT
1556               Use the hypervisor driver's default timeout
1557
1558           The $flags parameter is currently unused and defaults to zero.
1559
1560       my @keys = $dom->authorized_ssh_keys_get($user, $flags=0)
1561           Retrieve the list of authorized SSH keys for the user account
1562           $user.  The $flags parameter is currently unused and defaults to
1563           zero.
1564
1565       $dom->authorized_ssh_keys_set($user, \@keys, $flags=0)
1566           Update the list of authorized SSH keys for the user account $user.
1567           The @keys parameter should be an array reference containing the new
1568           keys, if any. The default behaviour is to set the authorized SSH
1569           keys to the exact set specified in @keys. This can be modified via
1570           the $flags parameter which takes the following constants
1571
1572           Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_APPEND
1573               Append @keys to the current set of keys, rather than replacing
1574               the existing keys.
1575
1576           Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_REMOVE
1577               Remove @keys from the current set of keys, rather than
1578               replacing the existing keys. It is not an error if the keys do
1579               not exist.
1580
1581       my @msgs = $dom->get_messages($flags=0)
1582           Retrieve a list of messages associated with the domain. The
1583           optional $flags parameter can accept zero or more of
1584
1585           Sys::Virt::Domain::MESSAGE_DEPRECATION
1586               Warnings about use of deprecated features
1587
1588           Sys::Virt::Domain::MESSAGE_TAINTING
1589               Warnings about actions that have tainting the domain
1590
1591       $dom->start_dirty_rate_calc($dom, $secs, $flags=0)
1592           Request calculation of the domain's memory dirty rate over the next
1593           $secs seconds. $flags is currently unused and defaults to zero.
1594

CONSTANTS

1596       A number of the APIs take a "flags" parameter. In most cases passing a
1597       value of zero will be satisfactory. Some APIs, however, accept named
1598       constants to alter their behaviour. This section documents the current
1599       known constants.
1600
1601   DOMAIN STATE
1602       The domain state constants are useful in interpreting the "state" key
1603       in the hash returned by the "get_info" method.
1604
1605       Sys::Virt::Domain::STATE_NOSTATE
1606           The domain is active, but is not running / blocked (eg idle)
1607
1608       Sys::Virt::Domain::STATE_RUNNING
1609           The domain is active and running
1610
1611       Sys::Virt::Domain::STATE_BLOCKED
1612           The domain is active, but execution is blocked
1613
1614       Sys::Virt::Domain::STATE_PAUSED
1615           The domain is active, but execution has been paused
1616
1617       Sys::Virt::Domain::STATE_SHUTDOWN
1618           The domain is active, but in the shutdown phase
1619
1620       Sys::Virt::Domain::STATE_SHUTOFF
1621           The domain is inactive, and shut down.
1622
1623       Sys::Virt::Domain::STATE_CRASHED
1624           The domain is inactive, and crashed.
1625
1626       Sys::Virt::Domain::STATE_PMSUSPENDED
1627           The domain is active, but in power management suspend state
1628
1629   CONTROL INFO
1630       The following constants can be used to determine what the guest domain
1631       control channel status is
1632
1633       Sys::Virt::Domain::CONTROL_ERROR
1634           The control channel has a fatal error
1635
1636       Sys::Virt::Domain::CONTROL_OK
1637           The control channel is ready for jobs
1638
1639       Sys::Virt::Domain::CONTROL_OCCUPIED
1640           The control channel is busy
1641
1642       Sys::Virt::Domain::CONTROL_JOB
1643           The control channel is busy with a job
1644
1645       If the status is "Sys::Virt::Domain::CONTROL_ERROR", then one of the
1646       following constants describes the reason
1647
1648       Sys::Virt::Domain::CONTROL_ERROR_REASON_NONE
1649           There is no reason for the error available
1650
1651       Sys::Virt::Domain::CONTROL_ERROR_REASON_UNKNOWN
1652           The reason for the error is unknown
1653
1654       Sys::Virt::Domain::CONTROL_ERROR_REASON_INTERNAL
1655           There was an internal error in libvirt
1656
1657       Sys::Virt::Domain::CONTROL_ERROR_REASON_MONITOR
1658           There was an error speaking to the monitor
1659
1660   DOMAIN CREATION
1661       The following constants can be used to control the behaviour of domain
1662       creation
1663
1664       Sys::Virt::Domain::START_PAUSED
1665           Keep the guest vCPUs paused after starting the guest
1666
1667       Sys::Virt::Domain::START_AUTODESTROY
1668           Automatically destroy the guest when the connection is closed (or
1669           fails)
1670
1671       Sys::Virt::Domain::START_BYPASS_CACHE
1672           Do not use OS I/O cache if starting a domain with a saved state
1673           image
1674
1675       Sys::Virt::Domain::START_FORCE_BOOT
1676           Boot the guest, even if there was a saved snapshot
1677
1678       Sys::Virt::Domain::START_VALIDATE
1679           Validate the XML document against the XML schema
1680
1681   DOMAIN DEFINE
1682       The following constants can be used to control the behaviour of domain
1683       define operations
1684
1685       Sys::Virt::Domain::DEFINE_VALIDATE
1686           Validate the XML document against the XML schema
1687
1688   KEYCODE SETS
1689       The following constants define the set of supported keycode sets
1690
1691       Sys::Virt::Domain::KEYCODE_SET_LINUX
1692           The Linux event subsystem keycodes
1693
1694       Sys::Virt::Domain::KEYCODE_SET_XT
1695           The original XT keycodes
1696
1697       Sys::Virt::Domain::KEYCODE_SET_ATSET1
1698           The AT Set1 keycodes (aka XT)
1699
1700       Sys::Virt::Domain::KEYCODE_SET_ATSET2
1701           The AT Set2 keycodes (aka AT)
1702
1703       Sys::Virt::Domain::KEYCODE_SET_ATSET3
1704           The AT Set3 keycodes (aka PS2)
1705
1706       Sys::Virt::Domain::KEYCODE_SET_OSX
1707           The OS-X keycodes
1708
1709       Sys::Virt::Domain::KEYCODE_SET_XT_KBD
1710           The XT keycodes from the Linux Keyboard driver
1711
1712       Sys::Virt::Domain::KEYCODE_SET_USB
1713           The USB HID keycode set
1714
1715       Sys::Virt::Domain::KEYCODE_SET_WIN32
1716           The Windows keycode set
1717
1718       Sys::Virt::Domain::KEYCODE_SET_QNUM
1719           The XT keycode set, with the extended scancodes using the high bit
1720           of the first byte, instead of the low bit of the second byte.
1721
1722       Sys::Virt::Domain::KEYCODE_SET_RFB
1723           A deprecated alias for "Sys::Virt::Domain::KEYCODE_SET_QNUM"
1724
1725   MEMORY PEEK
1726       The following constants can be used with the "memory_peek" method's
1727       flags parameter
1728
1729       Sys::Virt::Domain::MEMORY_VIRTUAL
1730           Indicates that the offset is using virtual memory addressing.
1731
1732       Sys::Virt::Domain::MEMORY_PHYSICAL
1733           Indicates that the offset is using physical memory addressing.
1734
1735   VCPU STATE
1736       The following constants are useful when interpreting the virtual CPU
1737       run state
1738
1739       Sys::Virt::Domain::VCPU_OFFLINE
1740           The virtual CPU is not online
1741
1742       Sys::Virt::Domain::VCPU_RUNNING
1743           The virtual CPU is executing code
1744
1745       Sys::Virt::Domain::VCPU_BLOCKED
1746           The virtual CPU is waiting to be scheduled
1747
1748   VCPU HOST PLACEMENT STATE
1749       The following constants are useful when interpreting the virtual CPU
1750       host placement
1751
1752       Sys::Virt::Domain::VCPU_INFO_CPU_OFFLINE
1753           The virtual CPU is not online
1754
1755       Sys::Virt::Domain::VCPU_INFO_CPU_UNAVAILABLE
1756           The virtual CPU placement is not available from this hypervisor
1757
1758   OPEN GRAPHICS CONSTANTS
1759       The following constants are used when opening a connection to the guest
1760       graphics server
1761
1762       Sys::Virt::Domain::OPEN_GRAPHICS_SKIPAUTH
1763           Skip authentication of the client
1764
1765   OPEN CONSOLE CONSTANTS
1766       The following constants are used when opening a connection to the guest
1767       console
1768
1769       Sys::Virt::Domain::OPEN_CONSOLE_FORCE
1770           Force opening of the console, disconnecting any other open session
1771
1772       Sys::Virt::Domain::OPEN_CONSOLE_SAFE
1773           Check if the console driver supports safe operations
1774
1775   OPEN CHANNEL CONSTANTS
1776       The following constants are used when opening a connection to the guest
1777       channel
1778
1779       Sys::Virt::Domain::OPEN_CHANNEL_FORCE
1780           Force opening of the channel, disconnecting any other open session
1781
1782   XML DUMP OPTIONS
1783       The following constants are used to control the information included in
1784       the XML configuration dump
1785
1786       Sys::Virt::Domain::XML_INACTIVE
1787           Report the persistent inactive configuration for the guest, even if
1788           it is currently running.
1789
1790       Sys::Virt::Domain::XML_SECURE
1791           Include security sensitive information in the XML dump, such as
1792           passwords.
1793
1794       Sys::Virt::Domain::XML_UPDATE_CPU
1795           Update the CPU model definition to match the current executing
1796           state.
1797
1798       Sys::Virt::Domain::XML_MIGRATABLE
1799           Update the XML to allow migration to older versions of libvirt
1800
1801   DEVICE HOTPLUG OPTIONS
1802       The following constants are used to control device hotplug operations
1803
1804       Sys::Virt::Domain::DEVICE_MODIFY_CURRENT
1805           Modify the domain in its current state
1806
1807       Sys::Virt::Domain::DEVICE_MODIFY_LIVE
1808           Modify only the live state of the domain
1809
1810       Sys::Virt::Domain::DEVICE_MODIFY_CONFIG
1811           Modify only the persistent config of the domain
1812
1813       Sys::Virt::Domain::DEVICE_MODIFY_FORCE
1814           Force the device to be modified
1815
1816   MEMORY OPTIONS
1817       The following constants are used to control memory change operations
1818
1819       Sys::Virt::Domain::MEM_CURRENT
1820           Modify the current state
1821
1822       Sys::Virt::Domain::MEM_LIVE
1823           Modify only the live state of the domain
1824
1825       Sys::Virt::Domain::MEM_CONFIG
1826           Modify only the persistent config of the domain
1827
1828       Sys::Virt::Domain::MEM_MAXIMUM
1829           Modify the maximum memory value
1830
1831   CONFIG OPTIONS
1832       The following constants are used to control what configuration a domain
1833       update changes
1834
1835       Sys::Virt::Domain::AFFECT_CURRENT
1836           Modify the current state
1837
1838       Sys::Virt::Domain::AFFECT_LIVE
1839           Modify only the live state of the domain
1840
1841       Sys::Virt::Domain::AFFECT_CONFIG
1842           Modify only the persistent config of the domain
1843
1844   MIGRATE OPTIONS
1845       The following constants are used to control how migration is performed
1846
1847       Sys::Virt::Domain::MIGRATE_LIVE
1848           Migrate the guest without interrupting its execution on the source
1849           host.
1850
1851       Sys::Virt::Domain::MIGRATE_PEER2PEER
1852           Manage the migration process over a direct peer-2-peer connection
1853           between the source and destination host libvirtd daemons.
1854
1855       Sys::Virt::Domain::MIGRATE_TUNNELLED
1856           Tunnel the migration data over the libvirt daemon connection,
1857           rather than the native hypervisor data transport. Requires
1858           PEER2PEER flag to be set.
1859
1860       Sys::Virt::Domain::MIGRATE_PERSIST_DEST
1861           Make the domain persistent on the destination host, defining its
1862           configuration file upon completion of migration.
1863
1864       Sys::Virt::Domain::MIGRATE_UNDEFINE_SOURCE
1865           Remove the domain's persistent configuration after migration
1866           completes successfully.
1867
1868       Sys::Virt::Domain::MIGRATE_PAUSED
1869           Do not re-start execution of the guest CPUs on the destination host
1870           after migration completes.
1871
1872       Sys::Virt::Domain::MIGRATE_NON_SHARED_DISK
1873           Copy the complete contents of the disk images during migration
1874
1875       Sys::Virt::Domain::MIGRATE_NON_SHARED_INC
1876           Copy the incrementally changed contents of the disk images during
1877           migration
1878
1879       Sys::Virt::Domain::MIGRATE_CHANGE_PROTECTION
1880           Do not allow changes to the virtual domain configuration while
1881           migration is taking place. This option is automatically implied if
1882           doing a peer-2-peer migration.
1883
1884       Sys::Virt::Domain::MIGRATE_UNSAFE
1885           Migrate even if the compatibility check indicates the migration
1886           will be unsafe to the guest.
1887
1888       Sys::Virt::Domain::MIGRATE_OFFLINE
1889           Migrate the guest config if the guest is not currently running
1890
1891       Sys::Virt::Domain::MIGRATE_COMPRESSED
1892           Enable compression of the migration data stream
1893
1894       Sys::Virt::Domain::MIGRATE_ABORT_ON_ERROR
1895           Abort if an I/O error occurrs on the disk
1896
1897       Sys::Virt::Domain::MIGRATE_AUTO_CONVERGE
1898           Force convergance of the migration operation by throttling guest
1899           runtime
1900
1901       Sys::Virt::Domain::MIGRATE_RDMA_PIN_ALL
1902           Pin memory for RDMA transfer
1903
1904       Sys::Virt::Domain::MIGRATE_POSTCOPY
1905           Enable support for post-copy migration
1906
1907       Sys::Virt::Domain::MIGRATE_TLS
1908           Setting this flag will cause the migration to attempt to use the
1909           TLS environment configured by the hypervisor in order to perform
1910           the migration. If incorrectly configured on either source or
1911           destination, the migration will fail.
1912
1913       Sys::Virt::Domain::MIGRATE_PARALLEL
1914           Send memory pages to the destination host through several network
1915           connections. See "Sys::Virt::Domain::MIGRATE_PARAM_PARALLEL_*"
1916           parameters for configuring the parallel migration.
1917
1918       Sys::Virt::Domain::MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES
1919           Force the guest writes which happen when copying disk images for
1920           non-shared storage migration to be synchronously written to the
1921           destination. This ensures the storage migration converges for VMs
1922           doing heavy I/O on fast local storage and slow mirror.
1923
1924   UNDEFINE CONSTANTS
1925       The following constants can be used when undefining virtual domain
1926       configurations
1927
1928       Sys::Virt::Domain::UNDEFINE_MANAGED_SAVE
1929           Also remove any managed save image when undefining the virtual
1930           domain
1931
1932       Sys::Virt::Domain::UNDEFINE_SNAPSHOTS_METADATA
1933           Also remove any snapshot metadata when undefining the virtual
1934           domain.
1935
1936       Sys::Virt::Domain::UNDEFINE_NVRAM
1937           Also remove any NVRAM state file when undefining the virtual
1938           domain.
1939
1940       Sys::Virt::Domain::UNDEFINE_KEEP_NVRAM
1941           keep NVRAM state file when undefining the virtual domain.
1942
1943       Sys::Virt::Domain::UNDEFINE_CHECKPOINTS_METADATA
1944           Also remove any checkpoint metadata when undefining the virtual
1945           domain.
1946
1947   JOB TYPES
1948       The following constants describe the different background job types.
1949
1950       Sys::Virt::Domain::JOB_NONE
1951           No job is active
1952
1953       Sys::Virt::Domain::JOB_BOUNDED
1954           A job with a finite completion time is active
1955
1956       Sys::Virt::Domain::JOB_UNBOUNDED
1957           A job with an unbounded completion time is active
1958
1959       Sys::Virt::Domain::JOB_COMPLETED
1960           The job has finished, but isn't cleaned up
1961
1962       Sys::Virt::Domain::JOB_FAILED
1963           The job has hit an error, but isn't cleaned up
1964
1965       Sys::Virt::Domain::JOB_CANCELLED
1966           The job was aborted at user request, but isn't cleaned up
1967
1968   MEMORY PARAMETERS
1969       The following constants are useful when getting/setting memory
1970       parameters for guests
1971
1972       Sys::Virt::Domain::MEMORY_HARD_LIMIT
1973           The maximum memory the guest can use.
1974
1975       Sys::Virt::Domain::MEMORY_SOFT_LIMIT
1976           The memory upper limit enforced during memory contention.
1977
1978       Sys::Virt::Domain::MEMORY_MIN_GUARANTEE
1979           The minimum memory guaranteed to be reserved for the guest.
1980
1981       Sys::Virt::Domain::MEMORY_SWAP_HARD_LIMIT
1982           The maximum swap the guest can use.
1983
1984       Sys::Virt::Domain::MEMORY_PARAM_UNLIMITED
1985           The value of an unlimited memory parameter
1986
1987   BLKIO PARAMETERS
1988       The following parameters control I/O tuning for the domain as a whole
1989
1990       Sys::Virt::Domain::BLKIO_WEIGHT
1991           The I/O weight parameter
1992
1993       Sys::Virt::Domain::BLKIO_DEVICE_WEIGHT
1994           The per-device I/O weight parameter
1995
1996       Sys::Virt::Domain::BLKIO_DEVICE_READ_BPS
1997           The per-device I/O bytes read per second
1998
1999       Sys::Virt::Domain::BLKIO_DEVICE_READ_IOPS
2000           The per-device I/O operations read per second
2001
2002       Sys::Virt::Domain::BLKIO_DEVICE_WRITE_BPS
2003           The per-device I/O bytes write per second
2004
2005       Sys::Virt::Domain::BLKIO_DEVICE_WRITE_IOPS
2006           The per-device I/O operations write per second
2007
2008   BLKIO TUNING PARAMETERS
2009       The following parameters control I/O tuning for an individual guest
2010       disk.
2011
2012       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC
2013           The total bytes processed per second.
2014
2015       Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC
2016           The bytes read per second.
2017
2018       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC
2019           The bytes written per second.
2020
2021       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC
2022           The total I/O operations processed per second.
2023
2024       Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC
2025           The I/O operations read per second.
2026
2027       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC
2028           The I/O operations written per second.
2029
2030       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX
2031           The maximum total bytes processed per second.
2032
2033       Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX
2034           The maximum bytes read per second.
2035
2036       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX
2037           The maximum bytes written per second.
2038
2039       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX
2040           The maximum total I/O operations processed per second.
2041
2042       Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX
2043           The maximum I/O operations read per second.
2044
2045       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX
2046           The maximum I/O operations written per second.
2047
2048       Sys::Virt::Domain::BLOCK_IOTUNE_SIZE_IOPS_SEC
2049           The maximum I/O operations per second
2050
2051       Sys::Virt::Domain::BLOCK_IOTUNE_GROUP_NAME
2052           A string representing a group name to allow sharing of I/O
2053           throttling quota between multiple drives
2054
2055       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTH
2056           The duration in seconds allowed for maximum total bytes processed
2057           per second.
2058
2059       Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTH
2060           The duration in seconds allowed for maximum bytes read per second.
2061
2062       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTH
2063           The duration in seconds allowed for maximum bytes written per
2064           second.
2065
2066       Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTH
2067           The duration in seconds allowed for maximum total I/O operations
2068           processed per second.
2069
2070       Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTH
2071           The duration in seconds allowed for maximum I/O operations read per
2072           second.
2073
2074       Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTH
2075           The duration in seconds allowed for maximum I/O operations written
2076           per second.
2077
2078   SCHEDULER CONSTANTS
2079       Sys::Virt::Domain::SCHEDULER_CAP
2080           The VM cap tunable
2081
2082       Sys::Virt::Domain::SCHEDULER_CPU_SHARES
2083           The CPU shares tunable
2084
2085       Sys::Virt::Domain::SCHEDULER_LIMIT
2086           The VM limit tunable
2087
2088       Sys::Virt::Domain::SCHEDULER_RESERVATION
2089           The VM reservation tunable
2090
2091       Sys::Virt::Domain::SCHEDULER_SHARES
2092           The VM shares tunable
2093
2094       Sys::Virt::Domain::SCHEDULER_VCPU_PERIOD
2095           The VCPU period tunable
2096
2097       Sys::Virt::Domain::SCHEDULER_VCPU_QUOTA
2098           The VCPU quota tunable
2099
2100       Sys::Virt::Domain::SCHEDULER_GLOBAL_PERIOD
2101           The VM global period tunable
2102
2103       Sys::Virt::Domain::SCHEDULER_GLOBAL_QUOTA
2104           The VM global quota tunable
2105
2106       Sys::Virt::Domain::SCHEDULER_WEIGHT
2107           The VM weight tunable
2108
2109   NUMA PARAMETERS
2110       The following constants are useful when getting/setting the guest NUMA
2111       memory policy
2112
2113       Sys::Virt::Domain::NUMA_MODE
2114           The NUMA policy mode
2115
2116       Sys::Virt::Domain::NUMA_NODESET
2117           The NUMA nodeset mask
2118
2119       The following constants are useful when interpreting the
2120       "Sys::Virt::Domain::NUMA_MODE" parameter value
2121
2122       Sys::Virt::Domain::NUMATUNE_MEM_STRICT
2123           Allocation is mandatory from the mask nodes
2124
2125       Sys::Virt::Domain::NUMATUNE_MEM_PREFERRED
2126           Allocation is preferred from the masked nodes
2127
2128       Sys::Virt::Domain::NUMATUNE_MEM_INTERLEAVE
2129           Allocation is interleaved across all masked nodes
2130
2131       Sys::Virt::Domain::NUMATUNE_MEM_RESTRICTIVE
2132           Allocation is determined by the host using the masked nodes.
2133
2134   INTERFACE PARAMETERS
2135       The following constants are useful when getting/setting the per network
2136       interface tunable parameters
2137
2138       Sys::Virt::Domain::BANDWIDTH_IN_AVERAGE
2139           The average inbound bandwidth
2140
2141       Sys::Virt::Domain::BANDWIDTH_IN_PEAK
2142           The peak inbound bandwidth
2143
2144       Sys::Virt::Domain::BANDWIDTH_IN_BURST
2145           The burstable inbound bandwidth
2146
2147       Sys::Virt::Domain::BANDWIDTH_IN_FLOOR
2148           The minimum inbound bandwidth
2149
2150       Sys::Virt::Domain::BANDWIDTH_OUT_AVERAGE
2151           The average outbound bandwidth
2152
2153       Sys::Virt::Domain::BANDWIDTH_OUT_PEAK
2154           The peak outbound bandwidth
2155
2156       Sys::Virt::Domain::BANDWIDTH_OUT_BURST
2157           The burstable outbound bandwidth
2158
2159   PERF EVENTS
2160       The following constants defined performance events which can be
2161       monitored for a guest
2162
2163       Sys::Virt::Domain::PERF_PARAM_CMT
2164           The CMT event counter which can be used to measure the usage of
2165           cache (bytes) by applications running on the platform. It
2166           corresponds to the "perf.cmt" field in the *Stats APIs.
2167
2168       Sys::Virt::Domain::PERF_PARAM_MBML
2169           The MBML event counter which can be used to monitor the amount of
2170           data (bytes/s) sent through the memory controller on the socket.
2171           It corresponds to the "perf.mbml" field in the *Stats APIs.
2172
2173       Sys::Virt::Domain::PERF_PARAM_MBMT
2174           The MBMT event counter which can be used to monitor total system
2175           bandwidth (bytes/s) from one level of cache to another. It
2176           corresponds to the "perf.mbmt" field in the *Stats APIs.
2177
2178       Sys::Virt::Domain::PERF_PARAM_CACHE_MISSES
2179           The cache_misses perf event counter which can be used to measure
2180           the count of cache misses by applications running on the platform.
2181           It corresponds to the "perf.cache_misses" field in the *Stats APIs.
2182
2183       Sys::Virt::Domain::PERF_PARAM_CACHE_REFERENCES
2184           The cache_references perf event counter which can be used to
2185           measure the count of cache hits by applications running on the
2186           platform. It corresponds to the "perf.cache_references" field in
2187           the *Stats APIs.
2188
2189       Sys::Virt::Domain::PERF_PARAM_CPU_CYCLES
2190           The cpu_cycles perf event counter which can be used to measure how
2191           many cpu cycles one instruction needs.  It corresponds to the
2192           "perf.cpu_cycles" field in the *Stats APIs.
2193
2194       Sys::Virt::Domain::PERF_PARAM_INSTRUCTIONS
2195           The instructions perf event counter which can be used to measure
2196           the count of instructions by applications running on the platform.
2197           It corresponds to the "perf.instructions" field in the *Stats APIs.
2198
2199       Sys::Virt::Domain::PERF_PARAM_BRANCH_INSTRUCTIONS
2200           The branch_instructions perf event counter which can be used to
2201           measure the count of instructions by applications running on the
2202           platform. It corresponds to the "perf.branch_instructions" field in
2203           the *Stats APIs.
2204
2205       Sys::Virt::Domain::PERF_PARAM_BRANCH_MISSES
2206           The branch_misses perf event which can be used to measure the count
2207           of branch misses by applications running on the platform.  It
2208           corresponds to the "perf.branch_misses" field in the *Stats APIs.
2209
2210       Sys::Virt::Domain::PERF_PARAM_BUS_CYCLES The bus_cycles perf event
2211       counter which can be used to measure the count of bus cycles by
2212       applications running on the platform. It corresponds to the
2213       "perf.bus_cycles" field in the *Stats APIs.
2214       Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_FRONTEND The
2215       stalled_cycles_frontend perf event counter which can be used to measure
2216       the count of stalled cpu cycles in the frontend of the instruction
2217       processor pipeline by applications running on the platform. It
2218       corresponds to the "perf.stalled_cycles_frontend" field in the *Stats
2219       APIs.
2220       Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_BACKEND The
2221       stalled_cycles_backend perf event counter which can be used to measure
2222       the count of stalled cpu cycles in the backend of the instruction
2223       processor pipeline by application running on the platform. It
2224       corresponds to the "perf.stalled_cycles_backend" field in the *Stats
2225       APIs.
2226       Sys::Virt::Domain::PERF_PARAM_REF_CPU_CYCLES The ref_cpu_cycles perf
2227       event counter which can be used to measure the count of total cpu
2228       cycles not affected by CPU frequency scaling by applications running on
2229       the platform. It corresponds to the "perf.ref_cpu_cycles" field in the
2230       *Stats APIs.
2231       Sys::Virt::Domain::PERF_PARAM_CPU_CLOCK The cpu_clock perf event
2232       counter which can be used to measure the count of cpu clock time by
2233       applications running on the platform. It corresponds to the
2234       "perf.cpu_clock" field in the *Stats APIs.
2235       Sys::Virt::Domain::PERF_PARAM_TASK_CLOCK The task_clock perf event
2236       counter which can be used to measure the count of task clock time by
2237       applications running on the platform. It corresponds to the
2238       "perf.task_clock" field in the *Stats APIs.
2239       Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS The page_faults perf event
2240       counter which can be used to measure the count of page faults by
2241       applications running on the platform. It corresponds to the
2242       "perf.page_faults" field in the *Stats APIs.
2243       Sys::Virt::Domain::PERF_PARAM_CONTEXT_SWITCHES The context_switches
2244       perf event counter which can be used to measure the count of context
2245       switches by applications running on the platform. It corresponds to the
2246       "perf.context_switches" field in the *Stats APIs.
2247       Sys::Virt::Domain::PERF_PARAM_CPU_MIGRATIONS The cpu_migrations perf
2248       event counter which can be used to measure the count of cpu migrations
2249       by applications running on the platform. It corresponds to the
2250       "perf.cpu_migrations" field in the *Stats APIs.
2251       Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MIN The page_faults_min perf
2252       event counter which can be used to measure the count of minor page
2253       faults by applications running on the platform. It corresponds to the
2254       "perf.page_faults_min" field in the *Stats APIs.
2255       Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MAJ The page_faults_maj perf
2256       event counter which can be used to measure the count of major page
2257       faults by applications running on the platform. It corresponds to the
2258       "perf.page_faults_maj" field in the *Stats APIs.
2259       Sys::Virt::Domain::PERF_PARAM_ALIGNMENT_FAULTS The alignment_faults
2260       perf event counter which can be used to measure the count of alignment
2261       faults by applications running on the platform. It corresponds to the
2262       "perf.alignment_faults" field in the *Stats APIs.
2263       Sys::Virt::Domain::PERF_PARAM_EMULATION_FAULTS The emulation_faults
2264       perf event counter which can be used to measure the count of emulation
2265       faults by applications running on the platform. It corresponds to the
2266       "perf.emulation_faults" field in the *Stats APIs.
2267
2268   IOTHREAD STATS
2269       The following constants defined IOThread statistics which can be
2270       monitored for a guest
2271
2272       Sys::Virt::Domain::IOTHREAD_PARAM_POLL_MAX_NS
2273           The maximum polling time that can be used by polling algorithm in
2274           ns.  The polling time starts at 0 (zero) and is the time spent by
2275           the guest to process IOThread data before returning the CPU to the
2276           host. The polling time will be dynamically modified over time based
2277           on the poll_grow and poll_shrink parameters provided.
2278
2279       Sys::Virt::Domain::IOTHREAD_PARAM_POLL_GROW
2280           This provides a value for the dynamic polling adjustment algorithm
2281           to use to grow its polling interval up to the poll_max_ns value.
2282
2283       Sys::Virt::Domain::IOTHREAD_PARAM_POLL_SHRINK
2284           This provides a value for the dynamic polling adjustment algorithm
2285           to use to shrink its polling interval when the polling interval
2286           exceeds the poll_max_ns value.
2287
2288   VCPU FLAGS
2289       The following constants are useful when getting/setting the VCPU count
2290       for a guest
2291
2292       Sys::Virt::Domain::VCPU_LIVE
2293           Flag to request the live value
2294
2295       Sys::Virt::Domain::VCPU_CONFIG
2296           Flag to request the persistent config value
2297
2298       Sys::Virt::Domain::VCPU_CURRENT
2299           Flag to request the current config value
2300
2301       Sys::Virt::Domain::VCPU_MAXIMUM
2302           Flag to request adjustment of the maximum vCPU value
2303
2304       Sys::Virt::Domain::VCPU_GUEST
2305           Flag to request the guest VCPU mask
2306
2307       Sys::Virt::Domain::VCPU_HOTPLUGGABLE
2308           Flag to make vcpus added hot(un)pluggable
2309
2310   STATE CHANGE EVENTS
2311       The following constants allow domain state change events to be
2312       interpreted. The events contain both a state change, and a reason.
2313
2314       Sys::Virt::Domain::EVENT_DEFINED
2315           Indicates that a persistent configuration has been defined for the
2316           domain.
2317
2318           Sys::Virt::Domain::EVENT_DEFINED_ADDED
2319               The defined configuration is newly added
2320
2321           Sys::Virt::Domain::EVENT_DEFINED_UPDATED
2322               The defined configuration is an update to an existing
2323               configuration
2324
2325           Sys::Virt::Domain::EVENT_DEFINED_RENAMED
2326               The defined configuration is a rename of an existing
2327               configuration
2328
2329           Sys::Virt::Domain::EVENT_DEFINED_FROM_SNAPSHOT
2330               The defined configuration was restored from a snapshot
2331
2332       Sys::Virt::Domain::EVENT_RESUMED
2333           The domain has resumed execution
2334
2335           Sys::Virt::Domain::EVENT_RESUMED_MIGRATED
2336               The domain resumed because migration has completed. This is
2337               emitted on the destination host.
2338
2339           Sys::Virt::Domain::EVENT_RESUMED_UNPAUSED
2340               The domain resumed because the admin unpaused it.
2341
2342           Sys::Virt::Domain::EVENT_RESUMED_FROM_SNAPSHOT
2343               The domain resumed because it was restored from a snapshot
2344
2345           Sys::Virt::Domain::EVENT_RESUMED_POSTCOPY
2346               The domain resumed but post-copy is running in background
2347
2348       Sys::Virt::Domain::EVENT_STARTED
2349           The domain has started running
2350
2351           Sys::Virt::Domain::EVENT_STARTED_BOOTED
2352               The domain was booted from shutoff state
2353
2354           Sys::Virt::Domain::EVENT_STARTED_MIGRATED
2355               The domain started due to an incoming migration
2356
2357           Sys::Virt::Domain::EVENT_STARTED_RESTORED
2358               The domain was restored from saved state file
2359
2360           Sys::Virt::Domain::EVENT_STARTED_FROM_SNAPSHOT
2361               The domain was restored from a snapshot
2362
2363           Sys::Virt::Domain::EVENT_STARTED_WAKEUP
2364               The domain was woken up from suspend
2365
2366       Sys::Virt::Domain::EVENT_STOPPED
2367           The domain has stopped running
2368
2369           Sys::Virt::Domain::EVENT_STOPPED_CRASHED
2370               The domain stopped because guest operating system has crashed
2371
2372           Sys::Virt::Domain::EVENT_STOPPED_DESTROYED
2373               The domain stopped because administrator issued a destroy
2374               command.
2375
2376           Sys::Virt::Domain::EVENT_STOPPED_FAILED
2377               The domain stopped because of a fault in the host
2378               virtualization environment.
2379
2380           Sys::Virt::Domain::EVENT_STOPPED_MIGRATED
2381               The domain stopped because it was migrated to another machine.
2382
2383           Sys::Virt::Domain::EVENT_STOPPED_SAVED
2384               The domain was saved to a state file
2385
2386           Sys::Virt::Domain::EVENT_STOPPED_SHUTDOWN
2387               The domain stopped due to graceful shutdown of the guest.
2388
2389           Sys::Virt::Domain::EVENT_STOPPED_FROM_SNAPSHOT
2390               The domain was stopped due to a snapshot
2391
2392       Sys::Virt::Domain::EVENT_SHUTDOWN
2393           The domain has shutdown but is not yet stopped
2394
2395           Sys::Virt::Domain::EVENT_SHUTDOWN_FINISHED
2396               The domain finished shutting down
2397
2398           Sys::Virt::Domain::EVENT_SHUTDOWN_HOST
2399               The domain shutdown due to host trigger
2400
2401           Sys::Virt::Domain::EVENT_SHUTDOWN_GUEST
2402               The domain shutdown due to guest trigger
2403
2404       Sys::Virt::Domain::EVENT_SUSPENDED
2405           The domain has stopped executing, but still exists
2406
2407           Sys::Virt::Domain::EVENT_SUSPENDED_MIGRATED
2408               The domain has been suspended due to offline migration
2409
2410           Sys::Virt::Domain::EVENT_SUSPENDED_PAUSED
2411               The domain has been suspended due to administrator pause
2412               request.
2413
2414           Sys::Virt::Domain::EVENT_SUSPENDED_IOERROR
2415               The domain has been suspended due to a block device I/O error.
2416
2417           Sys::Virt::Domain::EVENT_SUSPENDED_FROM_SNAPSHOT
2418               The domain has been suspended due to resume from snapshot
2419
2420           Sys::Virt::Domain::EVENT_SUSPENDED_WATCHDOG
2421               The domain has been suspended due to the watchdog triggering
2422
2423           Sys::Virt::Domain::EVENT_SUSPENDED_RESTORED
2424               The domain has been suspended due to restore from saved state
2425
2426           Sys::Virt::Domain::EVENT_SUSPENDED_API_ERROR
2427               The domain has been suspended due to an API error
2428
2429           Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY
2430               The domain has been suspended for post-copy migration
2431
2432           Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY_FAILED
2433               The domain has been suspended due post-copy migration failing
2434
2435       Sys::Virt::Domain::EVENT_UNDEFINED
2436           The persistent configuration has gone away
2437
2438           Sys::Virt::Domain::EVENT_UNDEFINED_REMOVED
2439               The domain configuration has gone away due to it being removed
2440               by administrator.
2441
2442           Sys::Virt::Domain::EVENT_UNDEFINED_RENAMED
2443               The undefined configuration is a rename of an existing
2444               configuration
2445
2446       Sys::Virt::Domain::EVENT_PMSUSPENDED
2447           The domain has stopped running
2448
2449           Sys::Virt::Domain::EVENT_PMSUSPENDED_MEMORY
2450               The domain has suspend to RAM.
2451
2452           Sys::Virt::Domain::EVENT_PMSUSPENDED_DISK
2453               The domain has suspend to Disk.
2454
2455       Sys::Virt::Domain::EVENT_CRASHED
2456           The domain has crashed
2457
2458           Sys::Virt::Domain::EVENT_CRASHED_PANICKED
2459               The domain has crashed due to a kernel panic
2460
2461           Sys::Virt::Domain::EVENT_CRASHED_CRASHLOADED
2462               The domain has crashed and reloaded itself
2463
2464   EVENT ID CONSTANTS
2465       Sys::Virt::Domain::EVENT_ID_LIFECYCLE
2466           Domain lifecycle events
2467
2468       Sys::Virt::Domain::EVENT_ID_REBOOT
2469           Soft / warm reboot events
2470
2471       Sys::Virt::Domain::EVENT_ID_RTC_CHANGE
2472           RTC clock adjustments
2473
2474       Sys::Virt::Domain::EVENT_ID_IO_ERROR
2475           File IO errors, typically from disks
2476
2477       Sys::Virt::Domain::EVENT_ID_WATCHDOG
2478           Watchdog device triggering
2479
2480       Sys::Virt::Domain::EVENT_ID_GRAPHICS
2481           Graphics client connections.
2482
2483       Sys::Virt::Domain::EVENT_ID_IO_ERROR_REASON
2484           File IO errors, typically from disks, with a root cause
2485
2486       Sys::Virt::Domain::EVENT_ID_CONTROL_ERROR
2487           Errors from the virtualization control channel
2488
2489       Sys::Virt::Domain::EVENT_ID_BLOCK_JOB
2490           Completion status of asynchronous block jobs, identified by source
2491           file name.
2492
2493       Sys::Virt::Domain::EVENT_ID_BLOCK_JOB_2
2494           Completion status of asynchronous block jobs, identified by target
2495           device name.
2496
2497       Sys::Virt::Domain::EVENT_ID_DISK_CHANGE
2498           Changes in disk media
2499
2500       Sys::Virt::Domain::EVENT_ID_TRAY_CHANGE
2501           CDROM media tray state
2502
2503       Sys::Virt::Domain::EVENT_ID_PMSUSPEND
2504           Power management initiated suspend to RAM
2505
2506       Sys::Virt::Domain::EVENT_ID_PMSUSPEND_DISK
2507           Power management initiated suspend to Disk
2508
2509       Sys::Virt::Domain::EVENT_ID_PMWAKEUP
2510           Power management initiated wakeup
2511
2512       Sys::Virt::Domain::EVENT_ID_BALLOON_CHANGE
2513           Balloon target changes
2514
2515       Sys::Virt::Domain::EVENT_ID_DEVICE_ADDED
2516           Asynchronous guest device addition
2517
2518       Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVED
2519           Asynchronous guest device removal
2520
2521       Sys::Virt::Domain::EVENT_ID_TUNABLE
2522           Changes of any domain tuning parameters. The callback will be
2523           provided with a hash listing all changed parameters.  The later
2524           DOMAIN TUNABLE constants can be useful when accessing the hash keys
2525
2526       Sys::Virt::Domain::EVENT_ID_AGENT_LIFECYCLE
2527           Domain guest agent lifecycle events. The "state" parameter to the
2528           callback will match one of the constants
2529
2530           Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_CONNECTED
2531               The agent is now connected
2532
2533           Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED
2534               The agent is now disconnected
2535
2536           The second parameter, "reason", matches one of the following
2537           constants
2538
2539       Sys::Virt::Domain::EVENT_ID_MIGRATION_ITERATION
2540           Domain migration progress iteration. The "iteration" parameter to
2541           the callback will specify the number of iterations migration has
2542           made over guest RAM.
2543
2544           Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN
2545               The reason is unknown
2546
2547           Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED
2548               The domain was initially booted
2549
2550           Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_CHANNEL
2551               The channel on a running guest changed state
2552
2553       Sys::Virt::Domain::EVENT_ID_JOB_COMPLETED
2554           Domain background job completion notification. The callback
2555           provides a hash containing the job stats. The keyus in the hash are
2556           the same as those used with the
2557           "Sys::Virt::Domain::get_job_stats()" method.
2558
2559       Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVAL_FAILED
2560           Guest device removal has failed.
2561
2562       Sys::Virt::Domain::EVENT_ID_METADATA_CHANGE
2563           The domain metadata has changed
2564
2565       Sys::Virt::Domain::EVENT_ID_BLOCK_THRESHOLD
2566           The event occurs when the hypervisor detects that the given storage
2567           element was written beyond the point specified by threshold. The
2568           event is useful for thin-provisioned storage.
2569
2570       Sys::Virt::Domain::EVENT_ID_MEMORY_FAILURE
2571           The event occurs when the hypervisor detects hardware memory
2572           corruption.
2573
2574       Sys::Virt::Domain::EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE
2575           The event occurs when the guest accepts a request to change the
2576           memory device size.
2577
2578   IO ERROR EVENT CONSTANTS
2579       These constants describe what action was taken due to the IO error.
2580
2581       Sys::Virt::Domain::EVENT_IO_ERROR_NONE
2582           No action was taken, the error was ignored & reported as success to
2583           guest
2584
2585       Sys::Virt::Domain::EVENT_IO_ERROR_PAUSE
2586           The guest is paused since the error occurred
2587
2588       Sys::Virt::Domain::EVENT_IO_ERROR_REPORT
2589           The error has been reported to the guest OS
2590
2591   WATCHDOG EVENT CONSTANTS
2592       These constants describe what action was taken due to the watchdog
2593       firing
2594
2595       Sys::Virt::Domain::EVENT_WATCHDOG_NONE
2596           No action was taken, the watchdog was ignored
2597
2598       Sys::Virt::Domain::EVENT_WATCHDOG_PAUSE
2599           The guest is paused since the watchdog fired
2600
2601       Sys::Virt::Domain::EVENT_WATCHDOG_POWEROFF
2602           The guest is powered off after the watchdog fired
2603
2604       Sys::Virt::Domain::EVENT_WATCHDOG_RESET
2605           The guest is reset after the watchdog fired
2606
2607       Sys::Virt::Domain::EVENT_WATCHDOG_SHUTDOWN
2608           The guest attempted to gracefully shutdown after the watchdog fired
2609
2610       Sys::Virt::Domain::EVENT_WATCHDOG_DEBUG
2611           No action was taken, the watchdog was logged
2612
2613       Sys::Virt::Domain::EVENT_WATCHDOG_INJECTNMI
2614           An NMI was injected into the guest after the watchdog fired
2615
2616   GRAPHICS EVENT PHASE CONSTANTS
2617       These constants describe the phase of the graphics connection
2618
2619       Sys::Virt::Domain::EVENT_GRAPHICS_CONNECT
2620           The initial client connection
2621
2622       Sys::Virt::Domain::EVENT_GRAPHICS_INITIALIZE
2623           The client has been authenticated & the connection is running
2624
2625       Sys::Virt::Domain::EVENT_GRAPHICS_DISCONNECT
2626           The client has disconnected
2627
2628   GRAPHICS EVENT ADDRESS CONSTANTS
2629       These constants describe the format of the address
2630
2631       Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV4
2632           An IPv4 address
2633
2634       Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV6
2635           An IPv6 address
2636
2637       Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_UNIX
2638           An UNIX socket path address
2639
2640   DISK CHANGE EVENT CONSTANTS
2641       These constants describe the reason for a disk change event
2642
2643       Sys::Virt::Domain::EVENT_DISK_CHANGE_MISSING_ON_START
2644           The disk media was cleared, as its source was missing when
2645           attempting to start the guest
2646
2647       Sys::Virt::Domain::EVENT_DISK_DROP_MISSING_ON_START
2648           The disk device was dropped, as its source was missing when
2649           attempting to start the guest
2650
2651   TRAY CHANGE CONSTANTS
2652       These constants describe the reason for a tray change event
2653
2654       Sys::Virt::Domain::EVENT_TRAY_CHANGE_CLOSE
2655           The tray was closed
2656
2657       Sys::Virt::Domain::EVENT_TRAY_CHANGE_OPEN
2658           The tray was opened
2659
2660   DOMAIN BLOCK JOB TYPE CONSTANTS
2661       The following constants identify the different types of domain block
2662       jobs
2663
2664       Sys::Virt::Domain::BLOCK_JOB_TYPE_UNKNOWN
2665           An unknown block job type
2666
2667       Sys::Virt::Domain::BLOCK_JOB_TYPE_PULL
2668           The block pull job type
2669
2670       Sys::Virt::Domain::BLOCK_JOB_TYPE_COPY
2671           The block copy job type
2672
2673       Sys::Virt::Domain::BLOCK_JOB_TYPE_COMMIT
2674           The block commit job type
2675
2676       Sys::Virt::Domain::BLOCK_JOB_TYPE_ACTIVE_COMMIT
2677           The block active commit job type
2678
2679       Sys::Virt::Domain::BLOCK_JOB_TYPE_BACKUP
2680           The block backup job type
2681
2682   DOMAIN BLOCK JOB COMPLETION CONSTANTS
2683       The following constants can be used to determine the completion status
2684       of a block job
2685
2686       Sys::Virt::Domain::BLOCK_JOB_COMPLETED
2687           A successfully completed block job
2688
2689       Sys::Virt::Domain::BLOCK_JOB_FAILED
2690           An unsuccessful block job
2691
2692       Sys::Virt::Domain::BLOCK_JOB_CANCELED
2693           A block job canceled byy the user
2694
2695       Sys::Virt::Domain::BLOCK_JOB_READY
2696           A block job is running
2697
2698   DOMAIN BLOCK REBASE CONSTANTS
2699       The following constants are useful when rebasing block devices
2700
2701       Sys::Virt::Domain::BLOCK_REBASE_SHALLOW
2702           Limit copy to top of source backing chain
2703
2704       Sys::Virt::Domain::BLOCK_REBASE_REUSE_EXT
2705           Reuse existing external file for copy
2706
2707       Sys::Virt::Domain::BLOCK_REBASE_COPY_RAW
2708           Make destination file raw
2709
2710       Sys::Virt::Domain::BLOCK_REBASE_COPY
2711           Start a copy job
2712
2713       Sys::Virt::Domain::BLOCK_REBASE_COPY_DEV
2714           Treat destination as a block device instead of file
2715
2716       Sys::Virt::Domain::BLOCK_REBASE_RELATIVE
2717           Keep backing chain referenced using relative names
2718
2719   DOMAIN BLOCK COPY CONSTANTS
2720       The following constants are useful when copying block devices
2721
2722       Sys::Virt::Domain::BLOCK_COPY_SHALLOW
2723           Limit copy to top of source backing chain
2724
2725       Sys::Virt::Domain::BLOCK_COPY_REUSE_EXT
2726           Reuse existing external file for copy
2727
2728       Sys::Virt::Domain::BLOCK_COPY_TRANSIENT_JOB
2729           Don't force usage of recoverable job for the copy operation
2730
2731       Sys::Virt::Domain::BLOCK_COPY_SYNCHRONOUS_WRITES
2732           Force the copy job to synchronously propagate guest writes into the
2733           destination image, so that the copy is guaranteed to converge
2734
2735   DOMAIN BLOCK JOB ABORT CONSTANTS
2736       The following constants are useful when aborting job copy jobs
2737
2738       Sys::Virt::Domain::BLOCK_JOB_ABORT_ASYNC
2739           Request only, do not wait for completion
2740
2741       Sys::Virt::Domain::BLOCK_JOB_ABORT_PIVOT
2742           Pivot to mirror when ending a copy job
2743
2744   DOMAIN BLOCK COMMIT JOB CONSTANTS
2745       The following constants are useful with block commit job types
2746
2747       Sys::Virt::Domain::BLOCK_COMMIT_DELETE
2748           Delete any files that are invalid after commit
2749
2750       Sys::Virt::Domain::BLOCK_COMMIT_SHALLOW
2751           NULL base means next backing file, not whole chain
2752
2753       Sys::Virt::Domain::BLOCK_COMMIT_ACTIVE
2754           Allow two phase commit when top is active layer
2755
2756       Sys::Virt::Domain::BLOCK_COMMIT_RELATIVE
2757           Keep backing chain referenced using relative names
2758
2759   DOMAIN SAVE / RESTORE CONSTANTS
2760       The following constants can be used when saving or restoring virtual
2761       machines
2762
2763       Sys::Virt::Domain::SAVE_BYPASS_CACHE
2764           Do not use OS I/O cache when saving state.
2765
2766       Sys::Virt::Domain::SAVE_PAUSED
2767           Mark the saved state as paused to prevent the guest CPUs starting
2768           upon restore.
2769
2770       Sys::Virt::Domain::SAVE_RUNNING
2771           Mark the saved state as running to allow the guest CPUs to start
2772           upon restore.
2773
2774   DOMAIN CORE DUMP CONSTANTS
2775       The following constants can be used when triggering domain core dumps
2776
2777       Sys::Virt::Domain::DUMP_LIVE
2778           Do not pause execution while dumping the guest
2779
2780       Sys::Virt::Domain::DUMP_CRASH
2781           Crash the guest after completing the core dump
2782
2783       Sys::Virt::Domain::DUMP_BYPASS_CACHE
2784           Do not use OS I/O cache when writing core dump
2785
2786       Sys::Virt::Domain::DUMP_RESET
2787           Reset the virtual machine after finishing the dump
2788
2789       Sys::Virt::Domain::DUMP_MEMORY_ONLY
2790           Only include guest RAM in the dump, not the device state
2791
2792   DESTROY CONSTANTS
2793       The following constants are useful when terminating guests using the
2794       "destroy" API.
2795
2796       Sys::Virt::Domain::DESTROY_DEFAULT
2797           Destroy the guest using the default approach
2798
2799       Sys::Virt::Domain::DESTROY_GRACEFUL
2800           Destroy the guest in a graceful manner
2801
2802   SHUTDOWN CONSTANTS
2803       The following constants are useful when requesting that a guest
2804       terminate using the "shutdown" API
2805
2806       Sys::Virt::Domain::SHUTDOWN_DEFAULT
2807           Shutdown using the hypervisor's default mechanism
2808
2809       Sys::Virt::Domain::SHUTDOWN_GUEST_AGENT
2810           Shutdown by issuing a command to a guest agent
2811
2812       Sys::Virt::Domain::SHUTDOWN_ACPI_POWER_BTN
2813           Shutdown by injecting an ACPI power button press
2814
2815       Sys::Virt::Domain::SHUTDOWN_INITCTL
2816           Shutdown by talking to initctl (containers only)
2817
2818       Sys::Virt::Domain::SHUTDOWN_SIGNAL
2819           Shutdown by sending SIGTERM to the init process
2820
2821       Sys::Virt::Domain::SHUTDOWN_PARAVIRT
2822           Shutdown by issuing a paravirt power control command
2823
2824   REBOOT CONSTANTS
2825       The following constants are useful when requesting that a guest
2826       terminate using the "reboot" API
2827
2828       Sys::Virt::Domain::REBOOT_DEFAULT
2829           Reboot using the hypervisor's default mechanism
2830
2831       Sys::Virt::Domain::REBOOT_GUEST_AGENT
2832           Reboot by issuing a command to a guest agent
2833
2834       Sys::Virt::Domain::REBOOT_ACPI_POWER_BTN
2835           Reboot by injecting an ACPI power button press
2836
2837       Sys::Virt::Domain::REBOOT_INITCTL
2838           Reboot by talking to initctl (containers only)
2839
2840       Sys::Virt::Domain::REBOOT_SIGNAL
2841           Reboot by sending SIGHUP to the init process
2842
2843       Sys::Virt::Domain::REBOOT_PARAVIRT
2844           Reboot by issuing a paravirt power control command
2845
2846   METADATA CONSTANTS
2847       The following constants are useful when reading/writing metadata about
2848       a guest
2849
2850       Sys::Virt::Domain::METADATA_TITLE
2851           The short human friendly title of the guest
2852
2853       Sys::Virt::Domain::METADATA_DESCRIPTION
2854           The long free text description of the guest
2855
2856       Sys::Virt::Domain::METADATA_ELEMENT
2857           The structured metadata elements for the guest
2858
2859   DISK ERROR CONSTANTS
2860       The following constants are useful when interpreting disk error codes
2861
2862       Sys::Virt::Domain::DISK_ERROR_NONE
2863           No error
2864
2865       Sys::Virt::Domain::DISK_ERROR_NO_SPACE
2866           The host storage has run out of free space
2867
2868       Sys::Virt::Domain::DISK_ERROR_UNSPEC
2869           An unspecified error has occurred.
2870
2871   MEMORY STATISTIC CONSTANTS
2872       Sys::Virt::Domain::MEMORY_STAT_SWAP_IN
2873           Swap in
2874
2875       Sys::Virt::Domain::MEMORY_STAT_SWAP_OUT
2876           Swap out
2877
2878       Sys::Virt::Domain::MEMORY_STAT_MINOR_FAULT
2879           Minor faults
2880
2881       Sys::Virt::Domain::MEMORY_STAT_MAJOR_FAULT
2882           Major faults
2883
2884       Sys::Virt::Domain::MEMORY_STAT_RSS
2885           Resident memory
2886
2887       Sys::Virt::Domain::MEMORY_STAT_UNUSED
2888           Unused memory
2889
2890       Sys::Virt::Domain::MEMORY_STAT_AVAILABLE
2891           Available memory
2892
2893       Sys::Virt::Domain::MEMORY_STAT_ACTUAL_BALLOON
2894           Actual balloon limit
2895
2896       Sys::Virt::Domain::MEMORY_STAT_USABLE
2897           Amount of usable memory
2898
2899       Sys::Virt::Domain::MEMORY_STAT_LAST_UPDATE
2900           Time of last stats refresh from guest
2901
2902       Sys::Virt::Domain::MEMORY_STAT_DISK_CACHES
2903           Disk cache size
2904
2905       Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGALLOC
2906           The amount of successful huge page allocations
2907
2908       Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGFAIL
2909           The amount of failed huge page allocations
2910
2911   DOMAIN LIST CONSTANTS
2912       The following constants can be used when listing domains
2913
2914       Sys::Virt::Domain::LIST_ACTIVE
2915           Only list domains that are currently active (running, or paused)
2916
2917       Sys::Virt::Domain::LIST_AUTOSTART
2918           Only list domains that are set to automatically start on boot
2919
2920       Sys::Virt::Domain::LIST_HAS_SNAPSHOT
2921           Only list domains that have a stored snapshot
2922
2923       Sys::Virt::Domain::LIST_INACTIVE
2924           Only list domains that are currently inactive (shutoff, saved)
2925
2926       Sys::Virt::Domain::LIST_MANAGEDSAVE
2927           Only list domains that have current managed save state
2928
2929       Sys::Virt::Domain::LIST_NO_AUTOSTART
2930           Only list domains that are not set to automatically start on boto
2931
2932       Sys::Virt::Domain::LIST_NO_MANAGEDSAVE
2933           Only list domains that do not have any managed save state
2934
2935       Sys::Virt::Domain::LIST_NO_SNAPSHOT
2936           Only list domains that do not have a stored snapshot
2937
2938       Sys::Virt::Domain::LIST_OTHER
2939           Only list domains that are not running, paused or shutoff
2940
2941       Sys::Virt::Domain::LIST_PAUSED
2942           Only list domains that are paused
2943
2944       Sys::Virt::Domain::LIST_PERSISTENT
2945           Only list domains which have a persistent config
2946
2947       Sys::Virt::Domain::LIST_RUNNING
2948           Only list domains that are currently running
2949
2950       Sys::Virt::Domain::LIST_SHUTOFF
2951           Only list domains that are currently shutoff
2952
2953       Sys::Virt::Domain::LIST_TRANSIENT
2954           Only list domains that do not have a persistent config
2955
2956       Sys::Virt::Domain::LIST_HAS_CHECKPOINT
2957           Only list domains that have a stored checkpoint
2958
2959       Sys::Virt::Domain::LIST_NO_CHECKPOINT
2960           Only list domains that do not have a stored checkpoint
2961
2962   SEND KEY CONSTANTS
2963       The following constants are to be used with the "send_key" API
2964
2965       Sys::Virt::Domain::SEND_KEY_MAX_KEYS
2966           The maximum number of keys that can be sent in a single call to
2967           "send_key"
2968
2969   BLOCK STATS CONSTANTS
2970       The following constants provide the names of well known block stats
2971       fields
2972
2973       Sys::Virt::Domain::BLOCK_STATS_ERRS
2974           The number of I/O errors
2975
2976       Sys::Virt::Domain::BLOCK_STATS_FLUSH_REQ
2977           The number of flush requests
2978
2979       Sys::Virt::Domain::BLOCK_STATS_FLUSH_TOTAL_TIMES
2980           The time spent processing flush requests
2981
2982       Sys::Virt::Domain::BLOCK_STATS_READ_BYTES
2983           The amount of data read
2984
2985       Sys::Virt::Domain::BLOCK_STATS_READ_REQ
2986           The number of read requests
2987
2988       Sys::Virt::Domain::BLOCK_STATS_READ_TOTAL_TIMES
2989           The time spent processing read requests
2990
2991       Sys::Virt::Domain::BLOCK_STATS_WRITE_BYTES
2992           The amount of data written
2993
2994       Sys::Virt::Domain::BLOCK_STATS_WRITE_REQ
2995           The number of write requests
2996
2997       Sys::Virt::Domain::BLOCK_STATS_WRITE_TOTAL_TIMES
2998           The time spent processing write requests
2999
3000   CPU STATS CONSTANTS
3001       The following constants provide the names of well known cpu stats
3002       fields
3003
3004       Sys::Virt::Domain::CPU_STATS_CPUTIME
3005           The total CPU time, including both hypervisor and vCPU time.
3006
3007       Sys::Virt::Domain::CPU_STATS_USERTIME
3008           THe total time in kernel
3009
3010       Sys::Virt::Domain::CPU_STATS_SYSTEMTIME
3011           The total time in userspace
3012
3013       Sys::Virt::Domain::CPU_STATS_VCPUTIME
3014           The total vCPU time.
3015
3016   CPU STATS CONSTANTS
3017       The following constants provide the names of well known schedular
3018       parameters
3019
3020       Sys::Virt::SCHEDULER_EMULATOR_PERIOD
3021           The duration of the time period for scheduling the emulator
3022
3023       Sys::Virt::SCHEDULER_EMULATOR_QUOTA
3024           The quota for the emulator in one schedular time period
3025
3026       Sys::Virt::SCHEDULER_IOTHREAD_PERIOD
3027           The duration of the time period for scheduling the iothread
3028
3029       Sys::Virt::SCHEDULER_IOTHREAD_QUOTA
3030           The quota for the iothread in one schedular time period
3031
3032   DOMAIN STATS FLAG CONSTANTS
3033       The following constants are used as flags when requesting bulk domain
3034       stats from "Sys::Virt::get_all_domain_stats".
3035
3036       Sys::Virt::Domain::GET_ALL_STATS_ACTIVE
3037           Include stats for active domains
3038
3039       Sys::Virt::Domain::GET_ALL_STATS_INACTIVE
3040           Include stats for inactive domains
3041
3042       Sys::Virt::Domain::GET_ALL_STATS_OTHER
3043           Include stats for other domains
3044
3045       Sys::Virt::Domain::GET_ALL_STATS_PAUSED
3046           Include stats for paused domains
3047
3048       Sys::Virt::Domain::GET_ALL_STATS_PERSISTENT
3049           Include stats for persistent domains
3050
3051       Sys::Virt::Domain::GET_ALL_STATS_RUNNING
3052           Include stats for running domains
3053
3054       Sys::Virt::Domain::GET_ALL_STATS_SHUTOFF
3055           Include stats for shutoff domains
3056
3057       Sys::Virt::Domain::GET_ALL_STATS_TRANSIENT
3058           Include stats for transient domains
3059
3060       Sys::Virt::Domain::GET_ALL_STATS_ENFORCE_STATS
3061           Require that all requested stats fields are returned
3062
3063       Sys::Virt::Domain::GET_ALL_STATS_BACKING
3064           Get stats for image backing files too
3065
3066       Sys::Virt::Domain::GET_ALL_STATS_NOWAIT
3067           Skip stats if they can't be acquired without waiting
3068
3069   DOMAIN STATS FIELD CONSTANTS
3070       The following constants are used to control which fields are returned
3071       for stats queries.
3072
3073       Sys::Virt::Domain::STATS_BALLOON
3074           Balloon statistics
3075
3076       Sys::Virt::Domain::STATS_BLOCK
3077           Block device info
3078
3079       Sys::Virt::Domain::STATS_CPU_TOTAL
3080           CPU usage info
3081
3082       Sys::Virt::Domain::STATS_INTERFACE
3083           Network interface info
3084
3085       Sys::Virt::Domain::STATS_STATE
3086           General lifecycle state
3087
3088       Sys::Virt::Domain::STATS_VCPU
3089           Virtual CPU info
3090
3091       Sys::Virt::Domain::STATS_PERF
3092           Performance event counter values
3093
3094       Sys::Virt::Domain::STATS_IOTHREAD
3095           IOThread performance statistics values
3096
3097       Sys::Virt::Domain::STATS_MEMORY
3098           Memory bandwidth statistics values
3099
3100       Sys::Virt::Domain::STATS_DIRTYRATE
3101           Memory dirty rate statistics
3102
3103   PROCESS SIGNALS
3104       The following constants provide the names of signals which can be sent
3105       to guest processes. They mostly correspond to POSIX signal names.
3106
3107       Sys::Virt::Domain::PROCESS_SIGNAL_NOP
3108           SIGNOP
3109
3110       Sys::Virt::Domain::PROCESS_SIGNAL_HUP
3111           SIGHUP
3112
3113       Sys::Virt::Domain::PROCESS_SIGNAL_INT
3114           SIGINT
3115
3116       Sys::Virt::Domain::PROCESS_SIGNAL_QUIT
3117           SIGQUIT
3118
3119       Sys::Virt::Domain::PROCESS_SIGNAL_ILL
3120           SIGILL
3121
3122       Sys::Virt::Domain::PROCESS_SIGNAL_TRAP
3123           SIGTRAP
3124
3125       Sys::Virt::Domain::PROCESS_SIGNAL_ABRT
3126           SIGABRT
3127
3128       Sys::Virt::Domain::PROCESS_SIGNAL_BUS
3129           SIGBUS
3130
3131       Sys::Virt::Domain::PROCESS_SIGNAL_FPE
3132           SIGFPE
3133
3134       Sys::Virt::Domain::PROCESS_SIGNAL_KILL
3135           SIGKILL
3136
3137       Sys::Virt::Domain::PROCESS_SIGNAL_USR1
3138           SIGUSR1
3139
3140       Sys::Virt::Domain::PROCESS_SIGNAL_SEGV
3141           SIGSEGV
3142
3143       Sys::Virt::Domain::PROCESS_SIGNAL_USR2
3144           SIGUSR2
3145
3146       Sys::Virt::Domain::PROCESS_SIGNAL_PIPE
3147           SIGPIPE
3148
3149       Sys::Virt::Domain::PROCESS_SIGNAL_ALRM
3150           SIGALRM
3151
3152       Sys::Virt::Domain::PROCESS_SIGNAL_TERM
3153           SIGTERM
3154
3155       Sys::Virt::Domain::PROCESS_SIGNAL_STKFLT
3156           SIGSTKFLT
3157
3158       Sys::Virt::Domain::PROCESS_SIGNAL_CHLD
3159           SIGCHLD
3160
3161       Sys::Virt::Domain::PROCESS_SIGNAL_CONT
3162           SIGCONT
3163
3164       Sys::Virt::Domain::PROCESS_SIGNAL_STOP
3165           SIGSTOP
3166
3167       Sys::Virt::Domain::PROCESS_SIGNAL_TSTP
3168           SIGTSTP
3169
3170       Sys::Virt::Domain::PROCESS_SIGNAL_TTIN
3171           SIGTTIN
3172
3173       Sys::Virt::Domain::PROCESS_SIGNAL_TTOU
3174           SIGTTOU
3175
3176       Sys::Virt::Domain::PROCESS_SIGNAL_URG
3177           SIGURG
3178
3179       Sys::Virt::Domain::PROCESS_SIGNAL_XCPU
3180           SIGXCPU
3181
3182       Sys::Virt::Domain::PROCESS_SIGNAL_XFSZ
3183           SIGXFSZ
3184
3185       Sys::Virt::Domain::PROCESS_SIGNAL_VTALRM
3186           SIGVTALRM
3187
3188       Sys::Virt::Domain::PROCESS_SIGNAL_PROF
3189           SIGPROF
3190
3191       Sys::Virt::Domain::PROCESS_SIGNAL_WINCH
3192           SIGWINCH
3193
3194       Sys::Virt::Domain::PROCESS_SIGNAL_POLL
3195           SIGPOLL
3196
3197       Sys::Virt::Domain::PROCESS_SIGNAL_PWR
3198           SIGPWR
3199
3200       Sys::Virt::Domain::PROCESS_SIGNAL_SYS
3201           SIGSYS
3202
3203       Sys::Virt::Domain::PROCESS_SIGNAL_RT0
3204           SIGRT0
3205
3206       Sys::Virt::Domain::PROCESS_SIGNAL_RT1
3207           SIGRT1
3208
3209       Sys::Virt::Domain::PROCESS_SIGNAL_RT2
3210           SIGRT2
3211
3212       Sys::Virt::Domain::PROCESS_SIGNAL_RT3
3213           SIGRT3
3214
3215       Sys::Virt::Domain::PROCESS_SIGNAL_RT4
3216           SIGRT4
3217
3218       Sys::Virt::Domain::PROCESS_SIGNAL_RT5
3219           SIGRT5
3220
3221       Sys::Virt::Domain::PROCESS_SIGNAL_RT6
3222           SIGRT6
3223
3224       Sys::Virt::Domain::PROCESS_SIGNAL_RT7
3225           SIGRT7
3226
3227       Sys::Virt::Domain::PROCESS_SIGNAL_RT8
3228           SIGRT8
3229
3230       Sys::Virt::Domain::PROCESS_SIGNAL_RT9
3231           SIGRT9
3232
3233       Sys::Virt::Domain::PROCESS_SIGNAL_RT10
3234           SIGRT10
3235
3236       Sys::Virt::Domain::PROCESS_SIGNAL_RT11
3237           SIGRT11
3238
3239       Sys::Virt::Domain::PROCESS_SIGNAL_RT12
3240           SIGRT12
3241
3242       Sys::Virt::Domain::PROCESS_SIGNAL_RT13
3243           SIGRT13
3244
3245       Sys::Virt::Domain::PROCESS_SIGNAL_RT14
3246           SIGRT14
3247
3248       Sys::Virt::Domain::PROCESS_SIGNAL_RT15
3249           SIGRT15
3250
3251       Sys::Virt::Domain::PROCESS_SIGNAL_RT16
3252           SIGRT16
3253
3254       Sys::Virt::Domain::PROCESS_SIGNAL_RT17
3255           SIGRT17
3256
3257       Sys::Virt::Domain::PROCESS_SIGNAL_RT18
3258           SIGRT18
3259
3260       Sys::Virt::Domain::PROCESS_SIGNAL_RT19
3261           SIGRT19
3262
3263       Sys::Virt::Domain::PROCESS_SIGNAL_RT20
3264           SIGRT20
3265
3266       Sys::Virt::Domain::PROCESS_SIGNAL_RT21
3267           SIGRT21
3268
3269       Sys::Virt::Domain::PROCESS_SIGNAL_RT22
3270           SIGRT22
3271
3272       Sys::Virt::Domain::PROCESS_SIGNAL_RT23
3273           SIGRT23
3274
3275       Sys::Virt::Domain::PROCESS_SIGNAL_RT24
3276           SIGRT24
3277
3278       Sys::Virt::Domain::PROCESS_SIGNAL_RT25
3279           SIGRT25
3280
3281       Sys::Virt::Domain::PROCESS_SIGNAL_RT26
3282           SIGRT26
3283
3284       Sys::Virt::Domain::PROCESS_SIGNAL_RT27
3285           SIGRT27
3286
3287       Sys::Virt::Domain::PROCESS_SIGNAL_RT28
3288           SIGRT28
3289
3290       Sys::Virt::Domain::PROCESS_SIGNAL_RT29
3291           SIGRT29
3292
3293       Sys::Virt::Domain::PROCESS_SIGNAL_RT30
3294           SIGRT30
3295
3296       Sys::Virt::Domain::PROCESS_SIGNAL_RT31
3297           SIGRT31
3298
3299       Sys::Virt::Domain::PROCESS_SIGNAL_RT32
3300           SIGRT32
3301
3302   DOMAIN TUNABLE CONSTANTS
3303       The following constants are useful when accessing domain tuning
3304       parameters in APIs and events
3305
3306       Sys::Virt::Domain::TUNABLE_CPU_CPU_SHARES
3307           Proportional CPU weight
3308
3309       Sys::Virt::Domain::TUNABLE_CPU_EMULATORPIN
3310           Emulator thread CPU pinning mask
3311
3312       Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_PERIOD
3313           Emulator thread CPU period
3314
3315       Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_QUOTA
3316           Emulator thread CPU quota
3317
3318       Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_PERIOD
3319           Iothread thread CPU period
3320
3321       Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_QUOTA
3322           Iothread thread CPU quota
3323
3324       Sys::Virt::Domain::TUNABLE_CPU_VCPUPIN
3325           VCPU thread pinning mask
3326
3327       Sys::Virt::Domain::TUNABLE_CPU_VCPU_PERIOD
3328           VCPU thread period
3329
3330       Sys::Virt::Domain::TUNABLE_CPU_VCPU_QUOTA
3331           VCPU thread quota
3332
3333       Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_PERIOD
3334           VM global period
3335
3336       Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_QUOTA
3337           VM global quota
3338
3339       Sys::Virt::Domain::TUNABLE_BLKDEV_DISK
3340           The name of guest disks
3341
3342       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC
3343           Read throughput in bytes per sec
3344
3345       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC
3346           Read throughput in I/O operations per sec
3347
3348       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC
3349           Total throughput in bytes per sec
3350
3351       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC
3352           Total throughput in I/O operations per sec
3353
3354       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC
3355           Write throughput in bytes per sec
3356
3357       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC
3358           Write throughput in I/O operations per sec
3359
3360       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX
3361           Maximum read throughput in bytes per sec
3362
3363       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX
3364           Maximum read throughput in I/O operations per sec
3365
3366       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX
3367           Maximum total throughput in bytes per sec
3368
3369       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX
3370           Maximum total throughput in I/O operations per sec
3371
3372       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX
3373           Maximum write throughput in bytes per sec
3374
3375       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX
3376           Maximum write throughput in I/O operations per sec
3377
3378       Sys::Virt::Domain::TUNABLE_BLKDEV_SIZE_IOPS_SEC
3379           The maximum I/O operations per second
3380
3381       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX_LENGTH
3382           The duration in seconds allowed for maximum total bytes processed
3383           per second.
3384
3385       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX_LENGTH
3386           The duration in seconds allowed for maximum bytes read per second.
3387
3388       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX_LENGTH
3389           The duration in seconds allowed for maximum bytes written per
3390           second.
3391
3392       Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX_LENGTH
3393           The duration in seconds allowed for maximum total I/O operations
3394           processed per second.
3395
3396       Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX_LENGTH
3397           The duration in seconds allowed for maximum I/O operations read per
3398           second.
3399
3400       Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX_LENGTH
3401           The duration in seconds allowed for maximum I/O operations written
3402           per second.
3403
3404       Sys::Virt::Domain::TUNABLE_BLKDEV_GROUP_NAME
3405           The name of the blkdev group
3406
3407       Sys::Virt::Domain::TUNABLE_IOTHREADSPIN
3408           The I/O threads pinning
3409
3410   DOMAIN LIFECYCLE CONSTANTS
3411       The following constants are useful when setting action for lifecycle
3412       events.
3413
3414       Sys::Virt::Domain::LIFECYCLE_POWEROFF
3415           The poweroff lifecycle event type
3416
3417       Sys::Virt::Domain::LIFECYCLE_REBOOT
3418           The reboot lifecycle event type
3419
3420       Sys::Virt::Domain::LIFECYCLE_CRASH
3421           The crash lifecycle event type
3422
3423   DOMAIN LIFECYCLE ACTION CONSTANTS
3424       Sys::Virt::Domain::LIFECYCLE_ACTION_DESTROY
3425           The destroy lifecycle action
3426
3427       Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART
3428           The restart lifecycle action
3429
3430       Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART_RENAME
3431           The restart-rename lifecycle action
3432
3433       Sys::Virt::Domain::LIFECYCLE_ACTION_PRESERVE
3434           The preserve lifecycle action
3435
3436       Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_DESTROY
3437           The coredump-destroy lifecycle action
3438
3439       Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_RESTART
3440           The coredump-restart lifecycle action
3441
3442   MEMORY FAILURE ACTION CONSTANTS
3443       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_IGNORE
3444           The failure could be ignored
3445
3446       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_INJECT
3447           An MCE was injected to the guest
3448
3449       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_FATAL
3450           The failure is non-recoverable and the hypervisor was not able to
3451           handle it
3452
3453       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_RESET
3454           The failure is non-recoverable and the guest was not able to handle
3455           it.
3456
3457   MEMORY FAILURE RECIPIENT CONSTANTS
3458       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_RECIPIENT_HYPERVISOR
3459           The memory failure was in hypervisor address space
3460
3461       Sys::Virt::Domain::EVENT_MEMORY_FAILURE_RECIPIENT_GUEST
3462           The memory failure was in guest address space
3463
3464   MEMORY FAILURE FLAG CONSTANTS
3465       Sys::Virt::Domain::MEMORY_FAILURE_ACTION_REQUIRED
3466           Whether the flag is action-required or action-optional
3467
3468       Sys::Virt::Domain::MEMORY_FAILURE_RECURSIVE
3469           The failure occurred while the previous fault was being handled.
3470
3471   MEMORY DIRTY RATE STATUS CONSTANTS
3472       Sys::Virt::Domain::DIRTYRATE_UNSTARTED
3473           The dirty rate is not being measured currently.
3474
3475       Sys::Virt::Domain::DIRTYRATE_MEASURING
3476           The dity rate is in the process of being measured
3477
3478       Sys::Virt::Domain::DIRTYRATE_MEASURED
3479           The dirty rate has been measured
3480

AUTHORS

3482       Daniel P. Berrange <berrange@redhat.com>
3483
3485       Copyright (C) 2006 Red Hat Copyright (C) 2006-2007 Daniel P. Berrange
3486

LICENSE

3488       This program is free software; you can redistribute it and/or modify it
3489       under the terms of either the GNU General Public License as published
3490       by the Free Software Foundation (either version 2 of the License, or at
3491       your option any later version), or, the Artistic License, as specified
3492       in the Perl README file.
3493

SEE ALSO

3495       Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
3496
3497
3498
3499perl v5.34.0                      2022-01-21              Sys::Virt::Domain(3)
Impressum