1Sys::Virt::Domain(3) User Contributed Perl Documentation Sys::Virt::Domain(3)
2
3
4
6 Sys::Virt::Domain - Represent & manage a libvirt guest domain
7
9 The "Sys::Virt::Domain" module represents a guest domain managed by the
10 virtual machine monitor.
11
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 $dom->destroy()
172 Immediately poweroff the machine. This is equivalent to removing
173 the power plug. The guest OS is given no time to cleanup / save
174 state. For a clean poweroff sequence, use the "shutdown" method
175 instead.
176
177 my $info = $dom->get_info()
178 Returns a hash reference summarising the execution state of the
179 domain. The elements of the hash are as follows:
180
181 maxMem
182 The maximum memory allowed for this domain, in kilobytes
183
184 memory
185 The current memory allocated to the domain in kilobytes
186
187 cpuTime
188 The amount of CPU time used by the domain
189
190 nrVirtCpu
191 The current number of virtual CPUs enabled in the domain
192
193 state
194 The execution state of the machine, which will be one of the
195 constants &Sys::Virt::Domain::STATE_*.
196
197 my ($state, $reason) = $dom->get_state()
198 Returns an array whose values specify the current state of the
199 guest, and the reason for it being in that state. The $state
200 values are the same as for the "get_info" API, and the $reason
201 values come from:
202
203 Sys::Virt::Domain::STATE_CRASHED_UNKNOWN
204 It is not known why the domain has crashed
205
206 Sys::Virt::Domain::STATE_CRASHED_PANICKED
207 The domain has crashed due to a kernel panic
208
209 Sys::Virt::Domain::STATE_NOSTATE_UNKNOWN
210 It is not known why the domain has no state
211
212 Sys::Virt::Domain::STATE_PAUSED_DUMP
213 The guest is paused due to a core dump operation
214
215 Sys::Virt::Domain::STATE_PAUSED_FROM_SNAPSHOT
216 The guest is paused due to a snapshot
217
218 Sys::Virt::Domain::STATE_PAUSED_IOERROR
219 The guest is paused due to an I/O error
220
221 Sys::Virt::Domain::STATE_PAUSED_MIGRATION
222 The guest is paused due to migration
223
224 Sys::Virt::Domain::STATE_PAUSED_SAVE
225 The guest is paused due to a save operation
226
227 Sys::Virt::Domain::STATE_PAUSED_UNKNOWN
228 It is not known why the domain has paused
229
230 Sys::Virt::Domain::STATE_PAUSED_USER
231 The guest is paused at admin request
232
233 Sys::Virt::Domain::STATE_PAUSED_WATCHDOG
234 The guest is paused due to the watchdog
235
236 Sys::Virt::Domain::STATE_PAUSED_SHUTTING_DOWN
237 The guest is paused while domain shutdown takes place
238
239 Sys::Virt::Domain::STATE_PAUSED_SNAPSHOT
240 The guest is paused while a snapshot takes place
241
242 Sys::Virt::Domain::STATE_PAUSED_CRASHED
243 The guest is paused due to a kernel panic
244
245 Sys::Virt::Domain::STATE_PAUSED_STARTING_UP
246 The guest is paused as it is being started up.
247
248 Sys::Virt::Domain::STATE_PAUSED_POSTCOPY
249 The guest is paused as post-copy migration is taking place
250
251 Sys::Virt::Domain::STATE_PAUSED_POSTCOPY_FAILED
252 The guest is paused as post-copy migration failed
253
254 Sys::Virt::Domain::STATE_RUNNING_BOOTED
255 The guest is running after being booted
256
257 Sys::Virt::Domain::STATE_RUNNING_FROM_SNAPSHOT
258 The guest is running after restore from snapshot
259
260 Sys::Virt::Domain::STATE_RUNNING_MIGRATED
261 The guest is running after migration
262
263 Sys::Virt::Domain::STATE_RUNNING_MIGRATION_CANCELED
264 The guest is running after migration abort
265
266 Sys::Virt::Domain::STATE_RUNNING_RESTORED
267 The guest is running after restore from file
268
269 Sys::Virt::Domain::STATE_RUNNING_SAVE_CANCELED
270 The guest is running after save cancel
271
272 Sys::Virt::Domain::STATE_RUNNING_UNKNOWN
273 It is not known why the domain has started
274
275 Sys::Virt::Domain::STATE_RUNNING_UNPAUSED
276 The guest is running after a resume
277
278 Sys::Virt::Domain::STATE_RUNNING_WAKEUP
279 The guest is running after wakeup from power management suspend
280
281 Sys::Virt::Domain::STATE_RUNNING_CRASHED
282 The guest was restarted after crashing
283
284 Sys::Virt::Domain::STATE_RUNNING_POSTCOPY
285 The guest is running but post-copy is taking place
286
287 Sys::Virt::Domain::STATE_BLOCKED_UNKNOWN
288 The guest is blocked for an unknown reason
289
290 Sys::Virt::Domain::STATE_SHUTDOWN_UNKNOWN
291 It is not known why the domain has shutdown
292
293 Sys::Virt::Domain::STATE_SHUTDOWN_USER
294 The guest is shutdown due to admin request
295
296 Sys::Virt::Domain::STATE_SHUTOFF_CRASHED
297 The guest is shutoff after a crash
298
299 Sys::Virt::Domain::STATE_SHUTOFF_DESTROYED
300 The guest is shutoff after being destroyed
301
302 Sys::Virt::Domain::STATE_SHUTOFF_FAILED
303 The guest is shutoff due to a virtualization failure
304
305 Sys::Virt::Domain::STATE_SHUTOFF_FROM_SNAPSHOT
306 The guest is shutoff after a snapshot
307
308 Sys::Virt::Domain::STATE_SHUTOFF_MIGRATED
309 The guest is shutoff after migration
310
311 Sys::Virt::Domain::STATE_SHUTOFF_SAVED
312 The guest is shutoff after a save
313
314 Sys::Virt::Domain::STATE_SHUTOFF_SHUTDOWN
315 The guest is shutoff due to controlled shutdown
316
317 Sys::Virt::Domain::STATE_SHUTOFF_UNKNOWN
318 It is not known why the domain has shutoff
319
320 Sys::Virt::Domain::STATE_SHUTOFF_DAEMON
321 The daemon stopped the guest due to a failure
322
323 Sys::Virt::Domain::STATE_PMSUSPENDED_UNKNOWN
324 It is not known why the domain was suspended to RAM
325
326 Sys::Virt::Domain::STATE_PMSUSPENDED_DISK_UNKNOWN
327 It is not known why the domain was suspended to disk
328
329 my $info = $dom->get_control_info($flags=0)
330 Returns a hash reference providing information about the control
331 channel. The returned keys in the hash are
332
333 "state"
334 One of the CONTROL INFO constants listed later
335
336 "details"
337 Currently unused, always 0.
338
339 "stateTime"
340 The elapsed time since the control channel entered the current
341 state.
342
343 my $time = $dom->get_time($flags=0);
344 Get the current time of the guest, in seconds and nanoseconds. The
345 $flags parameter is currently unused and defaults to zero. The
346 return value is an array ref with two elements, the first contains
347 the time in seconds, the second contains the remaining nanoseconds.
348
349 $dom->set_time($secs, $nsecs, $flags=0);
350 Set the current time of the guest, in seconds and nanoseconds. The
351 $flags parameter accepts one of
352
353 "Sys::Virt::Domain::TIME_SYNC"
354 Re-sync domain time from domain's RTC.
355
356 $dom->set_user_password($username, $password, $flags=0);
357 Update the password for account $username to be $password.
358 $password is the clear-text password string unless the
359 PASSWORD_ENCRYPTED flag is set.
360
361 "Sys::Virt::Domain::PASSWORD_ENCRYPTED"
362 The $password is encrypted with the password scheme required by
363 the guest OS.
364
365 $dom->rename($newname, $flags=0)
366 Change the name of an inactive guest to be $newname. The $flags
367 parameter is currently unused and defaults to zero.
368
369 my @errs = $dom->get_disk_errors($flags=0)
370 Returns a list of all disk errors that have occurred on the backing
371 store for the guest's virtual disks. The returned array elements
372 are hash references, containing two keys
373
374 "path"
375 The path of the disk with an error
376
377 "error"
378 The error type
379
380 $dom->send_key($keycodeset, $holdtime, \@keycodes, $flags=0)
381 Sends a sequence of keycodes to the guest domain. The $keycodeset
382 should be one of the constants listed later in the KEYCODE SET
383 section. $holdtiem is the duration, in milliseconds, to keep the
384 key pressed before releasing it and sending the next keycode.
385 @keycodes is an array reference containing the list of keycodes to
386 send to the guest. The elements in the array should be keycode
387 values from the specified keycode set. $flags is currently unused.
388
389 my $info = $dom->get_block_info($dev, $flags=0)
390 Returns a hash reference summarising the disk usage of the host
391 backing store for a guest block device. The $dev parameter should
392 be the path to the backing store on the host. $flags is currently
393 unused and defaults to 0 if omitted. The returned hash contains the
394 following elements
395
396 capacity
397 Logical size in bytes of the block device backing image *
398
399 allocation
400 Highest allocated extent in bytes of the block device backing
401 image
402
403 physical
404 Physical size in bytes of the container of the backing image
405
406 $dom->set_max_memory($mem)
407 Set the maximum memory for the domain to the value $mem. The value
408 of the $mem parameter is specified in kilobytes.
409
410 $mem = $dom->get_max_memory()
411 Returns the current maximum memory allowed for this domain in
412 kilobytes.
413
414 $dom->set_memory($mem, $flags)
415 Set the current memory for the domain to the value $mem. The value
416 of the $mem parameter is specified in kilobytes. This must be less
417 than, or equal to the domain's max memory limit. The $flags
418 parameter can control whether the update affects the live guest, or
419 inactive config, defaulting to modifying the current state.
420
421 $dom->set_memory_stats_period($period, $flags)
422 Set the period on which guests memory stats are refreshed, with
423 $period being a value in seconds. The $flags parameter is currently
424 unused.
425
426 $dom->shutdown()
427 Request that the guest OS perform a graceful shutdown and poweroff.
428 This usually requires some form of cooperation from the guest
429 operating system, such as responding to an ACPI signal, or a guest
430 agent process. For an immediate, forceful poweroff, use the
431 "destroy" method instead.
432
433 $dom->reboot([$flags])
434 Request that the guest OS perform a graceful shutdown and
435 optionally restart. The optional $flags parameter is currently
436 unused and if omitted defaults to zero.
437
438 $dom->reset([$flags])
439 Perform a hardware reset of the virtual machine. The guest OS is
440 given no opportunity to shutdown gracefully. The optional $flags
441 parameter is currently unused and if omitted defaults to zero.
442
443 $dom->get_max_vcpus()
444 Return the maximum number of vcpus that are configured for the
445 domain
446
447 $dom->attach_device($xml[, $flags])
448 Hotplug a new device whose configuration is given by $xml, to the
449 running guest. The optional <$flags> parameter defaults to 0, but
450 can accept one of the device hotplug flags described later.
451
452 $dom->detach_device($xml[, $flags])
453 Hotunplug an existing device whose configuration is given by $xml,
454 from the running guest. The optional <$flags> parameter defaults to
455 0, but can accept one of the device hotplug flags described later.
456
457 $dom->detach_device_alias($alias[, $flags])
458 Hotunplug an existing device which is identified by $alias. The
459 optional <$flags> parameter defaults to 0, but can accept one of
460 the device hotplug flags described later.
461
462 $dom->update_device($xml[, $flags])
463 Update the configuration of an existing device. The new
464 configuration is given by $xml. The optional <$flags> parameter
465 defaults to 0 but can accept one of the device hotplug flags
466 described later.
467
468 $data = $dom->block_peek($path, $offset, $size[, $flags])
469 Peek into the guest disk $path, at byte $offset capturing $size
470 bytes of data. The returned scalar may contain embedded NULLs. The
471 optional $flags parameter is currently unused and if omitted
472 defaults to zero.
473
474 $data = $dom->memory_peek($offset, $size[, $flags])
475 Peek into the guest memory at byte $offset virtual address,
476 capturing $size bytes of memory. The return scalar may contain
477 embedded NULLs. The optional $flags parameter is currently unused
478 and if omitted defaults to zero.
479
480 $flag = $dom->get_autostart();
481 Return a true value if the guest domain is configured to
482 automatically start upon boot. Return false, otherwise
483
484 $dom->set_autostart($flag)
485 Set the state of the autostart flag, which determines whether the
486 guest will automatically start upon boot of the host OS
487
488 $dom->set_vcpus($count, [$flags])
489 Set the number of virtual CPUs in the guest VM to $count. The
490 optional $flags parameter can be used to control whether the
491 setting changes the live config or inactive config.
492
493 $dom->set_vcpu($cpumap, $state, [$flags])
494 Set the state of the CPUs in $cpumap to $state. The $flags
495 parameter defaults to zero if not present.
496
497 $count = $dom->get_vcpus([$flags])
498 Get the number of virtual CPUs in the guest VM. The optional
499 $flags parameter can be used to control whether to query the
500 setting of the live config or inactive config.
501
502 $dom->set_guest_vcpus($cpumap, $state, [$flags=0])
503 Set the online status of the guest OS CPUs. The $cpumap parameter
504 describes the set of CPUs to modify (eg "0-3,^1"). $state is
505 either 1 to set the CPUs online, or 0 to set them offline. The
506 $flags parameter is currently unused and defaults to 0.
507
508 $info $dom->get_guest_vcpus([$flags=0])
509 Query information about the guest OS CPUs. The returned data is a
510 hash reference with the following keys.
511
512 vcpus
513 String containing bitmap representing CPU ids reported
514 currently known to the guest.
515
516 online
517 String containing bitmap representing CPU ids that are
518 currently online in the guest.
519
520 offlinable
521 String containing bitmap representing CPU ids that can be
522 offlined in the guest.
523
524 The $flags parameter is currently unused and defaults to 0.
525
526 $type = $dom->get_scheduler_type()
527 Return the scheduler type for the guest domain
528
529 $stats = $dom->block_stats($path)
530 Fetch the current I/O statistics for the block device given by
531 $path. The returned hash reference contains keys for
532
533 "rd_req"
534 Number of read requests
535
536 "rd_bytes"
537 Number of bytes read
538
539 "wr_req"
540 Number of write requests
541
542 "wr_bytes"
543 Number of bytes written
544
545 "errs"
546 Some kind of error count
547
548 my $params = $dom->get_scheduler_parameters($flags=0)
549 Return the set of scheduler tunable parameters for the guest, as a
550 hash reference. The precise set of keys in the hash are specific to
551 the hypervisor.
552
553 $dom->set_scheduler_parameters($params, $flags=0)
554 Update the set of scheduler tunable parameters. The value names for
555 tunables vary, and can be discovered using the
556 "get_scheduler_params" call
557
558 my $params = $dom->get_memory_parameters($flags=0)
559 Return a hash reference containing the set of memory tunable
560 parameters for the guest. The keys in the hash are one of the
561 constants MEMORY PARAMETERS described later. The $flags parameter
562 accepts one or more the CONFIG OPTION constants documented later,
563 and defaults to 0 if omitted.
564
565 $dom->set_memory_parameters($params, $flags=0)
566 Update the memory tunable parameters for the guest. The $params
567 should be a hash reference whose keys are one of the MEMORY
568 PARAMETERS constants. The $flags parameter accepts one or more the
569 CONFIG OPTION constants documented later, and defaults to 0 if
570 omitted.
571
572 my $params = $dom->get_blkio_parameters($flags=0)
573 Return a hash reference containing the set of blkio tunable
574 parameters for the guest. The keys in the hash are one of the
575 constants BLKIO PARAMETERS described later. The $flags parameter
576 accepts one or more the CONFIG OPTION constants documented later,
577 and defaults to 0 if omitted.
578
579 $dom->set_blkio_parameters($params, $flags=0)
580 Update the blkio tunable parameters for the guest. The $params
581 should be a hash reference whose keys are one of the BLKIO
582 PARAMETERS constants. The $flags parameter accepts one or more the
583 CONFIG OPTION constants documented later, and defaults to 0 if
584 omitted.
585
586 $stats = $dom->get_block_iotune($disk, $flags=0)
587 Return a hash reference containing the set of blkio tunable
588 parameters for the guest disk $disk. The keys in the hash are one
589 of the constants BLOCK IOTUNE PARAMETERS described later.
590
591 $dom->set_block_iotune($disk, $params, $flags=0);
592 Update the blkio tunable parameters for the guest disk $disk. The
593 $params should be a hash reference whose keys are one of the BLOCK
594 IOTUNE PARAMETERS constants.
595
596 my $params = $dom->get_interface_parameters($intf, $flags=0)
597 Return a hash reference containing the set of interface tunable
598 parameters for the guest. The keys in the hash are one of the
599 constants INTERFACE PARAMETERS described later.
600
601 $dom->set_interface_parameters($intf, $params, $flags=0)
602 Update the interface tunable parameters for the guest. The $params
603 should be a hash reference whose keys are one of the INTERFACE
604 PARAMETERS constants.
605
606 my $params = $dom->get_numa_parameters($flags=0)
607 Return a hash reference containing the set of numa tunable
608 parameters for the guest. The keys in the hash are one of the
609 constants NUMA PARAMETERS described later. The $flags parameter
610 accepts one or more the CONFIG OPTION constants documented later,
611 and defaults to 0 if omitted.
612
613 $dom->set_numa_parameters($params, $flags=0)
614 Update the numa tunable parameters for the guest. The $params
615 should be a hash reference whose keys are one of the NUMA
616 PARAMETERS constants. The $flags parameter accepts one or more the
617 CONFIG OPTION constants documented later, and defaults to 0 if
618 omitted.
619
620 my $params = $dom->get_perf_events($flags=0)
621 Return a hash reference containing the set of performance events
622 that are available for the guest. The keys in the hash are one of
623 the constants PERF EVENTS described later. The $flags parameter
624 accepts one or more the CONFIG OPTION constants documented later,
625 and defaults to 0 if omitted.
626
627 $dom->set_perf_events($params, $flags=0)
628 Update the enabled state for performance events for the guest. The
629 $params should be a hash reference whose keys are one of the PERF
630 EVENTS constants. The $flags parameter accepts one or more the
631 CONFIG OPTION constants documented later, and defaults to 0 if
632 omitted.
633
634 $dom->block_resize($disk, $newsize, $flags=0)
635 Resize the disk $disk to have new size $newsize KB. If the disk is
636 backed by a special image format, the actual resize is done by the
637 hypervisor. If the disk is backed by a raw file, or block device,
638 the resize must be done prior to invoking this API call, and it
639 merely updates the hypervisor's view of the disk size. The
640 following flags may be used
641
642 Sys::Virt::Domain::BLOCK_RESIZE_BYTES
643 Treat $newsize as if it were in bytes, rather than KB.
644
645 $dom->interface_stats($path)
646 Fetch the current I/O statistics for the block device given by
647 $path. The returned hash containins keys for
648
649 "rx_bytes"
650 Total bytes received
651
652 "rx_packets"
653 Total packets received
654
655 "rx_errs"
656 Total packets received with errors
657
658 "rx_drop"
659 Total packets drop at reception
660
661 "tx_bytes"
662 Total bytes transmitted
663
664 "tx_packets"
665 Total packets transmitted
666
667 "tx_errs"
668 Total packets transmitted with errors
669
670 "tx_drop"
671 Total packets dropped at transmission.
672
673 $dom->memory_stats($flags=0)
674 Fetch the current memory statistics for the guest domain. The
675 $flags parameter is currently unused and can be omitted. The
676 returned hash containins keys for
677
678 "swap_in"
679 Data read from swap space
680
681 "swap_out"
682 Data written to swap space
683
684 "major_fault"
685 Page fault involving disk I/O
686
687 "minor_fault"
688 Page fault not involving disk I/O
689
690 "unused"
691 Memory not used by the system
692
693 "available"
694 Total memory seen by guest
695
696 "rss"
697 Resident set size. Size of memory resident in host RAM.
698
699 $info = $dom->get_security_label()
700 Fetch information about the security label assigned to the guest
701 domain. The returned hash reference has two keys, "model" gives the
702 name of the security model in effect (eg "selinux"), while "label"
703 provides the name of the security label applied to the domain. This
704 method only returns information about the first security label. To
705 retrieve all labels, use "get_security_label_list".
706
707 @info = $dom->get_security_label_list()
708 Fetches information about all security labels assigned to the guest
709 domain. The elements in the returned array are all hash references,
710 whose keys are as described for "get_security_label".
711
712 $ddom = $dom->migrate(destcon, \%params, flags=0)
713 Migrate a domain to an alternative host. The "destcon" parameter
714 should be a "Sys::Virt" connection to the remote target host. The
715 "flags" parameter takes one or more of the
716 "Sys::Virt::Domain::MIGRATE_XXX" constants described later in this
717 document. The %params parameter is a hash reference used to set
718 various parameters for the migration operation, with the following
719 valid keys.
720
721 "Sys::Virt::Domain::MIGRATE_PARAM_URI"
722 The URI to use for initializing the domain migration. It takes
723 a hypervisor specific format. The uri_transports element of the
724 hypervisor capabilities XML includes details of the supported
725 URI schemes. When omitted libvirt will auto-generate suitable
726 default URI. It is typically only necessary to specify this URI
727 if the destination host has multiple interfaces and a specific
728 interface is required to transmit migration data.
729
730 "Sys::Virt::Domain::MIGRATE_PARAM_DEST_NAME"
731 The name to be used for the domain on the destination host.
732 Omitting this parameter keeps the domain name the same. This
733 field is only allowed to be used with hypervisors that support
734 domain renaming during migration.
735
736 "Sys::Virt::Domain::MIGRATE_PARAM_DEST_XML"
737 The new configuration to be used for the domain on the
738 destination host. The configuration must include an identical
739 set of virtual devices, to ensure a stable guest ABI across
740 migration. Only parameters related to host side configuration
741 can be changed in the XML. Hypervisors which support this field
742 will forbid migration if the provided XML would cause a change
743 in the guest ABI. This field cannot be used to rename the
744 domain during migration (use VIR_MIGRATE_PARAM_DEST_NAME field
745 for that purpose). Domain name in the destination XML must
746 match the original domain name.
747
748 Omitting this parameter keeps the original domain
749 configuration. Using this field with hypervisors that do not
750 support changing domain configuration during migration will
751 result in a failure.
752
753 "Sys::Virt::Domain::MIGRATE_PARAM_GRAPHICS_URI"
754 URI to use for migrating client's connection to domain's
755 graphical console as VIR_TYPED_PARAM_STRING. If specified, the
756 client will be asked to automatically reconnect using these
757 parameters instead of the automatically computed ones. This can
758 be useful if, e.g., the client does not have a direct access to
759 the network virtualization hosts are connected to and needs to
760 connect through a proxy. The URI is formed as follows:
761
762 protocol://hostname[:port]/[?parameters]
763
764 where protocol is either "spice" or "vnc" and parameters is a
765 list of protocol specific parameters separated by '&'.
766 Currently recognized parameters are "tlsPort" and "tlsSubject".
767 For example,
768
769 spice://target.host.com:1234/?tlsPort=4567
770
771 "Sys::Virt::Domain::MIGRATE_PARAM_BANDWIDTH"
772 The maximum bandwidth (in MiB/s) that will be used for
773 migration. If set to 0 or omitted, libvirt will choose a
774 suitable default. Some hypervisors do not support this feature
775 and will return an error if this field is used and is not 0.
776
777 "Sys::Virt::Domain::MIGRATE_PARAM_BANDWIDTH_POSTCOPY"
778 The maximum bandwidth (in MiB/s) that will be used for
779 migration during post-copy phase. If set to 0 or omitted,
780 libvirt will choose a suitable default. Some hypervisors do not
781 support this feature and return an error if this field is used
782 and is not 0.
783
784 "Sys::Virt::Domain::MIGRATE_PARAM_LISTEN_ADDRESS"
785 The address on which to listen for incoming migration
786 connections. If omitted, libvirt will listen on the wildcard
787 address (0.0.0.0 or ::). This default may be a security risk if
788 guests, or other untrusted users have the ability to connect to
789 the virtualization host, thus use of an explicit restricted
790 listen address is recommended.
791
792 "Sys::Virt::Domain::MIGRATE_PARAM_DISK_PORT"
793 Port that destination server should use for incoming disks
794 migration. Type is VIR_TYPED_PARAM_INT. If set to 0 or omitted,
795 libvirt will choose a suitable default. At the moment this is
796 only supported by the QEMU driver.
797
798 "Sys::Virt::Domain::MIGRATE_PARAM_MIGRATE_DISKS"
799 The list of disks to migrate when doing block storage
800 migration. In contrast to other parameters whose values are
801 plain strings, the parameter value should be an array
802 reference, whose elements are in turn strings representing the
803 disk target names.
804
805 "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION"
806 The type of compression method use use, either "xbzrle" or
807 "mt".
808
809 "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_THREADS"
810 The number of compression threads to use
811
812 "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_DTHREADS"
813 The number of decompression threads
814
815 "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_MT_LEVEL"
816 The compression level from 0 (no compression) to 9 (maximum
817 compression)
818
819 "Sys::Virt::Domain::MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE"
820 The size of the cache for xbzrle compression
821
822 "Sys::Virt::Domain::MIGRATE_PARAM_PERSIST_XML"
823 The alternative persistent XML config to copy
824
825 "Sys::Virt::Domain::MIGRATE_PARAM_AUTO_CONVERGE_INITIAL"
826 The initial percentage to throttle guest vCPUs
827
828 "Sys::Virt::Domain::MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT"
829 The additional percentage step size to throttle guest vCPUs if
830 progress is not made
831
832 "Sys::Virt::Domain::MIGRATE_PARAM_PARALLEL_CONNECTIONS"
833 The number of connections used during parallel migration.
834
835 "Sys::Virt::Domain::MIGRATE_PARAM_TLS_DESTINATION"
836 Override the destination host name used for TLS verification.
837 Normally the TLS certificate from the destination host must
838 match the host's name for TLS verification to succeed. When the
839 certificate does not match the destination hostname and the
840 expected cetificate's hostname is known, this parameter can be
841 used to pass this expected hostname when starting the
842 migration.
843
844 "Sys::Virt::Domain::MIGRATE_PARAM_DISKS_URI"
845 The URI to use for initializing the domain migration for
846 storage. It takes a hypervisor specific format. The
847 uri_transports element of the hypervisor capabilities XML
848 includes details of the supported URI schemes. When omitted
849 libvirt will auto-generate suitable default URI. It is
850 typically only necessary to specify this URI if the destination
851 host has multiple interfaces and a specific interface is
852 required to transmit storage data.
853
854 $ddom = $dom->migrate(destcon, flags=0, dname=undef, uri=undef,
855 bandwidth=0)
856 Migrate a domain to an alternative host. Use of positional
857 parameters with "migrate" is deprecated in favour of passing a hash
858 reference as described above.
859
860 $ddom = $dom->migrate2(destcon, dxml, flags, dname, uri, bandwidth)
861 Migrate a domain to an alternative host. This method is deprecated
862 in favour of passing a hash ref to "migrate".
863
864 $ddom = $dom->migrate_to_uri(desturi, \%params, flags=0)
865 Migrate a domain to an alternative host. The "desturi" parameter
866 should be a valid libvirt connection URI for the remote target
867 host. The "flags" parameter takes one or more of the
868 "Sys::Virt::Domain::MIGRATE_XXX" constants described later in this
869 document. The %params parameter is a hash reference used to set
870 various parameters for the migration operation, with the same keys
871 described for the "migrate" API.
872
873 $dom->migrate_to_uri(desturi, flags, dname, bandwidth)
874 Migrate a domain to an alternative host. Use of positional
875 parameters with "migrate_to_uri" is deprecated in favour of passing
876 a hash reference as described above.
877
878 $dom->migrate_to_uri2(dconnuri, miguri, dxml, flags, dname, bandwidth)
879 Migrate a domain to an alternative host. This method is deprecated
880 in favour of passing a hash ref to "migrate_to_uri".
881
882 $dom->migrate_set_max_downtime($downtime, $flags=0)
883 Set the maximum allowed downtime during migration of the guest. A
884 longer downtime makes it more likely that migration will complete,
885 at the cost of longer time blackout for the guest OS at the switch
886 over point. The "downtime" parameter is measured in milliseconds.
887 The $flags parameter is currently unused and defaults to zero.
888
889 $downtime = $dom->migrate_get_max_downtime($flags=0) Get the current
890 value of the maximum downtime allowed during a migration of a guest.
891 The returned <downtime> value is measured in milliseconds. The $flags
892 parameter is currently unused and defaults to zero.
893 $dom->migrate_set_max_speed($bandwidth, $flags=0)
894 Set the maximum allowed bandwidth during migration of the guest.
895 The "bandwidth" parameter is measured in MB/second. The $flags
896 parameter takes zero or more of the constants:
897
898 $Sys::Virt::Domain::MIGRATE_MAX_SPEED_POSTCOPY
899 Set the post-copy speed instead of the pre-copy speed.
900
901 $bandwidth = $dom->migrate_get_max_speed($flags=0)
902 Get the maximum allowed bandwidth during migration fo the guest.
903 The returned <bandwidth> value is measured in MB/second. The
904 $flags parameter is accepts the same constants as
905 "migrate_set_max_speed".
906
907 $dom->migrate_set_compression_cache($cacheSize, $flags=0)
908 Set the maximum allowed compression cache size during migration of
909 the guest. The "cacheSize" parameter is measured in bytes. The
910 $flags parameter is currently unused and defaults to zero.
911
912 $cacheSize = $dom->migrate_get_compression_cache($flags=0)
913 Get the maximum allowed compression cache size during migration of
914 the guest. The returned <bandwidth> value is measured in bytes.
915 The $flags parameter is currently unused and defaults to zero.
916
917 $dom->migrate_start_post_copy($flags=0)
918 Switch the domain from pre-copy to post-copy mode. This requires
919 that the original migrate command had the
920 "Sys::Virt::Domain::MIGRATE_POST_COPY" flag specified.
921
922 $dom->inject_nmi($flags)
923 Trigger an NMI in the guest virtual machine. The $flags parameter
924 is currently unused and defaults to 0.
925
926 $dom->open_console($st, $devname, $flags)
927 Open the text console for a serial, parallel or paravirt console
928 device identified by $devname, connecting it to the stream $st. If
929 $devname is undefined, the default console will be opened. $st must
930 be a "Sys::Virt::Stream" object used for bi-directional
931 communication with the console. $flags is currently unused,
932 defaulting to 0.
933
934 $dom->open_channel($st, $devname, $flags)
935 Open the text console for a data channel device identified by
936 $devname, connecting it to the stream $st. $st must be a
937 "Sys::Virt::Stream" object used for bi-directional communication
938 with the channel. $flags is currently unused, defaulting to 0.
939
940 $dom->open_graphics($idx, $fd, $flags)
941 Open the graphics console for a guest, identified by $idx, counting
942 from 0. The $fd should be a file descriptor for an anoymous socket
943 pair. The $flags argument should be one of the constants listed at
944 the end of this document, and defaults to 0.
945
946 $fd = $dom->open_graphics_fd($idx, $flags)
947 Open the graphics console for a guest, identified by $idx, counting
948 from 0. The $flags argument should be one of the constants listed
949 at the end of this document, and defaults to 0. The return value
950 will be a file descriptor connected to the console which must be
951 closed when no longer needed. This method is preferred over
952 "open_graphics" since it will work correctly under sVirt mandatory
953 access control policies.
954
955 my $mimetype = $dom->screenshot($st, $screen, $flags)
956 Capture a screenshot of the virtual machine's monitor. The $screen
957 parameter controls which monitor is captured when using a multi-
958 head or multi-card configuration. $st must be a "Sys::Virt::Stream"
959 object from which the data can be read. $flags is currently unused
960 and defaults to 0. The mimetype of the screenshot is returned
961
962 @vcpuinfo = $dom->get_vcpu_info($flags=0)
963 Obtain information about the state of all virtual CPUs in a running
964 guest domain. The returned list will have one element for each
965 vCPU, where each elements contains a hash reference. The keys in
966 the hash are, "number" the vCPU number, "cpu" the physical CPU on
967 which the vCPU is currently scheduled, "cpuTime" the cumulative
968 execution time of the vCPU, "state" the running state and
969 "affinity" giving the allowed shedular placement. The value for
970 "affinity" is a string representing a bitmask against physical
971 CPUs, 8 cpus per character. To extract the bits use the "unpack"
972 function with the "b*" template. NB The "state", "cpuTime", "cpu"
973 values are only available if using $flags value of 0, and the
974 domain is currently running; otherwise they will all be set to
975 zero.
976
977 $dom->pin_vcpu($vcpu, $mask)
978 Pin the virtual CPU given by index $vcpu to physical CPUs given by
979 $mask. The $mask is a string representing a bitmask against
980 physical CPUs, 8 cpus per character.
981
982 $mask = $dom->get_emulator_pin_info()
983 Obtain information about the CPU affinity of the emulator process.
984 The returned $mask is a bitstring against physical CPUs, 8 cpus per
985 character. To extract the bits use the "unpack" function with the
986 "b*" template.
987
988 $dom->pin_emulator($newmask, $flags=0)
989 Pin the emulator threads to the physical CPUs identified by the
990 affinity in $newmask. The $newmask is a bitstring against the
991 physical CPUa, 8 cpus per character. To create a suitable
992 bitstring, use the "vec" function with a value of 1 for the "BITS"
993 parameter.
994
995 @iothreadinfo = $dom->get_iothread_info($flags=0)
996 Obtain information about the state of all IOThreads in a running
997 guest domain. The returned list will have one element for each
998 IOThread, where each elements contains a hash reference. The keys
999 in the hash are, "number" the IOThread number and "affinity" giving
1000 the allowed schedular placement. The value for "affinity" is a
1001 string representing a bitmask against physical CPUs, 8 cpus per
1002 character. To extract the bits use the "unpack" function with the
1003 "b*" template.
1004
1005 $dom->pin_iothread($iothread, $mask)
1006 Pin the IOThread given by index $iothread to physical CPUs given by
1007 $mask. The $mask is a string representing a bitmask against
1008 physical CPUs, 8 cpus per character.
1009
1010 $dom->add_iothread($iothread, $flags=0)
1011 Add a new IOThread by the $iothread value to the guest domain. The
1012 $flags parameter accepts one or more the CONFIG OPTION constants
1013 documented later, and defaults to 0 if omitted.
1014
1015 $dom->del_iothread($iothread, $flags=0)
1016 Delete an existing IOThread by the $iothread value from the guest
1017 domain. The $flags parameter accepts one or more the CONFIG OPTION
1018 constants documented later, and defaults to 0 if omitted.
1019
1020 $dom->set_iothread($iothread, $params, $flags=0)
1021 Set parameters for the IOThread by the $iothread value on the guest
1022 domain. The $params parameter is a hash reference whose keys are
1023 the "IOTHREAD STATS" constants documented later. The $flags
1024 parameter accepts one or more the CONFIG OPTION constants
1025 documented later, and defaults to 0 if omitted.
1026
1027 my @stats = $dom->get_cpu_stats($startCpu, $numCpus, $flags=0)
1028 Requests the guests host physical CPU usage statistics, starting
1029 from host CPU <$startCpu> counting up to $numCpus. If $startCpu is
1030 -1 and $numCpus is 1, then the utilization across all CPUs is
1031 returned. Returns an array of hash references, each element
1032 containing stats for one CPU.
1033
1034 my $info = $dom->get_job_info()
1035 Returns a hash reference summarising the execution state of the
1036 background job. The elements of the hash are as follows:
1037
1038 type
1039 The type of job, one of the JOB TYPE constants listed later in
1040 this document.
1041
1042 timeElapsed
1043 The elapsed time in milliseconds
1044
1045 timeRemaining
1046 The expected remaining time in milliseconds. Only set if the
1047 "type" is JOB_UNBOUNDED.
1048
1049 dataTotal
1050 The total amount of data expected to be processed by the job,
1051 in bytes.
1052
1053 dataProcessed
1054 The current amount of data processed by the job, in bytes.
1055
1056 dataRemaining
1057 The expected amount of data remaining to be processed by the
1058 job, in bytes.
1059
1060 memTotal
1061 The total amount of mem expected to be processed by the job, in
1062 bytes.
1063
1064 memProcessed
1065 The current amount of mem processed by the job, in bytes.
1066
1067 memRemaining
1068 The expected amount of mem remaining to be processed by the
1069 job, in bytes.
1070
1071 fileTotal
1072 The total amount of file expected to be processed by the job,
1073 in bytes.
1074
1075 fileProcessed
1076 The current amount of file processed by the job, in bytes.
1077
1078 fileRemaining
1079 The expected amount of file remaining to be processed by the
1080 job, in bytes.
1081
1082 my ($type, $stats) = $dom->get_job_stats($flags=0)
1083 Returns an array summarising the execution state of the background
1084 job. The $type value is one of the JOB TYPE constants listed later
1085 in this document. The $stats value is a hash reference, whose
1086 elements are one of the following constants.
1087
1088 type
1089 The type of job, one of the JOB TYPE constants listed later in
1090 this document.
1091
1092 The $flags parameter defaults to zero and can take one of the
1093 following constants.
1094
1095 Sys::Virt::Domain::JOB_STATS_COMPLETED
1096 Return the stats of the most recently completed job.
1097
1098 Sys::Virt::Domain::JOB_STATS_KEEP_COMPLETED
1099 Don't clear the completed stats after reading them.
1100
1101 Sys::Virt::Domain::JOB_TIME_ELAPSED
1102 The elapsed time in milliseconds
1103
1104 Sys::Virt::Domain::JOB_TIME_ELAPSED_NET
1105 Time in milliseconds since the beginning of the migration job
1106 NOT including the time required to transfer control flow from
1107 the source host to the destination host.
1108
1109 Sys::Virt::Domain::JOB_TIME_REMAINING
1110 The expected remaining time in milliseconds. Only set if the
1111 "type" is JOB_UNBOUNDED.
1112
1113 Sys::Virt::Domain::JOB_DATA_TOTAL
1114 The total amount of data expected to be processed by the job,
1115 in bytes.
1116
1117 Sys::Virt::Domain::JOB_DATA_PROCESSED
1118 The current amount of data processed by the job, in bytes.
1119
1120 Sys::Virt::Domain::JOB_DATA_REMAINING
1121 The expected amount of data remaining to be processed by the
1122 job, in bytes.
1123
1124 Sys::Virt::Domain::JOB_MEMORY_TOTAL
1125 The total amount of mem expected to be processed by the job, in
1126 bytes.
1127
1128 Sys::Virt::Domain::JOB_MEMORY_PROCESSED
1129 The current amount of mem processed by the job, in bytes.
1130
1131 Sys::Virt::Domain::JOB_MEMORY_REMAINING
1132 The expected amount of mem remaining to be processed by the
1133 job, in bytes.
1134
1135 Sys::Virt::Domain::JOB_MEMORY_CONSTANT
1136 The number of pages filled with a constant byte which have been
1137 transferred
1138
1139 Sys::Virt::Domain::JOB_MEMORY_NORMAL
1140 The number of pages transferred without any compression
1141
1142 Sys::Virt::Domain::JOB_MEMORY_NORMAL_BYTES
1143 The number of bytes transferred without any compression
1144
1145 Sys::Virt::Domain::JOB_MEMORY_BPS
1146 The bytes per second transferred
1147
1148 Sys::Virt::Domain::JOB_MEMORY_DIRTY_RATE
1149 The number of memory pages dirtied per second
1150
1151 Sys::Virt::Domain::JOB_MEMORY_PAGE_SIZE
1152 The memory page size in bytes
1153
1154 Sys::Virt::Domain::JOB_MEMORY_ITERATION
1155 The total number of iterations over guest memory
1156
1157 Sys::Virt::Domain::JOB_MEMORY_POSTCOPY_REQS
1158 The number of page requests received from the destination host
1159 during post-copy migration.
1160
1161 Sys::Virt::Domain::JOB_DISK_TOTAL
1162 The total amount of file expected to be processed by the job,
1163 in bytes.
1164
1165 Sys::Virt::Domain::JOB_DISK_PROCESSED
1166 The current amount of file processed by the job, in bytes.
1167
1168 Sys::Virt::Domain::JOB_DISK_REMAINING
1169 The expected amount of file remaining to be processed by the
1170 job, in bytes.
1171
1172 Sys::Virt::Domain::JOB_DISK_BPS
1173 The bytes per second transferred
1174
1175 Sys::Virt::Domain::JOB_AUTO_CONVERGE_THROTTLE
1176 The percentage by which vCPUs are currently throttled
1177
1178 Sys::Virt::Domain::JOB_COMPRESSION_CACHE
1179 The size of the compression cache in bytes
1180
1181 Sys::Virt::Domain::JOB_COMPRESSION_BYTES
1182 The number of compressed bytes transferred
1183
1184 Sys::Virt::Domain::JOB_COMPRESSION_PAGES
1185 The number of compressed pages transferred
1186
1187 Sys::Virt::Domain::JOB_COMPRESSION_CACHE_MISSES
1188 The number of changing pages not in compression cache
1189
1190 Sys::Virt::Domain::JOB_COMPRESSION_OVERFLOW
1191 The number of changing pages in the compression cache but sent
1192 uncompressed since the compressed page was larger than the non-
1193 compressed page.
1194
1195 Sys::Virt::Domain::JOB_DOWNTIME
1196 The number of milliseconds of downtime expected during
1197 migration switchover.
1198
1199 Sys::Virt::Domain::JOB_DOWNTIME_NET
1200 Real measured downtime (ms) NOT including the time required to
1201 transfer control flow from the source host to the destination
1202 host.
1203
1204 Sys::Virt::Domain::JOB_SETUP_TIME
1205 The number of milliseconds of time doing setup of the job
1206
1207 Sys::Virt::Domain::JOB_OPERATION
1208 The type of operation associated with the job
1209
1210 Sys::Virt::Domain::JOB_SUCCESS
1211 Whether the job was successfully completed.
1212
1213 Sys::Virt::Domain::JOB_DISK_TEMP_TOTAL
1214 Possible total temporary disk space for the job in bytes
1215
1216 Sys::Virt::Domain::JOB_DISK_TEMP_USED
1217 Current total temporary disk space for the job in bytes
1218
1219 Sys::Virt::Domain::JOB_ERRMSG
1220 The error message from a failed job
1221
1222 The values for the Sys::Virt::Domain::JOB_OPERATION field are
1223
1224 Sys::Virt::Domain::JOB_OPERATION_UNKNOWN
1225 No known job type
1226
1227 Sys::Virt::Domain::JOB_OPERATION_START
1228 The guest is starting
1229
1230 Sys::Virt::Domain::JOB_OPERATION_SAVE
1231 The guest is saving to disk
1232
1233 Sys::Virt::Domain::JOB_OPERATION_RESTORE
1234 The guest is restoring from disk
1235
1236 Sys::Virt::Domain::JOB_OPERATION_MIGRATION_IN
1237 The guest is migrating in from another host
1238
1239 Sys::Virt::Domain::JOB_OPERATION_MIGRATION_OUT
1240 The guest is migrating out to another host
1241
1242 Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT
1243 The guest is saving a snapshot
1244
1245 Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT_REVERT
1246 The guest is reverting to a snapshot
1247
1248 Sys::Virt::Domain::JOB_OPERATION_DUMP
1249 The guest is saving a crash dump
1250
1251 Sys::Virt::Domain::JOB_OPERATION_BACKUP
1252 The guest is performing a block backup
1253
1254 $dom->abort_job()
1255 Aborts the currently executing job
1256
1257 my $info = $dom->get_block_job_info($path, $flags=0)
1258 Returns a hash reference summarising the execution state of the
1259 block job. The $path parameter should be the fully qualified path
1260 of the block device being changed. Valid $flags include:
1261
1262 Sys::Virt::Domain::BLOCK_JOB_INFO_BANDWIDTH_BYTES
1263 Treat bandwidth value as bytes instead of MiB.
1264
1265 $dom->set_block_job_speed($path, $bandwidth, $flags=0)
1266 Change the maximum I/O bandwidth used by the block job that is
1267 currently executing for $path. The $bandwidth argument is specified
1268 in MB/s. The $flags parameter can take the bitwise union of the
1269 values:
1270
1271 Sys::Virt::Domain::BLOCK_JOB_SPEED_BANDWIDTH_BYTES
1272 The $bandwidth parameter value is measured in bytes/s instead
1273 of MB/s.
1274
1275 $dom->abort_block_job($path, $flags=0)
1276 Abort the current job that is executing for the block device
1277 associated with $path
1278
1279 $dom->block_pull($path, $bandwidth, $flags=0)
1280 Merge the backing files associated with $path into the top level
1281 file. The $bandwidth parameter specifies the maximum I/O rate to
1282 allow in MB/s. The $flags parameter can take the bitwise union of
1283 the values:
1284
1285 Sys::Virt::Domain::BLOCK_PULL_BANDWIDTH_BYTES
1286 The $bandwidth parameter value is measured in bytes/s instead
1287 of MB/s.
1288
1289 $dom->block_rebase($path, $base, $bandwidth, $flags=0)
1290 Switch the backing path associated with $path to instead use $base.
1291 The $bandwidth parameter specifies the maximum I/O rate to allow in
1292 MB/s. The $flags parameter can take the bitwise union of the
1293 values:
1294
1295 Sys::Virt::Domain::BLOCK_REBASE_BANDWIDTH_BYTES
1296 The $bandwidth parameter value is measured in bytes/s instead
1297 of MB/s.
1298
1299 $dom->block_copy($path, $destxml, $params, $flags=0)
1300 Copy contents of a disk image <$path> into the target volume
1301 described by $destxml which follows the schema of the <disk>
1302 element in the domain XML. The $params parameter is a hash of
1303 optional parameters to control the process
1304
1305 Sys::Virt::Domain::BLOCK_COPY_BANDWIDTH
1306 The maximum bandwidth in bytes per second.
1307
1308 Sys::Virt::Domain::BLOCK_COPY_GRANULARITY
1309 The granularity in bytes of the copy process
1310
1311 Sys::Virt::Domain::BLOCK_COPY_BUF_SIZE
1312 The maximum amount of data in flight in bytes.
1313
1314 $dom->block_commit($path, $base, $top, $bandwidth, $flags=0)
1315 Commit changes there were made to the temporary top level file
1316 $top. Takes all the differences between $top and $base and merge
1317 them into $base. The $bandwidth parameter specifies the maximum I/O
1318 rate to allow in MB/s. The $flags parameter can take the bitwise
1319 union of the values:
1320
1321 Sys::Virt::Domain::BLOCK_COMMIT_BANDWIDTH_BYTES
1322 The $bandwidth parameter value is measured in bytes instead of
1323 MB/s.
1324
1325 $count = $dom->num_of_snapshots()
1326 Return the number of saved snapshots of the domain
1327
1328 @names = $dom->list_snapshot_names()
1329 List the names of all saved snapshots. The names can be used with
1330 the "lookup_snapshot_by_name"
1331
1332 @snapshots = $dom->list_snapshots()
1333 Return a list of all snapshots currently known to the domain. The
1334 elements in the returned list are instances of the
1335 Sys::Virt::DomainSnapshot class. This method requires O(n) RPC
1336 calls, so the "list_all_snapshots" method is recommended as a more
1337 efficient alternative.
1338
1339 my @snapshots = $dom->list_all_snapshots($flags)
1340 Return a list of all domain snapshots associated with this domain.
1341 The elements in the returned list are instances of the
1342 Sys::Virt::DomainSnapshot class. The $flags parameter can be used
1343 to filter the list of return domain snapshots.
1344
1345 my $snapshot = $dom->get_snapshot_by_name($name)
1346 Return the domain snapshot with a name of $name. The returned
1347 object is an instance of the Sys::Virt::DomainSnapshot class.
1348
1349 $dom->has_current_snapshot()
1350 Returns a true value if the domain has a currently active snapshot
1351
1352 $snapshot = $dom->current_snapshot()
1353 Returns the currently active snapshot for the domain.
1354
1355 $snapshot = $dom->create_snapshot($xml[, $flags])
1356 Create a new snapshot from the $xml. The $flags parameter accepts
1357 the SNAPSHOT CREATION constants listed in
1358 "Sys::Virt::DomainSnapshots".
1359
1360 my @checkpoints = $dom->list_all_checkpoints($flags)
1361 Return a list of all domain checkpoints associated with this
1362 domain. The elements in the returned list are instances of the
1363 Sys::Virt::DomainCheckpoint class. The $flags parameter can be used
1364 to filter the list of return domain checkpoints.
1365
1366 my $checkpoint = $dom->get_checkpoint_by_name($name)
1367 Return the domain checkpoint with a name of $name. The returned
1368 object is an instance of the Sys::Virt::DomainCheckpoint class.
1369
1370 $checkpoint = $dom->create_checkpoint($xml[, $flags])
1371 Create a new checkpoint from the $xml. The $flags parameter accepts
1372 the CHECKPOINT CREATION constants listed in
1373 "Sys::Virt::DomainCheckpoints".
1374
1375 $dom->backup_begin($backupxml, $checkpointxml=undef, $flags=0);
1376 Start a point-in-time backup job for the specified disks of a
1377 running domain. The $backupxml parameter describes the backup
1378 operation, including which disks to use. The optional
1379 $checkpointxml parameter can be used to create a checkpoint
1380 covering to the same point in time as the backup. The optional
1381 $flags parameter can be one of the following constants:
1382
1383 Sys::Virt::Domain::BACKUP_BEGIN_REUSE_EXTERNAL
1384 Assume that the output/temporary files for the backup have been
1385 precreated by the caller with the correct size and format.
1386
1387 $xml = $dom->backup_get_xml_description($flags=0);
1388 Get the XML description of the currently executing backup job. If
1389 there is no backup job then an error is raised.
1390
1391 $dom->fs_trim($mountPoint, $minimum, $flags=0);
1392 Issue an FS_TRIM command to the device at $mountPoint to remove
1393 chunks of unused space that are at least $minimum bytes in length.
1394 $flags is currently unused and defaults to zero.
1395
1396 $dom->fs_freeze(\@mountPoints, $flags=0);
1397 Freeze all the filesystems associated with the @mountPoints array
1398 reference. If <@mountPoints> is an empty list, then all filesystems
1399 will be frozen. $flags is currently unused and defaults to zero.
1400
1401 $dom->fs_thaw(\@mountPoints, $flags=0);
1402 Thaw all the filesystems associated with the @mountPoints array
1403 reference. If <@mountPoints> is an empty list, then all filesystems
1404 will be thawed. $flags is currently unused and defaults to zero.
1405
1406 @fslist = $dom->get_fs_info($flags=0);
1407 Obtain a list of all guest filesystems. The returned list will
1408 contain one element for each filesystem, whose value will be a hash
1409 reference with the following keys
1410
1411 name
1412 The name of the guest device that is mounted
1413
1414 fstype
1415 The filesystem type (eg 'ext4', 'fat', 'ntfs', etc)
1416
1417 mountpoint
1418 The location in the filesystem tree of the mount
1419
1420 devalias
1421 An array reference containing list of device aliases associated
1422 with the guest device. The device aliases correspond to disk
1423 target names in the guest XML configuration
1424
1425 @nics = $dom->get_interface_addresses($src, $flags=0);
1426 Obtain a list of all guest network interfaces. The $src parameter
1427 is one of the constants
1428
1429 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_LEASE
1430 Extract the DHCP server lease information
1431
1432 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_AGENT
1433 Query the guest OS via an agent
1434
1435 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_ARP
1436 Extract from the local ARP tables
1437
1438 The returned list will contain one element for each interface. The
1439 values in the list will be a hash reference with the following keys
1440
1441 name
1442 The name of the guest interface that is mounted
1443
1444 hwaddr
1445 The hardware address, aka MAC, if available.
1446
1447 addrs
1448 An array reference containing list of IP addresses associated
1449 with the guest NIC. Each element in the array is a further hash
1450 containing
1451
1452 addr
1453 The IP address string
1454
1455 prefix
1456 The IP address network prefix
1457
1458 type
1459 The IP address type (IPv4 vs IPv6)
1460
1461 $dom->send_process_signal($pid, $signum, $flags=0);
1462 Send the process $pid the signal $signum. The $signum value must be
1463 one of the constants listed later, not a POSIX or Linux signal
1464 value. $flags is currently unused and defaults to zero.
1465
1466 $dom->set_block_threshold($dev, $threshold, $flags=0);
1467 Set the threshold level for delivering the EVENT_ID_BLOCK_THRESHOLD
1468 if the device or backing chain element described by $dev is written
1469 beyond the set $threshold level. The threshold level is unset once
1470 the event fires. The event might not be delivered at all if
1471 libvirtd was not running at the moment when the threshold was
1472 reached.
1473
1474 $dom->set_lifecycle_action($type, $action, $flags=0)
1475 Changes the actions of lifecycle events for domain represented as
1476 <on_$type>$action</on_$type> in the domain XML.
1477
1478 $info = $dom->get_launch_security_info($flags=0)
1479 Get information about the domain launch security policy. $flags is
1480 currently unused and defaults to zero. The returned hash may
1481 contain the following keys
1482
1483 Sys::Virt::Domain::LAUNCH_SECURITY_SEV_MEASUREMENT
1484 The AMD SEV launch measurement
1485
1486 $info = $dom->get_guest_info($types, $flags=0)
1487 Get information about the domain guest configuration. The $types
1488 parameter determines what pieces of information are returned and
1489 should be the bitwise or of the following constants:
1490
1491 Sys::Virt::Domain::GUEST_INFO_USERS
1492 Active user information
1493
1494 Sys::Virt::Domain::GUEST_INFO_OS
1495 Misc operating system information
1496
1497 Sys::Virt::Domain::GUEST_INFO_TIMEZONE
1498 The guest timezone
1499
1500 Sys::Virt::Domain::GUEST_INFO_HOSTNAME
1501 The guest hostname
1502
1503 Sys::Virt::Domain::GUEST_INFO_FILESYSTEM
1504 Filesystem mount information
1505
1506 Sys::Virt::Domain::GUEST_INFO_DISKS
1507 Block device information
1508
1509 $flags is currently unused and defaults to zero.
1510
1511 $dom->set_agent_response_timeout($timeout, $flags=0)
1512 Set the amount of time to wait for the agent to respond to a
1513 command. $timeout is a positive integer representing the number of
1514 seconds to wait, or one of the constants:
1515
1516 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_BLOCK
1517 Wait forever with no timeout
1518
1519 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_NOWAIT
1520 Don't want at all, return immediately
1521
1522 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_DEFAULT
1523 Use the hypervisor driver's default timeout
1524
1525 The $flags parameter is currently unused and defaults to zero.
1526
1527 my @keys = $dom->authorized_ssh_keys_get($user, $flags=0)
1528 Retrieve the list of authorized SSH keys for the user account
1529 $user. The $flags parameter is currently unused and defaults to
1530 zero.
1531
1532 $dom->authorized_ssh_keys_set($user, \@keys, $flags=0)
1533 Update the list of authorized SSH keys for the user account $user.
1534 The @keys parameter should be an array reference containing the new
1535 keys, if any. The default behaviour is to set the authorized SSH
1536 keys to the exact set specified in @keys. This can be modified via
1537 the $flags parameter which takes the following constants
1538
1539 Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_APPEND
1540 Append @keys to the current set of keys, rather than replacing
1541 the existing keys.
1542
1543 Sys::Virt::Domain::AUTHORIZED_SSH_KEYS_SET_REMOVE
1544 Remove @keys from the current set of keys, rather than
1545 replacing the existing keys. It is not an error if the keys do
1546 not exist.
1547
1549 A number of the APIs take a "flags" parameter. In most cases passing a
1550 value of zero will be satisfactory. Some APIs, however, accept named
1551 constants to alter their behaviour. This section documents the current
1552 known constants.
1553
1554 DOMAIN STATE
1555 The domain state constants are useful in interpreting the "state" key
1556 in the hash returned by the "get_info" method.
1557
1558 Sys::Virt::Domain::STATE_NOSTATE
1559 The domain is active, but is not running / blocked (eg idle)
1560
1561 Sys::Virt::Domain::STATE_RUNNING
1562 The domain is active and running
1563
1564 Sys::Virt::Domain::STATE_BLOCKED
1565 The domain is active, but execution is blocked
1566
1567 Sys::Virt::Domain::STATE_PAUSED
1568 The domain is active, but execution has been paused
1569
1570 Sys::Virt::Domain::STATE_SHUTDOWN
1571 The domain is active, but in the shutdown phase
1572
1573 Sys::Virt::Domain::STATE_SHUTOFF
1574 The domain is inactive, and shut down.
1575
1576 Sys::Virt::Domain::STATE_CRASHED
1577 The domain is inactive, and crashed.
1578
1579 Sys::Virt::Domain::STATE_PMSUSPENDED
1580 The domain is active, but in power management suspend state
1581
1582 CONTROL INFO
1583 The following constants can be used to determine what the guest domain
1584 control channel status is
1585
1586 Sys::Virt::Domain::CONTROL_ERROR
1587 The control channel has a fatal error
1588
1589 Sys::Virt::Domain::CONTROL_OK
1590 The control channel is ready for jobs
1591
1592 Sys::Virt::Domain::CONTROL_OCCUPIED
1593 The control channel is busy
1594
1595 Sys::Virt::Domain::CONTROL_JOB
1596 The control channel is busy with a job
1597
1598 If the status is "Sys::Virt::Domain::CONTROL_ERROR", then one of the
1599 following constants describes the reason
1600
1601 Sys::Virt::Domain::CONTROL_ERROR_REASON_NONE
1602 There is no reason for the error available
1603
1604 Sys::Virt::Domain::CONTROL_ERROR_REASON_UNKNOWN
1605 The reason for the error is unknown
1606
1607 Sys::Virt::Domain::CONTROL_ERROR_REASON_INTERNAL
1608 There was an internal error in libvirt
1609
1610 Sys::Virt::Domain::CONTROL_ERROR_REASON_MONITOR
1611 There was an error speaking to the monitor
1612
1613 DOMAIN CREATION
1614 The following constants can be used to control the behaviour of domain
1615 creation
1616
1617 Sys::Virt::Domain::START_PAUSED
1618 Keep the guest vCPUs paused after starting the guest
1619
1620 Sys::Virt::Domain::START_AUTODESTROY
1621 Automatically destroy the guest when the connection is closed (or
1622 fails)
1623
1624 Sys::Virt::Domain::START_BYPASS_CACHE
1625 Do not use OS I/O cache if starting a domain with a saved state
1626 image
1627
1628 Sys::Virt::Domain::START_FORCE_BOOT
1629 Boot the guest, even if there was a saved snapshot
1630
1631 Sys::Virt::Domain::START_VALIDATE
1632 Validate the XML document against the XML schema
1633
1634 DOMAIN DEFINE
1635 The following constants can be used to control the behaviour of domain
1636 define operations
1637
1638 Sys::Virt::Domain::DEFINE_VALIDATE
1639 Validate the XML document against the XML schema
1640
1641 KEYCODE SETS
1642 The following constants define the set of supported keycode sets
1643
1644 Sys::Virt::Domain::KEYCODE_SET_LINUX
1645 The Linux event subsystem keycodes
1646
1647 Sys::Virt::Domain::KEYCODE_SET_XT
1648 The original XT keycodes
1649
1650 Sys::Virt::Domain::KEYCODE_SET_ATSET1
1651 The AT Set1 keycodes (aka XT)
1652
1653 Sys::Virt::Domain::KEYCODE_SET_ATSET2
1654 The AT Set2 keycodes (aka AT)
1655
1656 Sys::Virt::Domain::KEYCODE_SET_ATSET3
1657 The AT Set3 keycodes (aka PS2)
1658
1659 Sys::Virt::Domain::KEYCODE_SET_OSX
1660 The OS-X keycodes
1661
1662 Sys::Virt::Domain::KEYCODE_SET_XT_KBD
1663 The XT keycodes from the Linux Keyboard driver
1664
1665 Sys::Virt::Domain::KEYCODE_SET_USB
1666 The USB HID keycode set
1667
1668 Sys::Virt::Domain::KEYCODE_SET_WIN32
1669 The Windows keycode set
1670
1671 Sys::Virt::Domain::KEYCODE_SET_QNUM
1672 The XT keycode set, with the extended scancodes using the high bit
1673 of the first byte, instead of the low bit of the second byte.
1674
1675 Sys::Virt::Domain::KEYCODE_SET_RFB
1676 A deprecated alias for "Sys::Virt::Domain::KEYCODE_SET_QNUM"
1677
1678 MEMORY PEEK
1679 The following constants can be used with the "memory_peek" method's
1680 flags parameter
1681
1682 Sys::Virt::Domain::MEMORY_VIRTUAL
1683 Indicates that the offset is using virtual memory addressing.
1684
1685 Sys::Virt::Domain::MEMORY_PHYSICAL
1686 Indicates that the offset is using physical memory addressing.
1687
1688 VCPU STATE
1689 The following constants are useful when interpreting the virtual CPU
1690 run state
1691
1692 Sys::Virt::Domain::VCPU_OFFLINE
1693 The virtual CPU is not online
1694
1695 Sys::Virt::Domain::VCPU_RUNNING
1696 The virtual CPU is executing code
1697
1698 Sys::Virt::Domain::VCPU_BLOCKED
1699 The virtual CPU is waiting to be scheduled
1700
1701 VCPU HOST PLACEMENT STATE
1702 The following constants are useful when interpreting the virtual CPU
1703 host placement
1704
1705 Sys::Virt::Domain::VCPU_INFO_CPU_OFFLINE
1706 The virtual CPU is not online
1707
1708 Sys::Virt::Domain::VCPU_INFO_CPU_UNAVAILABLE
1709 The virtual CPU placement is not available from this hypervisor
1710
1711 OPEN GRAPHICS CONSTANTS
1712 The following constants are used when opening a connection to the guest
1713 graphics server
1714
1715 Sys::Virt::Domain::OPEN_GRAPHICS_SKIPAUTH
1716 Skip authentication of the client
1717
1718 OPEN CONSOLE CONSTANTS
1719 The following constants are used when opening a connection to the guest
1720 console
1721
1722 Sys::Virt::Domain::OPEN_CONSOLE_FORCE
1723 Force opening of the console, disconnecting any other open session
1724
1725 Sys::Virt::Domain::OPEN_CONSOLE_SAFE
1726 Check if the console driver supports safe operations
1727
1728 OPEN CHANNEL CONSTANTS
1729 The following constants are used when opening a connection to the guest
1730 channel
1731
1732 Sys::Virt::Domain::OPEN_CHANNEL_FORCE
1733 Force opening of the channel, disconnecting any other open session
1734
1735 XML DUMP OPTIONS
1736 The following constants are used to control the information included in
1737 the XML configuration dump
1738
1739 Sys::Virt::Domain::XML_INACTIVE
1740 Report the persistent inactive configuration for the guest, even if
1741 it is currently running.
1742
1743 Sys::Virt::Domain::XML_SECURE
1744 Include security sensitive information in the XML dump, such as
1745 passwords.
1746
1747 Sys::Virt::Domain::XML_UPDATE_CPU
1748 Update the CPU model definition to match the current executing
1749 state.
1750
1751 Sys::Virt::Domain::XML_MIGRATABLE
1752 Update the XML to allow migration to older versions of libvirt
1753
1754 DEVICE HOTPLUG OPTIONS
1755 The following constants are used to control device hotplug operations
1756
1757 Sys::Virt::Domain::DEVICE_MODIFY_CURRENT
1758 Modify the domain in its current state
1759
1760 Sys::Virt::Domain::DEVICE_MODIFY_LIVE
1761 Modify only the live state of the domain
1762
1763 Sys::Virt::Domain::DEVICE_MODIFY_CONFIG
1764 Modify only the persistent config of the domain
1765
1766 Sys::Virt::Domain::DEVICE_MODIFY_FORCE
1767 Force the device to be modified
1768
1769 MEMORY OPTIONS
1770 The following constants are used to control memory change operations
1771
1772 Sys::Virt::Domain::MEM_CURRENT
1773 Modify the current state
1774
1775 Sys::Virt::Domain::MEM_LIVE
1776 Modify only the live state of the domain
1777
1778 Sys::Virt::Domain::MEM_CONFIG
1779 Modify only the persistent config of the domain
1780
1781 Sys::Virt::Domain::MEM_MAXIMUM
1782 Modify the maximum memory value
1783
1784 CONFIG OPTIONS
1785 The following constants are used to control what configuration a domain
1786 update changes
1787
1788 Sys::Virt::Domain::AFFECT_CURRENT
1789 Modify the current state
1790
1791 Sys::Virt::Domain::AFFECT_LIVE
1792 Modify only the live state of the domain
1793
1794 Sys::Virt::Domain::AFFECT_CONFIG
1795 Modify only the persistent config of the domain
1796
1797 MIGRATE OPTIONS
1798 The following constants are used to control how migration is performed
1799
1800 Sys::Virt::Domain::MIGRATE_LIVE
1801 Migrate the guest without interrupting its execution on the source
1802 host.
1803
1804 Sys::Virt::Domain::MIGRATE_PEER2PEER
1805 Manage the migration process over a direct peer-2-peer connection
1806 between the source and destination host libvirtd daemons.
1807
1808 Sys::Virt::Domain::MIGRATE_TUNNELLED
1809 Tunnel the migration data over the libvirt daemon connection,
1810 rather than the native hypervisor data transport. Requires
1811 PEER2PEER flag to be set.
1812
1813 Sys::Virt::Domain::MIGRATE_PERSIST_DEST
1814 Make the domain persistent on the destination host, defining its
1815 configuration file upon completion of migration.
1816
1817 Sys::Virt::Domain::MIGRATE_UNDEFINE_SOURCE
1818 Remove the domain's persistent configuration after migration
1819 completes successfully.
1820
1821 Sys::Virt::Domain::MIGRATE_PAUSED
1822 Do not re-start execution of the guest CPUs on the destination host
1823 after migration completes.
1824
1825 Sys::Virt::Domain::MIGRATE_NON_SHARED_DISK
1826 Copy the complete contents of the disk images during migration
1827
1828 Sys::Virt::Domain::MIGRATE_NON_SHARED_INC
1829 Copy the incrementally changed contents of the disk images during
1830 migration
1831
1832 Sys::Virt::Domain::MIGRATE_CHANGE_PROTECTION
1833 Do not allow changes to the virtual domain configuration while
1834 migration is taking place. This option is automatically implied if
1835 doing a peer-2-peer migration.
1836
1837 Sys::Virt::Domain::MIGRATE_UNSAFE
1838 Migrate even if the compatibility check indicates the migration
1839 will be unsafe to the guest.
1840
1841 Sys::Virt::Domain::MIGRATE_OFFLINE
1842 Migrate the guest config if the guest is not currently running
1843
1844 Sys::Virt::Domain::MIGRATE_COMPRESSED
1845 Enable compression of the migration data stream
1846
1847 Sys::Virt::Domain::MIGRATE_ABORT_ON_ERROR
1848 Abort if an I/O error occurrs on the disk
1849
1850 Sys::Virt::Domain::MIGRATE_AUTO_CONVERGE
1851 Force convergance of the migration operation by throttling guest
1852 runtime
1853
1854 Sys::Virt::Domain::MIGRATE_RDMA_PIN_ALL
1855 Pin memory for RDMA transfer
1856
1857 Sys::Virt::Domain::MIGRATE_POSTCOPY
1858 Enable support for post-copy migration
1859
1860 Sys::Virt::Domain::MIGRATE_TLS
1861 Setting this flag will cause the migration to attempt to use the
1862 TLS environment configured by the hypervisor in order to perform
1863 the migration. If incorrectly configured on either source or
1864 destination, the migration will fail.
1865
1866 Sys::Virt::Domain::MIGRATE_PARALLEL
1867 Send memory pages to the destination host through several network
1868 connections. See "Sys::Virt::Domain::MIGRATE_PARAM_PARALLEL_*"
1869 parameters for configuring the parallel migration.
1870
1871 UNDEFINE CONSTANTS
1872 The following constants can be used when undefining virtual domain
1873 configurations
1874
1875 Sys::Virt::Domain::UNDEFINE_MANAGED_SAVE
1876 Also remove any managed save image when undefining the virtual
1877 domain
1878
1879 Sys::Virt::Domain::UNDEFINE_SNAPSHOTS_METADATA
1880 Also remove any snapshot metadata when undefining the virtual
1881 domain.
1882
1883 Sys::Virt::Domain::UNDEFINE_NVRAM
1884 Also remove any NVRAM state file when undefining the virtual
1885 domain.
1886
1887 Sys::Virt::Domain::UNDEFINE_KEEP_NVRAM
1888 keep NVRAM state file when undefining the virtual domain.
1889
1890 Sys::Virt::Domain::UNDEFINE_CHECKPOINTS_METADATA
1891 Also remove any checkpoint metadata when undefining the virtual
1892 domain.
1893
1894 JOB TYPES
1895 The following constants describe the different background job types.
1896
1897 Sys::Virt::Domain::JOB_NONE
1898 No job is active
1899
1900 Sys::Virt::Domain::JOB_BOUNDED
1901 A job with a finite completion time is active
1902
1903 Sys::Virt::Domain::JOB_UNBOUNDED
1904 A job with an unbounded completion time is active
1905
1906 Sys::Virt::Domain::JOB_COMPLETED
1907 The job has finished, but isn't cleaned up
1908
1909 Sys::Virt::Domain::JOB_FAILED
1910 The job has hit an error, but isn't cleaned up
1911
1912 Sys::Virt::Domain::JOB_CANCELLED
1913 The job was aborted at user request, but isn't cleaned up
1914
1915 MEMORY PARAMETERS
1916 The following constants are useful when getting/setting memory
1917 parameters for guests
1918
1919 Sys::Virt::Domain::MEMORY_HARD_LIMIT
1920 The maximum memory the guest can use.
1921
1922 Sys::Virt::Domain::MEMORY_SOFT_LIMIT
1923 The memory upper limit enforced during memory contention.
1924
1925 Sys::Virt::Domain::MEMORY_MIN_GUARANTEE
1926 The minimum memory guaranteed to be reserved for the guest.
1927
1928 Sys::Virt::Domain::MEMORY_SWAP_HARD_LIMIT
1929 The maximum swap the guest can use.
1930
1931 Sys::Virt::Domain::MEMORY_PARAM_UNLIMITED
1932 The value of an unlimited memory parameter
1933
1934 BLKIO PARAMETERS
1935 The following parameters control I/O tuning for the domain as a whole
1936
1937 Sys::Virt::Domain::BLKIO_WEIGHT
1938 The I/O weight parameter
1939
1940 Sys::Virt::Domain::BLKIO_DEVICE_WEIGHT
1941 The per-device I/O weight parameter
1942
1943 Sys::Virt::Domain::BLKIO_DEVICE_READ_BPS
1944 The per-device I/O bytes read per second
1945
1946 Sys::Virt::Domain::BLKIO_DEVICE_READ_IOPS
1947 The per-device I/O operations read per second
1948
1949 Sys::Virt::Domain::BLKIO_DEVICE_WRITE_BPS
1950 The per-device I/O bytes write per second
1951
1952 Sys::Virt::Domain::BLKIO_DEVICE_WRITE_IOPS
1953 The per-device I/O operations write per second
1954
1955 BLKIO TUNING PARAMETERS
1956 The following parameters control I/O tuning for an individual guest
1957 disk.
1958
1959 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC
1960 The total bytes processed per second.
1961
1962 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC
1963 The bytes read per second.
1964
1965 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC
1966 The bytes written per second.
1967
1968 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC
1969 The total I/O operations processed per second.
1970
1971 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC
1972 The I/O operations read per second.
1973
1974 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC
1975 The I/O operations written per second.
1976
1977 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX
1978 The maximum total bytes processed per second.
1979
1980 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX
1981 The maximum bytes read per second.
1982
1983 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX
1984 The maximum bytes written per second.
1985
1986 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX
1987 The maximum total I/O operations processed per second.
1988
1989 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX
1990 The maximum I/O operations read per second.
1991
1992 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX
1993 The maximum I/O operations written per second.
1994
1995 Sys::Virt::Domain::BLOCK_IOTUNE_SIZE_IOPS_SEC
1996 The maximum I/O operations per second
1997
1998 Sys::Virt::Domain::BLOCK_IOTUNE_GROUP_NAME
1999 A string representing a group name to allow sharing of I/O
2000 throttling quota between multiple drives
2001
2002 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTH
2003 The duration in seconds allowed for maximum total bytes processed
2004 per second.
2005
2006 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTH
2007 The duration in seconds allowed for maximum bytes read per second.
2008
2009 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTH
2010 The duration in seconds allowed for maximum bytes written per
2011 second.
2012
2013 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTH
2014 The duration in seconds allowed for maximum total I/O operations
2015 processed per second.
2016
2017 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTH
2018 The duration in seconds allowed for maximum I/O operations read per
2019 second.
2020
2021 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTH
2022 The duration in seconds allowed for maximum I/O operations written
2023 per second.
2024
2025 SCHEDULER CONSTANTS
2026 Sys::Virt::Domain::SCHEDULER_CAP
2027 The VM cap tunable
2028
2029 Sys::Virt::Domain::SCHEDULER_CPU_SHARES
2030 The CPU shares tunable
2031
2032 Sys::Virt::Domain::SCHEDULER_LIMIT
2033 The VM limit tunable
2034
2035 Sys::Virt::Domain::SCHEDULER_RESERVATION
2036 The VM reservation tunable
2037
2038 Sys::Virt::Domain::SCHEDULER_SHARES
2039 The VM shares tunable
2040
2041 Sys::Virt::Domain::SCHEDULER_VCPU_PERIOD
2042 The VCPU period tunable
2043
2044 Sys::Virt::Domain::SCHEDULER_VCPU_QUOTA
2045 The VCPU quota tunable
2046
2047 Sys::Virt::Domain::SCHEDULER_GLOBAL_PERIOD
2048 The VM global period tunable
2049
2050 Sys::Virt::Domain::SCHEDULER_GLOBAL_QUOTA
2051 The VM global quota tunable
2052
2053 Sys::Virt::Domain::SCHEDULER_WEIGHT
2054 The VM weight tunable
2055
2056 NUMA PARAMETERS
2057 The following constants are useful when getting/setting the guest NUMA
2058 memory policy
2059
2060 Sys::Virt::Domain::NUMA_MODE
2061 The NUMA policy mode
2062
2063 Sys::Virt::Domain::NUMA_NODESET
2064 The NUMA nodeset mask
2065
2066 The following constants are useful when interpreting the
2067 "Sys::Virt::Domain::NUMA_MODE" parameter value
2068
2069 Sys::Virt::Domain::NUMATUNE_MEM_STRICT
2070 Allocation is mandatory from the mask nodes
2071
2072 Sys::Virt::Domain::NUMATUNE_MEM_PREFERRED
2073 Allocation is preferred from the masked nodes
2074
2075 Sys::Virt::Domain::NUMATUNE_MEM_INTERLEAVE
2076 Allocation is interleaved across all masked nods
2077
2078 INTERFACE PARAMETERS
2079 The following constants are useful when getting/setting the per network
2080 interface tunable parameters
2081
2082 Sys::Virt::Domain::BANDWIDTH_IN_AVERAGE
2083 The average inbound bandwidth
2084
2085 Sys::Virt::Domain::BANDWIDTH_IN_PEAK
2086 The peak inbound bandwidth
2087
2088 Sys::Virt::Domain::BANDWIDTH_IN_BURST
2089 The burstable inbound bandwidth
2090
2091 Sys::Virt::Domain::BANDWIDTH_IN_FLOOR
2092 The minimum inbound bandwidth
2093
2094 Sys::Virt::Domain::BANDWIDTH_OUT_AVERAGE
2095 The average outbound bandwidth
2096
2097 Sys::Virt::Domain::BANDWIDTH_OUT_PEAK
2098 The peak outbound bandwidth
2099
2100 Sys::Virt::Domain::BANDWIDTH_OUT_BURST
2101 The burstable outbound bandwidth
2102
2103 PERF EVENTS
2104 The following constants defined performance events which can be
2105 monitored for a guest
2106
2107 Sys::Virt::Domain::PERF_PARAM_CMT
2108 The CMT event counter which can be used to measure the usage of
2109 cache (bytes) by applications running on the platform. It
2110 corresponds to the "perf.cmt" field in the *Stats APIs.
2111
2112 Sys::Virt::Domain::PERF_PARAM_MBML
2113 The MBML event counter which can be used to monitor the amount of
2114 data (bytes/s) sent through the memory controller on the socket.
2115 It corresponds to the "perf.mbml" field in the *Stats APIs.
2116
2117 Sys::Virt::Domain::PERF_PARAM_MBMT
2118 The MBMT event counter which can be used to monitor total system
2119 bandwidth (bytes/s) from one level of cache to another. It
2120 corresponds to the "perf.mbmt" field in the *Stats APIs.
2121
2122 Sys::Virt::Domain::PERF_PARAM_CACHE_MISSES
2123 The cache_misses perf event counter which can be used to measure
2124 the count of cache misses by applications running on the platform.
2125 It corresponds to the "perf.cache_misses" field in the *Stats APIs.
2126
2127 Sys::Virt::Domain::PERF_PARAM_CACHE_REFERENCES
2128 The cache_references perf event counter which can be used to
2129 measure the count of cache hits by applications running on the
2130 platform. It corresponds to the "perf.cache_references" field in
2131 the *Stats APIs.
2132
2133 Sys::Virt::Domain::PERF_PARAM_CPU_CYCLES
2134 The cpu_cycles perf event counter which can be used to measure how
2135 many cpu cycles one instruction needs. It corresponds to the
2136 "perf.cpu_cycles" field in the *Stats APIs.
2137
2138 Sys::Virt::Domain::PERF_PARAM_INSTRUCTIONS
2139 The instructions perf event counter which can be used to measure
2140 the count of instructions by applications running on the platform.
2141 It corresponds to the "perf.instructions" field in the *Stats APIs.
2142
2143 Sys::Virt::Domain::PERF_PARAM_BRANCH_INSTRUCTIONS
2144 The branch_instructions perf event counter which can be used to
2145 measure the count of instructions by applications running on the
2146 platform. It corresponds to the "perf.branch_instructions" field in
2147 the *Stats APIs.
2148
2149 Sys::Virt::Domain::PERF_PARAM_BRANCH_MISSES
2150 The branch_misses perf event which can be used to measure the count
2151 of branch misses by applications running on the platform. It
2152 corresponds to the "perf.branch_misses" field in the *Stats APIs.
2153
2154 Sys::Virt::Domain::PERF_PARAM_BUS_CYCLES The bus_cycles perf event
2155 counter which can be used to measure the count of bus cycles by
2156 applications running on the platform. It corresponds to the
2157 "perf.bus_cycles" field in the *Stats APIs.
2158 Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_FRONTEND The
2159 stalled_cycles_frontend perf event counter which can be used to measure
2160 the count of stalled cpu cycles in the frontend of the instruction
2161 processor pipeline by applications running on the platform. It
2162 corresponds to the "perf.stalled_cycles_frontend" field in the *Stats
2163 APIs.
2164 Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_BACKEND The
2165 stalled_cycles_backend perf event counter which can be used to measure
2166 the count of stalled cpu cycles in the backend of the instruction
2167 processor pipeline by application running on the platform. It
2168 corresponds to the "perf.stalled_cycles_backend" field in the *Stats
2169 APIs.
2170 Sys::Virt::Domain::PERF_PARAM_REF_CPU_CYCLES The ref_cpu_cycles perf
2171 event counter which can be used to measure the count of total cpu
2172 cycles not affected by CPU frequency scaling by applications running on
2173 the platform. It corresponds to the "perf.ref_cpu_cycles" field in the
2174 *Stats APIs.
2175 Sys::Virt::Domain::PERF_PARAM_CPU_CLOCK The cpu_clock perf event
2176 counter which can be used to measure the count of cpu clock time by
2177 applications running on the platform. It corresponds to the
2178 "perf.cpu_clock" field in the *Stats APIs.
2179 Sys::Virt::Domain::PERF_PARAM_TASK_CLOCK The task_clock perf event
2180 counter which can be used to measure the count of task clock time by
2181 applications running on the platform. It corresponds to the
2182 "perf.task_clock" field in the *Stats APIs.
2183 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS The page_faults perf event
2184 counter which can be used to measure the count of page faults by
2185 applications running on the platform. It corresponds to the
2186 "perf.page_faults" field in the *Stats APIs.
2187 Sys::Virt::Domain::PERF_PARAM_CONTEXT_SWITCHES The context_switches
2188 perf event counter which can be used to measure the count of context
2189 switches by applications running on the platform. It corresponds to the
2190 "perf.context_switches" field in the *Stats APIs.
2191 Sys::Virt::Domain::PERF_PARAM_CPU_MIGRATIONS The cpu_migrations perf
2192 event counter which can be used to measure the count of cpu migrations
2193 by applications running on the platform. It corresponds to the
2194 "perf.cpu_migrations" field in the *Stats APIs.
2195 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MIN The page_faults_min perf
2196 event counter which can be used to measure the count of minor page
2197 faults by applications running on the platform. It corresponds to the
2198 "perf.page_faults_min" field in the *Stats APIs.
2199 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MAJ The page_faults_maj perf
2200 event counter which can be used to measure the count of major page
2201 faults by applications running on the platform. It corresponds to the
2202 "perf.page_faults_maj" field in the *Stats APIs.
2203 Sys::Virt::Domain::PERF_PARAM_ALIGNMENT_FAULTS The alignment_faults
2204 perf event counter which can be used to measure the count of alignment
2205 faults by applications running on the platform. It corresponds to the
2206 "perf.alignment_faults" field in the *Stats APIs.
2207 Sys::Virt::Domain::PERF_PARAM_EMULATION_FAULTS The emulation_faults
2208 perf event counter which can be used to measure the count of emulation
2209 faults by applications running on the platform. It corresponds to the
2210 "perf.emulation_faults" field in the *Stats APIs.
2211
2212 IOTHREAD STATS
2213 The following constants defined IOThread statistics which can be
2214 monitored for a guest
2215
2216 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_MAX_NS
2217 The maximum polling time that can be used by polling algorithm in
2218 ns. The polling time starts at 0 (zero) and is the time spent by
2219 the guest to process IOThread data before returning the CPU to the
2220 host. The polling time will be dynamically modified over time based
2221 on the poll_grow and poll_shrink parameters provided.
2222
2223 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_GROW
2224 This provides a value for the dynamic polling adjustment algorithm
2225 to use to grow its polling interval up to the poll_max_ns value.
2226
2227 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_SHRINK
2228 This provides a value for the dynamic polling adjustment algorithm
2229 to use to shrink its polling interval when the polling interval
2230 exceeds the poll_max_ns value.
2231
2232 VCPU FLAGS
2233 The following constants are useful when getting/setting the VCPU count
2234 for a guest
2235
2236 Sys::Virt::Domain::VCPU_LIVE
2237 Flag to request the live value
2238
2239 Sys::Virt::Domain::VCPU_CONFIG
2240 Flag to request the persistent config value
2241
2242 Sys::Virt::Domain::VCPU_CURRENT
2243 Flag to request the current config value
2244
2245 Sys::Virt::Domain::VCPU_MAXIMUM
2246 Flag to request adjustment of the maximum vCPU value
2247
2248 Sys::Virt::Domain::VCPU_GUEST
2249 Flag to request the guest VCPU mask
2250
2251 Sys::Virt::Domain::VCPU_HOTPLUGGABLE
2252 Flag to make vcpus added hot(un)pluggable
2253
2254 STATE CHANGE EVENTS
2255 The following constants allow domain state change events to be
2256 interpreted. The events contain both a state change, and a reason.
2257
2258 Sys::Virt::Domain::EVENT_DEFINED
2259 Indicates that a persistent configuration has been defined for the
2260 domain.
2261
2262 Sys::Virt::Domain::EVENT_DEFINED_ADDED
2263 The defined configuration is newly added
2264
2265 Sys::Virt::Domain::EVENT_DEFINED_UPDATED
2266 The defined configuration is an update to an existing
2267 configuration
2268
2269 Sys::Virt::Domain::EVENT_DEFINED_RENAMED
2270 The defined configuration is a rename of an existing
2271 configuration
2272
2273 Sys::Virt::Domain::EVENT_DEFINED_FROM_SNAPSHOT
2274 The defined configuration was restored from a snapshot
2275
2276 Sys::Virt::Domain::EVENT_RESUMED
2277 The domain has resumed execution
2278
2279 Sys::Virt::Domain::EVENT_RESUMED_MIGRATED
2280 The domain resumed because migration has completed. This is
2281 emitted on the destination host.
2282
2283 Sys::Virt::Domain::EVENT_RESUMED_UNPAUSED
2284 The domain resumed because the admin unpaused it.
2285
2286 Sys::Virt::Domain::EVENT_RESUMED_FROM_SNAPSHOT
2287 The domain resumed because it was restored from a snapshot
2288
2289 Sys::Virt::Domain::EVENT_RESUMED_POSTCOPY
2290 The domain resumed but post-copy is running in background
2291
2292 Sys::Virt::Domain::EVENT_STARTED
2293 The domain has started running
2294
2295 Sys::Virt::Domain::EVENT_STARTED_BOOTED
2296 The domain was booted from shutoff state
2297
2298 Sys::Virt::Domain::EVENT_STARTED_MIGRATED
2299 The domain started due to an incoming migration
2300
2301 Sys::Virt::Domain::EVENT_STARTED_RESTORED
2302 The domain was restored from saved state file
2303
2304 Sys::Virt::Domain::EVENT_STARTED_FROM_SNAPSHOT
2305 The domain was restored from a snapshot
2306
2307 Sys::Virt::Domain::EVENT_STARTED_WAKEUP
2308 The domain was woken up from suspend
2309
2310 Sys::Virt::Domain::EVENT_STOPPED
2311 The domain has stopped running
2312
2313 Sys::Virt::Domain::EVENT_STOPPED_CRASHED
2314 The domain stopped because guest operating system has crashed
2315
2316 Sys::Virt::Domain::EVENT_STOPPED_DESTROYED
2317 The domain stopped because administrator issued a destroy
2318 command.
2319
2320 Sys::Virt::Domain::EVENT_STOPPED_FAILED
2321 The domain stopped because of a fault in the host
2322 virtualization environment.
2323
2324 Sys::Virt::Domain::EVENT_STOPPED_MIGRATED
2325 The domain stopped because it was migrated to another machine.
2326
2327 Sys::Virt::Domain::EVENT_STOPPED_SAVED
2328 The domain was saved to a state file
2329
2330 Sys::Virt::Domain::EVENT_STOPPED_SHUTDOWN
2331 The domain stopped due to graceful shutdown of the guest.
2332
2333 Sys::Virt::Domain::EVENT_STOPPED_FROM_SNAPSHOT
2334 The domain was stopped due to a snapshot
2335
2336 Sys::Virt::Domain::EVENT_SHUTDOWN
2337 The domain has shutdown but is not yet stopped
2338
2339 Sys::Virt::Domain::EVENT_SHUTDOWN_FINISHED
2340 The domain finished shutting down
2341
2342 Sys::Virt::Domain::EVENT_SHUTDOWN_HOST
2343 The domain shutdown due to host trigger
2344
2345 Sys::Virt::Domain::EVENT_SHUTDOWN_GUEST
2346 The domain shutdown due to guest trigger
2347
2348 Sys::Virt::Domain::EVENT_SUSPENDED
2349 The domain has stopped executing, but still exists
2350
2351 Sys::Virt::Domain::EVENT_SUSPENDED_MIGRATED
2352 The domain has been suspended due to offline migration
2353
2354 Sys::Virt::Domain::EVENT_SUSPENDED_PAUSED
2355 The domain has been suspended due to administrator pause
2356 request.
2357
2358 Sys::Virt::Domain::EVENT_SUSPENDED_IOERROR
2359 The domain has been suspended due to a block device I/O error.
2360
2361 Sys::Virt::Domain::EVENT_SUSPENDED_FROM_SNAPSHOT
2362 The domain has been suspended due to resume from snapshot
2363
2364 Sys::Virt::Domain::EVENT_SUSPENDED_WATCHDOG
2365 The domain has been suspended due to the watchdog triggering
2366
2367 Sys::Virt::Domain::EVENT_SUSPENDED_RESTORED
2368 The domain has been suspended due to restore from saved state
2369
2370 Sys::Virt::Domain::EVENT_SUSPENDED_API_ERROR
2371 The domain has been suspended due to an API error
2372
2373 Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY
2374 The domain has been suspended for post-copy migration
2375
2376 Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY_FAILED
2377 The domain has been suspended due post-copy migration failing
2378
2379 Sys::Virt::Domain::EVENT_UNDEFINED
2380 The persistent configuration has gone away
2381
2382 Sys::Virt::Domain::EVENT_UNDEFINED_REMOVED
2383 The domain configuration has gone away due to it being removed
2384 by administrator.
2385
2386 Sys::Virt::Domain::EVENT_UNDEFINED_RENAMED
2387 The undefined configuration is a rename of an existing
2388 configuration
2389
2390 Sys::Virt::Domain::EVENT_PMSUSPENDED
2391 The domain has stopped running
2392
2393 Sys::Virt::Domain::EVENT_PMSUSPENDED_MEMORY
2394 The domain has suspend to RAM.
2395
2396 Sys::Virt::Domain::EVENT_PMSUSPENDED_DISK
2397 The domain has suspend to Disk.
2398
2399 Sys::Virt::Domain::EVENT_CRASHED
2400 The domain has crashed
2401
2402 Sys::Virt::Domain::EVENT_CRASHED_PANICKED
2403 The domain has crashed due to a kernel panic
2404
2405 Sys::Virt::Domain::EVENT_CRASHED_CRASHLOADED
2406 The domain has crashed and reloaded itself
2407
2408 EVENT ID CONSTANTS
2409 Sys::Virt::Domain::EVENT_ID_LIFECYCLE
2410 Domain lifecycle events
2411
2412 Sys::Virt::Domain::EVENT_ID_REBOOT
2413 Soft / warm reboot events
2414
2415 Sys::Virt::Domain::EVENT_ID_RTC_CHANGE
2416 RTC clock adjustments
2417
2418 Sys::Virt::Domain::EVENT_ID_IO_ERROR
2419 File IO errors, typically from disks
2420
2421 Sys::Virt::Domain::EVENT_ID_WATCHDOG
2422 Watchdog device triggering
2423
2424 Sys::Virt::Domain::EVENT_ID_GRAPHICS
2425 Graphics client connections.
2426
2427 Sys::Virt::Domain::EVENT_ID_IO_ERROR_REASON
2428 File IO errors, typically from disks, with a root cause
2429
2430 Sys::Virt::Domain::EVENT_ID_CONTROL_ERROR
2431 Errors from the virtualization control channel
2432
2433 Sys::Virt::Domain::EVENT_ID_BLOCK_JOB
2434 Completion status of asynchronous block jobs, identified by source
2435 file name.
2436
2437 Sys::Virt::Domain::EVENT_ID_BLOCK_JOB_2
2438 Completion status of asynchronous block jobs, identified by target
2439 device name.
2440
2441 Sys::Virt::Domain::EVENT_ID_DISK_CHANGE
2442 Changes in disk media
2443
2444 Sys::Virt::Domain::EVENT_ID_TRAY_CHANGE
2445 CDROM media tray state
2446
2447 Sys::Virt::Domain::EVENT_ID_PMSUSPEND
2448 Power management initiated suspend to RAM
2449
2450 Sys::Virt::Domain::EVENT_ID_PMSUSPEND_DISK
2451 Power management initiated suspend to Disk
2452
2453 Sys::Virt::Domain::EVENT_ID_PMWAKEUP
2454 Power management initiated wakeup
2455
2456 Sys::Virt::Domain::EVENT_ID_BALLOON_CHANGE
2457 Balloon target changes
2458
2459 Sys::Virt::Domain::EVENT_ID_DEVICE_ADDED
2460 Asynchronous guest device addition
2461
2462 Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVED
2463 Asynchronous guest device removal
2464
2465 Sys::Virt::Domain::EVENT_ID_TUNABLE
2466 Changes of any domain tuning parameters. The callback will be
2467 provided with a hash listing all changed parameters. The later
2468 DOMAIN TUNABLE constants can be useful when accessing the hash keys
2469
2470 Sys::Virt::Domain::EVENT_ID_AGENT_LIFECYCLE
2471 Domain guest agent lifecycle events. The "state" parameter to the
2472 callback will match one of the constants
2473
2474 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_CONNECTED
2475 The agent is now connected
2476
2477 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED
2478 The agent is now disconnected
2479
2480 The second parameter, "reason", matches one of the following
2481 constants
2482
2483 Sys::Virt::Domain::EVENT_ID_MIGRATION_ITERATION
2484 Domain migration progress iteration. The "iteration" parameter to
2485 the callback will specify the number of iterations migration has
2486 made over guest RAM.
2487
2488 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN
2489 The reason is unknown
2490
2491 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED
2492 The domain was initially booted
2493
2494 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_CHANNEL
2495 The channel on a running guest changed state
2496
2497 Sys::Virt::Domain::EVENT_ID_JOB_COMPLETED
2498 Domain background job completion notification. The callback
2499 provides a hash containing the job stats. The keyus in the hash are
2500 the same as those used with the
2501 "Sys::Virt::Domain::get_job_stats()" method.
2502
2503 Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVAL_FAILED
2504 Guest device removal has failed.
2505
2506 Sys::Virt::Domain::EVENT_ID_METADATA_CHANGE
2507 The domain metadata has changed
2508
2509 Sys::Virt::Domain::EVENT_ID_BLOCK_THRESHOLD
2510 The event occurs when the hypervisor detects that the given storage
2511 element was written beyond the point specified by threshold. The
2512 event is useful for thin-provisioned storage.
2513
2514 Sys::Virt::Domain::EVENT_ID_MEMORY_FAILURE
2515 The event occurs when the hypervisor detects hardware memory
2516 corruption.
2517
2518 IO ERROR EVENT CONSTANTS
2519 These constants describe what action was taken due to the IO error.
2520
2521 Sys::Virt::Domain::EVENT_IO_ERROR_NONE
2522 No action was taken, the error was ignored & reported as success to
2523 guest
2524
2525 Sys::Virt::Domain::EVENT_IO_ERROR_PAUSE
2526 The guest is paused since the error occurred
2527
2528 Sys::Virt::Domain::EVENT_IO_ERROR_REPORT
2529 The error has been reported to the guest OS
2530
2531 WATCHDOG EVENT CONSTANTS
2532 These constants describe what action was taken due to the watchdog
2533 firing
2534
2535 Sys::Virt::Domain::EVENT_WATCHDOG_NONE
2536 No action was taken, the watchdog was ignored
2537
2538 Sys::Virt::Domain::EVENT_WATCHDOG_PAUSE
2539 The guest is paused since the watchdog fired
2540
2541 Sys::Virt::Domain::EVENT_WATCHDOG_POWEROFF
2542 The guest is powered off after the watchdog fired
2543
2544 Sys::Virt::Domain::EVENT_WATCHDOG_RESET
2545 The guest is reset after the watchdog fired
2546
2547 Sys::Virt::Domain::EVENT_WATCHDOG_SHUTDOWN
2548 The guest attempted to gracefully shutdown after the watchdog fired
2549
2550 Sys::Virt::Domain::EVENT_WATCHDOG_DEBUG
2551 No action was taken, the watchdog was logged
2552
2553 Sys::Virt::Domain::EVENT_WATCHDOG_INJECTNMI
2554 An NMI was injected into the guest after the watchdog fired
2555
2556 GRAPHICS EVENT PHASE CONSTANTS
2557 These constants describe the phase of the graphics connection
2558
2559 Sys::Virt::Domain::EVENT_GRAPHICS_CONNECT
2560 The initial client connection
2561
2562 Sys::Virt::Domain::EVENT_GRAPHICS_INITIALIZE
2563 The client has been authenticated & the connection is running
2564
2565 Sys::Virt::Domain::EVENT_GRAPHICS_DISCONNECT
2566 The client has disconnected
2567
2568 GRAPHICS EVENT ADDRESS CONSTANTS
2569 These constants describe the format of the address
2570
2571 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV4
2572 An IPv4 address
2573
2574 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV6
2575 An IPv6 address
2576
2577 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_UNIX
2578 An UNIX socket path address
2579
2580 DISK CHANGE EVENT CONSTANTS
2581 These constants describe the reason for a disk change event
2582
2583 Sys::Virt::Domain::EVENT_DISK_CHANGE_MISSING_ON_START
2584 The disk media was cleared, as its source was missing when
2585 attempting to start the guest
2586
2587 Sys::Virt::Domain::EVENT_DISK_DROP_MISSING_ON_START
2588 The disk device was dropped, as its source was missing when
2589 attempting to start the guest
2590
2591 TRAY CHANGE CONSTANTS
2592 These constants describe the reason for a tray change event
2593
2594 Sys::Virt::Domain::EVENT_TRAY_CHANGE_CLOSE
2595 The tray was closed
2596
2597 Sys::Virt::Domain::EVENT_TRAY_CHANGE_OPEN
2598 The tray was opened
2599
2600 DOMAIN BLOCK JOB TYPE CONSTANTS
2601 The following constants identify the different types of domain block
2602 jobs
2603
2604 Sys::Virt::Domain::BLOCK_JOB_TYPE_UNKNOWN
2605 An unknown block job type
2606
2607 Sys::Virt::Domain::BLOCK_JOB_TYPE_PULL
2608 The block pull job type
2609
2610 Sys::Virt::Domain::BLOCK_JOB_TYPE_COPY
2611 The block copy job type
2612
2613 Sys::Virt::Domain::BLOCK_JOB_TYPE_COMMIT
2614 The block commit job type
2615
2616 Sys::Virt::Domain::BLOCK_JOB_TYPE_ACTIVE_COMMIT
2617 The block active commit job type
2618
2619 Sys::Virt::Domain::BLOCK_JOB_TYPE_BACKUP
2620 The block backup job type
2621
2622 DOMAIN BLOCK JOB COMPLETION CONSTANTS
2623 The following constants can be used to determine the completion status
2624 of a block job
2625
2626 Sys::Virt::Domain::BLOCK_JOB_COMPLETED
2627 A successfully completed block job
2628
2629 Sys::Virt::Domain::BLOCK_JOB_FAILED
2630 An unsuccessful block job
2631
2632 Sys::Virt::Domain::BLOCK_JOB_CANCELED
2633 A block job canceled byy the user
2634
2635 Sys::Virt::Domain::BLOCK_JOB_READY
2636 A block job is running
2637
2638 DOMAIN BLOCK REBASE CONSTANTS
2639 The following constants are useful when rebasing block devices
2640
2641 Sys::Virt::Domain::BLOCK_REBASE_SHALLOW
2642 Limit copy to top of source backing chain
2643
2644 Sys::Virt::Domain::BLOCK_REBASE_REUSE_EXT
2645 Reuse existing external file for copy
2646
2647 Sys::Virt::Domain::BLOCK_REBASE_COPY_RAW
2648 Make destination file raw
2649
2650 Sys::Virt::Domain::BLOCK_REBASE_COPY
2651 Start a copy job
2652
2653 Sys::Virt::Domain::BLOCK_REBASE_COPY_DEV
2654 Treat destination as a block device instead of file
2655
2656 Sys::Virt::Domain::BLOCK_REBASE_RELATIVE
2657 Keep backing chain referenced using relative names
2658
2659 DOMAIN BLOCK COPY CONSTANTS
2660 The following constants are useful when copying block devices
2661
2662 Sys::Virt::Domain::BLOCK_COPY_SHALLOW
2663 Limit copy to top of source backing chain
2664
2665 Sys::Virt::Domain::BLOCK_COPY_REUSE_EXT
2666 Reuse existing external file for copy
2667
2668 Sys::Virt::Domain::BLOCK_COPY_TRANSIENT_JOB
2669 Don't force usage of recoverable job for the copy operation
2670
2671 DOMAIN BLOCK JOB ABORT CONSTANTS
2672 The following constants are useful when aborting job copy jobs
2673
2674 Sys::Virt::Domain::BLOCK_JOB_ABORT_ASYNC
2675 Request only, do not wait for completion
2676
2677 Sys::Virt::Domain::BLOCK_JOB_ABORT_PIVOT
2678 Pivot to mirror when ending a copy job
2679
2680 DOMAIN BLOCK COMMIT JOB CONSTANTS
2681 The following constants are useful with block commit job types
2682
2683 Sys::Virt::Domain::BLOCK_COMMIT_DELETE
2684 Delete any files that are invalid after commit
2685
2686 Sys::Virt::Domain::BLOCK_COMMIT_SHALLOW
2687 NULL base means next backing file, not whole chain
2688
2689 Sys::Virt::Domain::BLOCK_COMMIT_ACTIVE
2690 Allow two phase commit when top is active layer
2691
2692 Sys::Virt::Domain::BLOCK_COMMIT_RELATIVE
2693 Keep backing chain referenced using relative names
2694
2695 DOMAIN SAVE / RESTORE CONSTANTS
2696 The following constants can be used when saving or restoring virtual
2697 machines
2698
2699 Sys::Virt::Domain::SAVE_BYPASS_CACHE
2700 Do not use OS I/O cache when saving state.
2701
2702 Sys::Virt::Domain::SAVE_PAUSED
2703 Mark the saved state as paused to prevent the guest CPUs starting
2704 upon restore.
2705
2706 Sys::Virt::Domain::SAVE_RUNNING
2707 Mark the saved state as running to allow the guest CPUs to start
2708 upon restore.
2709
2710 DOMAIN CORE DUMP CONSTANTS
2711 The following constants can be used when triggering domain core dumps
2712
2713 Sys::Virt::Domain::DUMP_LIVE
2714 Do not pause execution while dumping the guest
2715
2716 Sys::Virt::Domain::DUMP_CRASH
2717 Crash the guest after completing the core dump
2718
2719 Sys::Virt::Domain::DUMP_BYPASS_CACHE
2720 Do not use OS I/O cache when writing core dump
2721
2722 Sys::Virt::Domain::DUMP_RESET
2723 Reset the virtual machine after finishing the dump
2724
2725 Sys::Virt::Domain::DUMP_MEMORY_ONLY
2726 Only include guest RAM in the dump, not the device state
2727
2728 DESTROY CONSTANTS
2729 The following constants are useful when terminating guests using the
2730 "destroy" API.
2731
2732 Sys::Virt::Domain::DESTROY_DEFAULT
2733 Destroy the guest using the default approach
2734
2735 Sys::Virt::Domain::DESTROY_GRACEFUL
2736 Destroy the guest in a graceful manner
2737
2738 SHUTDOWN CONSTANTS
2739 The following constants are useful when requesting that a guest
2740 terminate using the "shutdown" API
2741
2742 Sys::Virt::Domain::SHUTDOWN_DEFAULT
2743 Shutdown using the hypervisor's default mechanism
2744
2745 Sys::Virt::Domain::SHUTDOWN_GUEST_AGENT
2746 Shutdown by issuing a command to a guest agent
2747
2748 Sys::Virt::Domain::SHUTDOWN_ACPI_POWER_BTN
2749 Shutdown by injecting an ACPI power button press
2750
2751 Sys::Virt::Domain::SHUTDOWN_INITCTL
2752 Shutdown by talking to initctl (containers only)
2753
2754 Sys::Virt::Domain::SHUTDOWN_SIGNAL
2755 Shutdown by sending SIGTERM to the init process
2756
2757 Sys::Virt::Domain::SHUTDOWN_PARAVIRT
2758 Shutdown by issuing a paravirt power control command
2759
2760 REBOOT CONSTANTS
2761 The following constants are useful when requesting that a guest
2762 terminate using the "reboot" API
2763
2764 Sys::Virt::Domain::REBOOT_DEFAULT
2765 Reboot using the hypervisor's default mechanism
2766
2767 Sys::Virt::Domain::REBOOT_GUEST_AGENT
2768 Reboot by issuing a command to a guest agent
2769
2770 Sys::Virt::Domain::REBOOT_ACPI_POWER_BTN
2771 Reboot by injecting an ACPI power button press
2772
2773 Sys::Virt::Domain::REBOOT_INITCTL
2774 Reboot by talking to initctl (containers only)
2775
2776 Sys::Virt::Domain::REBOOT_SIGNAL
2777 Reboot by sending SIGHUP to the init process
2778
2779 Sys::Virt::Domain::REBOOT_PARAVIRT
2780 Reboot by issuing a paravirt power control command
2781
2782 METADATA CONSTANTS
2783 The following constants are useful when reading/writing metadata about
2784 a guest
2785
2786 Sys::Virt::Domain::METADATA_TITLE
2787 The short human friendly title of the guest
2788
2789 Sys::Virt::Domain::METADATA_DESCRIPTION
2790 The long free text description of the guest
2791
2792 Sys::Virt::Domain::METADATA_ELEMENT
2793 The structured metadata elements for the guest
2794
2795 DISK ERROR CONSTANTS
2796 The following constants are useful when interpreting disk error codes
2797
2798 Sys::Virt::Domain::DISK_ERROR_NONE
2799 No error
2800
2801 Sys::Virt::Domain::DISK_ERROR_NO_SPACE
2802 The host storage has run out of free space
2803
2804 Sys::Virt::Domain::DISK_ERROR_UNSPEC
2805 An unspecified error has occurred.
2806
2807 MEMORY STATISTIC CONSTANTS
2808 Sys::Virt::Domain::MEMORY_STAT_SWAP_IN
2809 Swap in
2810
2811 Sys::Virt::Domain::MEMORY_STAT_SWAP_OUT
2812 Swap out
2813
2814 Sys::Virt::Domain::MEMORY_STAT_MINOR_FAULT
2815 Minor faults
2816
2817 Sys::Virt::Domain::MEMORY_STAT_MAJOR_FAULT
2818 Major faults
2819
2820 Sys::Virt::Domain::MEMORY_STAT_RSS
2821 Resident memory
2822
2823 Sys::Virt::Domain::MEMORY_STAT_UNUSED
2824 Unused memory
2825
2826 Sys::Virt::Domain::MEMORY_STAT_AVAILABLE
2827 Available memory
2828
2829 Sys::Virt::Domain::MEMORY_STAT_ACTUAL_BALLOON
2830 Actual balloon limit
2831
2832 Sys::Virt::Domain::MEMORY_STAT_USABLE
2833 Amount of usable memory
2834
2835 Sys::Virt::Domain::MEMORY_STAT_LAST_UPDATE
2836 Time of last stats refresh from guest
2837
2838 Sys::Virt::Domain::MEMORY_STAT_DISK_CACHES
2839 Disk cache size
2840
2841 Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGALLOC
2842 The amount of successful huge page allocations
2843
2844 Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGFAIL
2845 The amount of failed huge page allocations
2846
2847 DOMAIN LIST CONSTANTS
2848 The following constants can be used when listing domains
2849
2850 Sys::Virt::Domain::LIST_ACTIVE
2851 Only list domains that are currently active (running, or paused)
2852
2853 Sys::Virt::Domain::LIST_AUTOSTART
2854 Only list domains that are set to automatically start on boot
2855
2856 Sys::Virt::Domain::LIST_HAS_SNAPSHOT
2857 Only list domains that have a stored snapshot
2858
2859 Sys::Virt::Domain::LIST_INACTIVE
2860 Only list domains that are currently inactive (shutoff, saved)
2861
2862 Sys::Virt::Domain::LIST_MANAGEDSAVE
2863 Only list domains that have current managed save state
2864
2865 Sys::Virt::Domain::LIST_NO_AUTOSTART
2866 Only list domains that are not set to automatically start on boto
2867
2868 Sys::Virt::Domain::LIST_NO_MANAGEDSAVE
2869 Only list domains that do not have any managed save state
2870
2871 Sys::Virt::Domain::LIST_NO_SNAPSHOT
2872 Only list domains that do not have a stored snapshot
2873
2874 Sys::Virt::Domain::LIST_OTHER
2875 Only list domains that are not running, paused or shutoff
2876
2877 Sys::Virt::Domain::LIST_PAUSED
2878 Only list domains that are paused
2879
2880 Sys::Virt::Domain::LIST_PERSISTENT
2881 Only list domains which have a persistent config
2882
2883 Sys::Virt::Domain::LIST_RUNNING
2884 Only list domains that are currently running
2885
2886 Sys::Virt::Domain::LIST_SHUTOFF
2887 Only list domains that are currently shutoff
2888
2889 Sys::Virt::Domain::LIST_TRANSIENT
2890 Only list domains that do not have a persistent config
2891
2892 Sys::Virt::Domain::LIST_HAS_CHECKPOINT
2893 Only list domains that have a stored checkpoint
2894
2895 Sys::Virt::Domain::LIST_NO_CHECKPOINT
2896 Only list domains that do not have a stored checkpoint
2897
2898 SEND KEY CONSTANTS
2899 The following constants are to be used with the "send_key" API
2900
2901 Sys::Virt::Domain::SEND_KEY_MAX_KEYS
2902 The maximum number of keys that can be sent in a single call to
2903 "send_key"
2904
2905 BLOCK STATS CONSTANTS
2906 The following constants provide the names of well known block stats
2907 fields
2908
2909 Sys::Virt::Domain::BLOCK_STATS_ERRS
2910 The number of I/O errors
2911
2912 Sys::Virt::Domain::BLOCK_STATS_FLUSH_REQ
2913 The number of flush requests
2914
2915 Sys::Virt::Domain::BLOCK_STATS_FLUSH_TOTAL_TIMES
2916 The time spent processing flush requests
2917
2918 Sys::Virt::Domain::BLOCK_STATS_READ_BYTES
2919 The amount of data read
2920
2921 Sys::Virt::Domain::BLOCK_STATS_READ_REQ
2922 The number of read requests
2923
2924 Sys::Virt::Domain::BLOCK_STATS_READ_TOTAL_TIMES
2925 The time spent processing read requests
2926
2927 Sys::Virt::Domain::BLOCK_STATS_WRITE_BYTES
2928 The amount of data written
2929
2930 Sys::Virt::Domain::BLOCK_STATS_WRITE_REQ
2931 The number of write requests
2932
2933 Sys::Virt::Domain::BLOCK_STATS_WRITE_TOTAL_TIMES
2934 The time spent processing write requests
2935
2936 CPU STATS CONSTANTS
2937 The following constants provide the names of well known cpu stats
2938 fields
2939
2940 Sys::Virt::Domain::CPU_STATS_CPUTIME
2941 The total CPU time, including both hypervisor and vCPU time.
2942
2943 Sys::Virt::Domain::CPU_STATS_USERTIME
2944 THe total time in kernel
2945
2946 Sys::Virt::Domain::CPU_STATS_SYSTEMTIME
2947 The total time in userspace
2948
2949 Sys::Virt::Domain::CPU_STATS_VCPUTIME
2950 The total vCPU time.
2951
2952 CPU STATS CONSTANTS
2953 The following constants provide the names of well known schedular
2954 parameters
2955
2956 Sys::Virt::SCHEDULER_EMULATOR_PERIOD
2957 The duration of the time period for scheduling the emulator
2958
2959 Sys::Virt::SCHEDULER_EMULATOR_QUOTA
2960 The quota for the emulator in one schedular time period
2961
2962 Sys::Virt::SCHEDULER_IOTHREAD_PERIOD
2963 The duration of the time period for scheduling the iothread
2964
2965 Sys::Virt::SCHEDULER_IOTHREAD_QUOTA
2966 The quota for the iothread in one schedular time period
2967
2968 DOMAIN STATS FLAG CONSTANTS
2969 The following constants are used as flags when requesting bulk domain
2970 stats from "Sys::Virt::get_all_domain_stats".
2971
2972 Sys::Virt::Domain::GET_ALL_STATS_ACTIVE
2973 Include stats for active domains
2974
2975 Sys::Virt::Domain::GET_ALL_STATS_INACTIVE
2976 Include stats for inactive domains
2977
2978 Sys::Virt::Domain::GET_ALL_STATS_OTHER
2979 Include stats for other domains
2980
2981 Sys::Virt::Domain::GET_ALL_STATS_PAUSED
2982 Include stats for paused domains
2983
2984 Sys::Virt::Domain::GET_ALL_STATS_PERSISTENT
2985 Include stats for persistent domains
2986
2987 Sys::Virt::Domain::GET_ALL_STATS_RUNNING
2988 Include stats for running domains
2989
2990 Sys::Virt::Domain::GET_ALL_STATS_SHUTOFF
2991 Include stats for shutoff domains
2992
2993 Sys::Virt::Domain::GET_ALL_STATS_TRANSIENT
2994 Include stats for transient domains
2995
2996 Sys::Virt::Domain::GET_ALL_STATS_ENFORCE_STATS
2997 Require that all requested stats fields are returned
2998
2999 Sys::Virt::Domain::GET_ALL_STATS_BACKING
3000 Get stats for image backing files too
3001
3002 Sys::Virt::Domain::GET_ALL_STATS_NOWAIT
3003 Skip stats if they can't be acquired without waiting
3004
3005 DOMAIN STATS FIELD CONSTANTS
3006 The following constants are used to control which fields are returned
3007 for stats queries.
3008
3009 Sys::Virt::Domain::STATS_BALLOON
3010 Balloon statistics
3011
3012 Sys::Virt::Domain::STATS_BLOCK
3013 Block device info
3014
3015 Sys::Virt::Domain::STATS_CPU_TOTAL
3016 CPU usage info
3017
3018 Sys::Virt::Domain::STATS_INTERFACE
3019 Network interface info
3020
3021 Sys::Virt::Domain::STATS_STATE
3022 General lifecycle state
3023
3024 Sys::Virt::Domain::STATS_VCPU
3025 Virtual CPU info
3026
3027 Sys::Virt::Domain::STATS_PERF
3028 Performance event counter values
3029
3030 Sys::Virt::Domain::STATS_IOTHREAD
3031 IOThread performance statistics values
3032
3033 Sys::Virt::Domain::STATS_MEMORY
3034 Memory bandwidth statistics values
3035
3036 PROCESS SIGNALS
3037 The following constants provide the names of signals which can be sent
3038 to guest processes. They mostly correspond to POSIX signal names.
3039
3040 Sys::Virt::Domain::PROCESS_SIGNAL_NOP
3041 SIGNOP
3042
3043 Sys::Virt::Domain::PROCESS_SIGNAL_HUP
3044 SIGHUP
3045
3046 Sys::Virt::Domain::PROCESS_SIGNAL_INT
3047 SIGINT
3048
3049 Sys::Virt::Domain::PROCESS_SIGNAL_QUIT
3050 SIGQUIT
3051
3052 Sys::Virt::Domain::PROCESS_SIGNAL_ILL
3053 SIGILL
3054
3055 Sys::Virt::Domain::PROCESS_SIGNAL_TRAP
3056 SIGTRAP
3057
3058 Sys::Virt::Domain::PROCESS_SIGNAL_ABRT
3059 SIGABRT
3060
3061 Sys::Virt::Domain::PROCESS_SIGNAL_BUS
3062 SIGBUS
3063
3064 Sys::Virt::Domain::PROCESS_SIGNAL_FPE
3065 SIGFPE
3066
3067 Sys::Virt::Domain::PROCESS_SIGNAL_KILL
3068 SIGKILL
3069
3070 Sys::Virt::Domain::PROCESS_SIGNAL_USR1
3071 SIGUSR1
3072
3073 Sys::Virt::Domain::PROCESS_SIGNAL_SEGV
3074 SIGSEGV
3075
3076 Sys::Virt::Domain::PROCESS_SIGNAL_USR2
3077 SIGUSR2
3078
3079 Sys::Virt::Domain::PROCESS_SIGNAL_PIPE
3080 SIGPIPE
3081
3082 Sys::Virt::Domain::PROCESS_SIGNAL_ALRM
3083 SIGALRM
3084
3085 Sys::Virt::Domain::PROCESS_SIGNAL_TERM
3086 SIGTERM
3087
3088 Sys::Virt::Domain::PROCESS_SIGNAL_STKFLT
3089 SIGSTKFLT
3090
3091 Sys::Virt::Domain::PROCESS_SIGNAL_CHLD
3092 SIGCHLD
3093
3094 Sys::Virt::Domain::PROCESS_SIGNAL_CONT
3095 SIGCONT
3096
3097 Sys::Virt::Domain::PROCESS_SIGNAL_STOP
3098 SIGSTOP
3099
3100 Sys::Virt::Domain::PROCESS_SIGNAL_TSTP
3101 SIGTSTP
3102
3103 Sys::Virt::Domain::PROCESS_SIGNAL_TTIN
3104 SIGTTIN
3105
3106 Sys::Virt::Domain::PROCESS_SIGNAL_TTOU
3107 SIGTTOU
3108
3109 Sys::Virt::Domain::PROCESS_SIGNAL_URG
3110 SIGURG
3111
3112 Sys::Virt::Domain::PROCESS_SIGNAL_XCPU
3113 SIGXCPU
3114
3115 Sys::Virt::Domain::PROCESS_SIGNAL_XFSZ
3116 SIGXFSZ
3117
3118 Sys::Virt::Domain::PROCESS_SIGNAL_VTALRM
3119 SIGVTALRM
3120
3121 Sys::Virt::Domain::PROCESS_SIGNAL_PROF
3122 SIGPROF
3123
3124 Sys::Virt::Domain::PROCESS_SIGNAL_WINCH
3125 SIGWINCH
3126
3127 Sys::Virt::Domain::PROCESS_SIGNAL_POLL
3128 SIGPOLL
3129
3130 Sys::Virt::Domain::PROCESS_SIGNAL_PWR
3131 SIGPWR
3132
3133 Sys::Virt::Domain::PROCESS_SIGNAL_SYS
3134 SIGSYS
3135
3136 Sys::Virt::Domain::PROCESS_SIGNAL_RT0
3137 SIGRT0
3138
3139 Sys::Virt::Domain::PROCESS_SIGNAL_RT1
3140 SIGRT1
3141
3142 Sys::Virt::Domain::PROCESS_SIGNAL_RT2
3143 SIGRT2
3144
3145 Sys::Virt::Domain::PROCESS_SIGNAL_RT3
3146 SIGRT3
3147
3148 Sys::Virt::Domain::PROCESS_SIGNAL_RT4
3149 SIGRT4
3150
3151 Sys::Virt::Domain::PROCESS_SIGNAL_RT5
3152 SIGRT5
3153
3154 Sys::Virt::Domain::PROCESS_SIGNAL_RT6
3155 SIGRT6
3156
3157 Sys::Virt::Domain::PROCESS_SIGNAL_RT7
3158 SIGRT7
3159
3160 Sys::Virt::Domain::PROCESS_SIGNAL_RT8
3161 SIGRT8
3162
3163 Sys::Virt::Domain::PROCESS_SIGNAL_RT9
3164 SIGRT9
3165
3166 Sys::Virt::Domain::PROCESS_SIGNAL_RT10
3167 SIGRT10
3168
3169 Sys::Virt::Domain::PROCESS_SIGNAL_RT11
3170 SIGRT11
3171
3172 Sys::Virt::Domain::PROCESS_SIGNAL_RT12
3173 SIGRT12
3174
3175 Sys::Virt::Domain::PROCESS_SIGNAL_RT13
3176 SIGRT13
3177
3178 Sys::Virt::Domain::PROCESS_SIGNAL_RT14
3179 SIGRT14
3180
3181 Sys::Virt::Domain::PROCESS_SIGNAL_RT15
3182 SIGRT15
3183
3184 Sys::Virt::Domain::PROCESS_SIGNAL_RT16
3185 SIGRT16
3186
3187 Sys::Virt::Domain::PROCESS_SIGNAL_RT17
3188 SIGRT17
3189
3190 Sys::Virt::Domain::PROCESS_SIGNAL_RT18
3191 SIGRT18
3192
3193 Sys::Virt::Domain::PROCESS_SIGNAL_RT19
3194 SIGRT19
3195
3196 Sys::Virt::Domain::PROCESS_SIGNAL_RT20
3197 SIGRT20
3198
3199 Sys::Virt::Domain::PROCESS_SIGNAL_RT21
3200 SIGRT21
3201
3202 Sys::Virt::Domain::PROCESS_SIGNAL_RT22
3203 SIGRT22
3204
3205 Sys::Virt::Domain::PROCESS_SIGNAL_RT23
3206 SIGRT23
3207
3208 Sys::Virt::Domain::PROCESS_SIGNAL_RT24
3209 SIGRT24
3210
3211 Sys::Virt::Domain::PROCESS_SIGNAL_RT25
3212 SIGRT25
3213
3214 Sys::Virt::Domain::PROCESS_SIGNAL_RT26
3215 SIGRT26
3216
3217 Sys::Virt::Domain::PROCESS_SIGNAL_RT27
3218 SIGRT27
3219
3220 Sys::Virt::Domain::PROCESS_SIGNAL_RT28
3221 SIGRT28
3222
3223 Sys::Virt::Domain::PROCESS_SIGNAL_RT29
3224 SIGRT29
3225
3226 Sys::Virt::Domain::PROCESS_SIGNAL_RT30
3227 SIGRT30
3228
3229 Sys::Virt::Domain::PROCESS_SIGNAL_RT31
3230 SIGRT31
3231
3232 Sys::Virt::Domain::PROCESS_SIGNAL_RT32
3233 SIGRT32
3234
3235 DOMAIN TUNABLE CONSTANTS
3236 The following constants are useful when accessing domain tuning
3237 parameters in APIs and events
3238
3239 Sys::Virt::Domain::TUNABLE_CPU_CPU_SHARES
3240 Proportional CPU weight
3241
3242 Sys::Virt::Domain::TUNABLE_CPU_EMULATORPIN
3243 Emulator thread CPU pinning mask
3244
3245 Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_PERIOD
3246 Emulator thread CPU period
3247
3248 Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_QUOTA
3249 Emulator thread CPU quota
3250
3251 Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_PERIOD
3252 Iothread thread CPU period
3253
3254 Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_QUOTA
3255 Iothread thread CPU quota
3256
3257 Sys::Virt::Domain::TUNABLE_CPU_VCPUPIN
3258 VCPU thread pinning mask
3259
3260 Sys::Virt::Domain::TUNABLE_CPU_VCPU_PERIOD
3261 VCPU thread period
3262
3263 Sys::Virt::Domain::TUNABLE_CPU_VCPU_QUOTA
3264 VCPU thread quota
3265
3266 Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_PERIOD
3267 VM global period
3268
3269 Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_QUOTA
3270 VM global quota
3271
3272 Sys::Virt::Domain::TUNABLE_BLKDEV_DISK
3273 The name of guest disks
3274
3275 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC
3276 Read throughput in bytes per sec
3277
3278 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC
3279 Read throughput in I/O operations per sec
3280
3281 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC
3282 Total throughput in bytes per sec
3283
3284 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC
3285 Total throughput in I/O operations per sec
3286
3287 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC
3288 Write throughput in bytes per sec
3289
3290 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC
3291 Write throughput in I/O operations per sec
3292
3293 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX
3294 Maximum read throughput in bytes per sec
3295
3296 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX
3297 Maximum read throughput in I/O operations per sec
3298
3299 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX
3300 Maximum total throughput in bytes per sec
3301
3302 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX
3303 Maximum total throughput in I/O operations per sec
3304
3305 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX
3306 Maximum write throughput in bytes per sec
3307
3308 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX
3309 Maximum write throughput in I/O operations per sec
3310
3311 Sys::Virt::Domain::TUNABLE_BLKDEV_SIZE_IOPS_SEC
3312 The maximum I/O operations per second
3313
3314 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX_LENGTH
3315 The duration in seconds allowed for maximum total bytes processed
3316 per second.
3317
3318 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX_LENGTH
3319 The duration in seconds allowed for maximum bytes read per second.
3320
3321 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX_LENGTH
3322 The duration in seconds allowed for maximum bytes written per
3323 second.
3324
3325 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX_LENGTH
3326 The duration in seconds allowed for maximum total I/O operations
3327 processed per second.
3328
3329 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX_LENGTH
3330 The duration in seconds allowed for maximum I/O operations read per
3331 second.
3332
3333 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX_LENGTH
3334 The duration in seconds allowed for maximum I/O operations written
3335 per second.
3336
3337 Sys::Virt::Domain::TUNABLE_BLKDEV_GROUP_NAME
3338 The name of the blkdev group
3339
3340 Sys::Virt::Domain::TUNABLE_IOTHREADSPIN
3341 The I/O threads pinning
3342
3343 DOMAIN LIFECYCLE CONSTANTS
3344 The following constants are useful when setting action for lifecycle
3345 events.
3346
3347 Sys::Virt::Domain::LIFECYCLE_POWEROFF
3348 The poweroff lifecycle event type
3349
3350 Sys::Virt::Domain::LIFECYCLE_REBOOT
3351 The reboot lifecycle event type
3352
3353 Sys::Virt::Domain::LIFECYCLE_CRASH
3354 The crash lifecycle event type
3355
3356 DOMAIN LIFECYCLE ACTION CONSTANTS
3357 Sys::Virt::Domain::LIFECYCLE_ACTION_DESTROY
3358 The destroy lifecycle action
3359
3360 Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART
3361 The restart lifecycle action
3362
3363 Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART_RENAME
3364 The restart-rename lifecycle action
3365
3366 Sys::Virt::Domain::LIFECYCLE_ACTION_PRESERVE
3367 The preserve lifecycle action
3368
3369 Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_DESTROY
3370 The coredump-destroy lifecycle action
3371
3372 Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_RESTART
3373 The coredump-restart lifecycle action
3374
3375 MEMORY FAILURE ACTION CONSTANTS
3376 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_IGNORE
3377 The failure could be ignored
3378
3379 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_INJECT
3380 An MCE was injected to the guest
3381
3382 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_FATAL
3383 The failure is non-recoverable and the hypervisor was not able to
3384 handle it
3385
3386 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_ACTION_RESET
3387 The failure is non-recoverable and the guest was not able to handle
3388 it.
3389
3390 MEMORY FAILURE RECIPIENT CONSTANTS
3391 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_RECIPIENT_HYPERVISOR
3392 The memory failure was in hypervisor address space
3393
3394 Sys::Virt::Domain::EVENT_MEMORY_FAILURE_RECIPIENT_GUEST
3395 The memory failure was in guest address space
3396
3397 MEMORY FAILURE FLAG CONSTANTS
3398 Sys::Virt::Domain::MEMORY_FAILURE_ACTION_REQUIRED
3399 Whether the flag is action-required or action-optional
3400
3401 Sys::Virt::Domain::MEMORY_FAILURE_RECURSIVE
3402 The failure occurred while the previous fault was being handled.
3403
3405 Daniel P. Berrange <berrange@redhat.com>
3406
3408 Copyright (C) 2006 Red Hat Copyright (C) 2006-2007 Daniel P. Berrange
3409
3411 This program is free software; you can redistribute it and/or modify it
3412 under the terms of either the GNU General Public License as published
3413 by the Free Software Foundation (either version 2 of the License, or at
3414 your option any later version), or, the Artistic License, as specified
3415 in the Perl README file.
3416
3418 Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
3419
3420
3421
3422perl v5.32.1 2021-03-02 Sys::Virt::Domain(3)