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       $info = $dom->get_guest_info($types, $flags=0)
1490           Get information about the domain guest configuration. The $types
1491           parameter determines what pieces of information are returned and
1492           should be the bitwise or of the following constants:
1493
1494           Sys::Virt::Domain::GUEST_INFO_USERS
1495               Active user information
1496
1497           Sys::Virt::Domain::GUEST_INFO_OS
1498               Misc operating system information
1499
1500           Sys::Virt::Domain::GUEST_INFO_TIMEZONE
1501               The guest timezone
1502
1503           Sys::Virt::Domain::GUEST_INFO_HOSTNAME
1504               The guest hostname
1505
1506           Sys::Virt::Domain::GUEST_INFO_FILESYSTEM
1507               Filesystem mount information
1508
1509           Sys::Virt::Domain::GUEST_INFO_DISKS
1510               Block device information
1511
1512           $flags is currently unused and defaults to zero.
1513
1514       $dom->set_agent_response_timeout($timeout, $flags=0)
1515           Set the amount of time to wait for the agent to respond to a
1516           command. $timeout is a positive integer representing the number of
1517           seconds to wait, or one of the constants:
1518
1519           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_BLOCK
1520               Wait forever with no timeout
1521
1522           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_NOWAIT
1523               Don't want at all, return immediately
1524
1525           Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_DEFAULT
1526               Use the hypervisor driver's default timeout
1527
1528           The $flags parameter is currently unused and defaults to zero.
1529
1530       my @keys = $dom->authorized_ssh_keys_get($user, $flags=0)
1531           Retrieve the list of authorized SSH keys for the user account
1532           $user.  The $flags parameter is currently unused and defaults to
1533           zero.
1534
1535       $dom->authorized_ssh_keys_set($user, \@keys, $flags=0)
1536           Update the list of authorized SSH keys for the user account $user.
1537           The @keys parameter should be an array reference containing the new
1538           keys, if any. The default behaviour is to set the authorized SSH
1539           keys to the exact set specified in @keys. This can be modified via
1540           the $flags parameter which takes the following constants
1541
1542           Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_APPEND
1543               Append @keys to the current set of keys, rather than replacing
1544               the existing keys.
1545
1546           Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_REMOVE
1547               Remove @keys from the current set of keys, rather than
1548               replacing the existing keys. It is not an error if the keys do
1549               not exist.
1550
1551       my @msgs = $dom->get_messages($flags=0)
1552           Retrieve a list of messages associated with the domain. The
1553           optional $flags parameter can accept zero or more of
1554
1555           Sys::Virt::Domain::MESSAGE_DEPRECATION
1556               Warnings about use of deprecated features
1557
1558           Sys::Virt::Domain::MESSAGE_TAINTING
1559               Warnings about actions that have tainting the domain
1560
1561       $dom->start_dirty_rate_calc($dom, $secs, $flags=0)
1562           Request calculation of the domain's memory dirty rate over the next
1563           $secs seconds. $flags is currently unused and defaults to zero.
1564

CONSTANTS

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

AUTHORS

3438       Daniel P. Berrange <berrange@redhat.com>
3439
3441       Copyright (C) 2006 Red Hat Copyright (C) 2006-2007 Daniel P. Berrange
3442

LICENSE

3444       This program is free software; you can redistribute it and/or modify it
3445       under the terms of either the GNU General Public License as published
3446       by the Free Software Foundation (either version 2 of the License, or at
3447       your option any later version), or, the Artistic License, as specified
3448       in the Perl README file.
3449

SEE ALSO

3451       Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
3452
3453
3454
3455perl v5.34.0                      2021-07-22              Sys::Virt::Domain(3)
Impressum