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 $ddom = $dom->migrate(destcon, flags=0, dname=undef, uri=undef,
845 bandwidth=0)
846 Migrate a domain to an alternative host. Use of positional
847 parameters with "migrate" is deprecated in favour of passing a hash
848 reference as described above.
849
850 $ddom = $dom->migrate2(destcon, dxml, flags, dname, uri, bandwidth)
851 Migrate a domain to an alternative host. This method is deprecated
852 in favour of passing a hash ref to "migrate".
853
854 $ddom = $dom->migrate_to_uri(desturi, \%params, flags=0)
855 Migrate a domain to an alternative host. The "desturi" parameter
856 should be a valid libvirt connection URI for the remote target
857 host. The "flags" parameter takes one or more of the
858 "Sys::Virt::Domain::MIGRATE_XXX" constants described later in this
859 document. The %params parameter is a hash reference used to set
860 various parameters for the migration operation, with the same keys
861 described for the "migrate" API.
862
863 $dom->migrate_to_uri(desturi, flags, dname, bandwidth)
864 Migrate a domain to an alternative host. Use of positional
865 parameters with "migrate_to_uri" is deprecated in favour of passing
866 a hash reference as described above.
867
868 $dom->migrate_to_uri2(dconnuri, miguri, dxml, flags, dname, bandwidth)
869 Migrate a domain to an alternative host. This method is deprecated
870 in favour of passing a hash ref to "migrate_to_uri".
871
872 $dom->migrate_set_max_downtime($downtime, $flags=0)
873 Set the maximum allowed downtime during migration of the guest. A
874 longer downtime makes it more likely that migration will complete,
875 at the cost of longer time blackout for the guest OS at the switch
876 over point. The "downtime" parameter is measured in milliseconds.
877 The $flags parameter is currently unused and defaults to zero.
878
879 $downtime = $dom->migrate_get_max_downtime($flags=0) Get the current
880 value of the maximum downtime allowed during a migration of a guest.
881 The returned <downtime> value is measured in milliseconds. The $flags
882 parameter is currently unused and defaults to zero.
883 $dom->migrate_set_max_speed($bandwidth, $flags=0)
884 Set the maximum allowed bandwidth during migration of the guest.
885 The "bandwidth" parameter is measured in MB/second. The $flags
886 parameter takes zero or more of the constants:
887
888 $Sys::Virt::Domain::MIGRATE_MAX_SPEED_POSTCOPY
889 Set the post-copy speed instead of the pre-copy speed.
890
891 $bandwidth = $dom->migrate_get_max_speed($flags=0)
892 Get the maximum allowed bandwidth during migration fo the guest.
893 The returned <bandwidth> value is measured in MB/second. The
894 $flags parameter is accepts the same constants as
895 "migrate_set_max_speed".
896
897 $dom->migrate_set_compression_cache($cacheSize, $flags=0)
898 Set the maximum allowed compression cache size during migration of
899 the guest. The "cacheSize" parameter is measured in bytes. The
900 $flags parameter is currently unused and defaults to zero.
901
902 $cacheSize = $dom->migrate_get_compression_cache($flags=0)
903 Get the maximum allowed compression cache size during migration of
904 the guest. The returned <bandwidth> value is measured in bytes.
905 The $flags parameter is currently unused and defaults to zero.
906
907 $dom->migrate_start_post_copy($flags=0)
908 Switch the domain from pre-copy to post-copy mode. This requires
909 that the original migrate command had the
910 "Sys::Virt::Domain::MIGRATE_POST_COPY" flag specified.
911
912 $dom->inject_nmi($flags)
913 Trigger an NMI in the guest virtual machine. The $flags parameter
914 is currently unused and defaults to 0.
915
916 $dom->open_console($st, $devname, $flags)
917 Open the text console for a serial, parallel or paravirt console
918 device identified by $devname, connecting it to the stream $st. If
919 $devname is undefined, the default console will be opened. $st must
920 be a "Sys::Virt::Stream" object used for bi-directional
921 communication with the console. $flags is currently unused,
922 defaulting to 0.
923
924 $dom->open_channel($st, $devname, $flags)
925 Open the text console for a data channel device identified by
926 $devname, connecting it to the stream $st. $st must be a
927 "Sys::Virt::Stream" object used for bi-directional communication
928 with the channel. $flags is currently unused, defaulting to 0.
929
930 $dom->open_graphics($idx, $fd, $flags)
931 Open the graphics console for a guest, identified by $idx, counting
932 from 0. The $fd should be a file descriptor for an anoymous socket
933 pair. The $flags argument should be one of the constants listed at
934 the end of this document, and defaults to 0.
935
936 $fd = $dom->open_graphics_fd($idx, $flags)
937 Open the graphics console for a guest, identified by $idx, counting
938 from 0. The $flags argument should be one of the constants listed
939 at the end of this document, and defaults to 0. The return value
940 will be a file descriptor connected to the console which must be
941 closed when no longer needed. This method is preferred over
942 "open_graphics" since it will work correctly under sVirt mandatory
943 access control policies.
944
945 my $mimetype = $dom->screenshot($st, $screen, $flags)
946 Capture a screenshot of the virtual machine's monitor. The $screen
947 parameter controls which monitor is captured when using a multi-
948 head or multi-card configuration. $st must be a "Sys::Virt::Stream"
949 object from which the data can be read. $flags is currently unused
950 and defaults to 0. The mimetype of the screenshot is returned
951
952 @vcpuinfo = $dom->get_vcpu_info($flags=0)
953 Obtain information about the state of all virtual CPUs in a running
954 guest domain. The returned list will have one element for each
955 vCPU, where each elements contains a hash reference. The keys in
956 the hash are, "number" the vCPU number, "cpu" the physical CPU on
957 which the vCPU is currently scheduled, "cpuTime" the cumulative
958 execution time of the vCPU, "state" the running state and
959 "affinity" giving the allowed shedular placement. The value for
960 "affinity" is a string representing a bitmask against physical
961 CPUs, 8 cpus per character. To extract the bits use the "unpack"
962 function with the "b*" template. NB The "state", "cpuTime", "cpu"
963 values are only available if using $flags value of 0, and the
964 domain is currently running; otherwise they will all be set to
965 zero.
966
967 $dom->pin_vcpu($vcpu, $mask)
968 Pin the virtual CPU given by index $vcpu to physical CPUs given by
969 $mask. The $mask is a string representing a bitmask against
970 physical CPUs, 8 cpus per character.
971
972 $mask = $dom->get_emulator_pin_info()
973 Obtain information about the CPU affinity of the emulator process.
974 The returned $mask is a bitstring against physical CPUs, 8 cpus per
975 character. To extract the bits use the "unpack" function with the
976 "b*" template.
977
978 $dom->pin_emulator($newmask, $flags=0)
979 Pin the emulator threads to the physical CPUs identified by the
980 affinity in $newmask. The $newmask is a bitstring against the
981 physical CPUa, 8 cpus per character. To create a suitable
982 bitstring, use the "vec" function with a value of 1 for the "BITS"
983 parameter.
984
985 @iothreadinfo = $dom->get_iothread_info($flags=0)
986 Obtain information about the state of all IOThreads in a running
987 guest domain. The returned list will have one element for each
988 IOThread, where each elements contains a hash reference. The keys
989 in the hash are, "number" the IOThread number and "affinity" giving
990 the allowed schedular placement. The value for "affinity" is a
991 string representing a bitmask against physical CPUs, 8 cpus per
992 character. To extract the bits use the "unpack" function with the
993 "b*" template.
994
995 $dom->pin_iothread($iothread, $mask)
996 Pin the IOThread given by index $iothread to physical CPUs given by
997 $mask. The $mask is a string representing a bitmask against
998 physical CPUs, 8 cpus per character.
999
1000 $dom->add_iothread($iothread, $flags=0)
1001 Add a new IOThread by the $iothread value to the guest domain. The
1002 $flags parameter accepts one or more the CONFIG OPTION constants
1003 documented later, and defaults to 0 if omitted.
1004
1005 $dom->del_iothread($iothread, $flags=0)
1006 Delete an existing IOThread by the $iothread value from the guest
1007 domain. The $flags parameter accepts one or more the CONFIG OPTION
1008 constants documented later, and defaults to 0 if omitted.
1009
1010 $dom->set_iothread($iothread, $params, $flags=0)
1011 Set parameters for the IOThread by the $iothread value on the guest
1012 domain. The $params parameter is a hash reference whose keys are
1013 the "IOTHREAD STATS" constants documented later. The $flags
1014 parameter accepts one or more the CONFIG OPTION constants
1015 documented later, and defaults to 0 if omitted.
1016
1017 my @stats = $dom->get_cpu_stats($startCpu, $numCpus, $flags=0)
1018 Requests the guests host physical CPU usage statistics, starting
1019 from host CPU <$startCpu> counting up to $numCpus. If $startCpu is
1020 -1 and $numCpus is 1, then the utilization across all CPUs is
1021 returned. Returns an array of hash references, each element
1022 containing stats for one CPU.
1023
1024 my $info = $dom->get_job_info()
1025 Returns a hash reference summarising the execution state of the
1026 background job. The elements of the hash are as follows:
1027
1028 type
1029 The type of job, one of the JOB TYPE constants listed later in
1030 this document.
1031
1032 timeElapsed
1033 The elapsed time in milliseconds
1034
1035 timeRemaining
1036 The expected remaining time in milliseconds. Only set if the
1037 "type" is JOB_UNBOUNDED.
1038
1039 dataTotal
1040 The total amount of data expected to be processed by the job,
1041 in bytes.
1042
1043 dataProcessed
1044 The current amount of data processed by the job, in bytes.
1045
1046 dataRemaining
1047 The expected amount of data remaining to be processed by the
1048 job, in bytes.
1049
1050 memTotal
1051 The total amount of mem expected to be processed by the job, in
1052 bytes.
1053
1054 memProcessed
1055 The current amount of mem processed by the job, in bytes.
1056
1057 memRemaining
1058 The expected amount of mem remaining to be processed by the
1059 job, in bytes.
1060
1061 fileTotal
1062 The total amount of file expected to be processed by the job,
1063 in bytes.
1064
1065 fileProcessed
1066 The current amount of file processed by the job, in bytes.
1067
1068 fileRemaining
1069 The expected amount of file remaining to be processed by the
1070 job, in bytes.
1071
1072 my ($type, $stats) = $dom->get_job_stats($flags=0)
1073 Returns an array summarising the execution state of the background
1074 job. The $type value is one of the JOB TYPE constants listed later
1075 in this document. The $stats value is a hash reference, whose
1076 elements are one of the following constants.
1077
1078 type
1079 The type of job, one of the JOB TYPE constants listed later in
1080 this document.
1081
1082 The $flags parameter defaults to zero and can take one of the
1083 following constants.
1084
1085 Sys::Virt::Domain::JOB_STATS_COMPLETED
1086 Return the stats of the most recently completed job.
1087
1088 Sys::Virt::Domain::JOB_STATS_KEEP_COMPLETED
1089 Don't clear the completed stats after reading them.
1090
1091 Sys::Virt::Domain::JOB_TIME_ELAPSED
1092 The elapsed time in milliseconds
1093
1094 Sys::Virt::Domain::JOB_TIME_ELAPSED_NET
1095 Time in milliseconds since the beginning of the migration job
1096 NOT including the time required to transfer control flow from
1097 the source host to the destination host.
1098
1099 Sys::Virt::Domain::JOB_TIME_REMAINING
1100 The expected remaining time in milliseconds. Only set if the
1101 "type" is JOB_UNBOUNDED.
1102
1103 Sys::Virt::Domain::JOB_DATA_TOTAL
1104 The total amount of data expected to be processed by the job,
1105 in bytes.
1106
1107 Sys::Virt::Domain::JOB_DATA_PROCESSED
1108 The current amount of data processed by the job, in bytes.
1109
1110 Sys::Virt::Domain::JOB_DATA_REMAINING
1111 The expected amount of data remaining to be processed by the
1112 job, in bytes.
1113
1114 Sys::Virt::Domain::JOB_MEMORY_TOTAL
1115 The total amount of mem expected to be processed by the job, in
1116 bytes.
1117
1118 Sys::Virt::Domain::JOB_MEMORY_PROCESSED
1119 The current amount of mem processed by the job, in bytes.
1120
1121 Sys::Virt::Domain::JOB_MEMORY_REMAINING
1122 The expected amount of mem remaining to be processed by the
1123 job, in bytes.
1124
1125 Sys::Virt::Domain::JOB_MEMORY_CONSTANT
1126 The number of pages filled with a constant byte which have been
1127 transferred
1128
1129 Sys::Virt::Domain::JOB_MEMORY_NORMAL
1130 The number of pages transferred without any compression
1131
1132 Sys::Virt::Domain::JOB_MEMORY_NORMAL_BYTES
1133 The number of bytes transferred without any compression
1134
1135 Sys::Virt::Domain::JOB_MEMORY_BPS
1136 The bytes per second transferred
1137
1138 Sys::Virt::Domain::JOB_MEMORY_DIRTY_RATE
1139 The number of memory pages dirtied per second
1140
1141 Sys::Virt::Domain::JOB_MEMORY_PAGE_SIZE
1142 The memory page size in bytes
1143
1144 Sys::Virt::Domain::JOB_MEMORY_ITERATION
1145 The total number of iterations over guest memory
1146
1147 Sys::Virt::Domain::JOB_MEMORY_POSTCOPY_REQS
1148 The number of page requests received from the destination host
1149 during post-copy migration.
1150
1151 Sys::Virt::Domain::JOB_DISK_TOTAL
1152 The total amount of file expected to be processed by the job,
1153 in bytes.
1154
1155 Sys::Virt::Domain::JOB_DISK_PROCESSED
1156 The current amount of file processed by the job, in bytes.
1157
1158 Sys::Virt::Domain::JOB_DISK_REMAINING
1159 The expected amount of file remaining to be processed by the
1160 job, in bytes.
1161
1162 Sys::Virt::Domain::JOB_DISK_BPS
1163 The bytes per second transferred
1164
1165 Sys::Virt::Domain::JOB_AUTO_CONVERGE_THROTTLE
1166 The percentage by which vCPUs are currently throttled
1167
1168 Sys::Virt::Domain::JOB_COMPRESSION_CACHE
1169 The size of the compression cache in bytes
1170
1171 Sys::Virt::Domain::JOB_COMPRESSION_BYTES
1172 The number of compressed bytes transferred
1173
1174 Sys::Virt::Domain::JOB_COMPRESSION_PAGES
1175 The number of compressed pages transferred
1176
1177 Sys::Virt::Domain::JOB_COMPRESSION_CACHE_MISSES
1178 The number of changing pages not in compression cache
1179
1180 Sys::Virt::Domain::JOB_COMPRESSION_OVERFLOW
1181 The number of changing pages in the compression cache but sent
1182 uncompressed since the compressed page was larger than the non-
1183 compressed page.
1184
1185 Sys::Virt::Domain::JOB_DOWNTIME
1186 The number of milliseconds of downtime expected during
1187 migration switchover.
1188
1189 Sys::Virt::Domain::JOB_DOWNTIME_NET
1190 Real measured downtime (ms) NOT including the time required to
1191 transfer control flow from the source host to the destination
1192 host.
1193
1194 Sys::Virt::Domain::JOB_SETUP_TIME
1195 The number of milliseconds of time doing setup of the job
1196
1197 Sys::Virt::Domain::JOB_OPERATION
1198 The type of operation associated with the job
1199
1200 Sys::Virt::Domain::JOB_SUCCESS
1201 Whether the job was successfully completed.
1202
1203 Sys::Virt::Domain::JOB_DISK_TEMP_TOTAL
1204 Possible total temporary disk space for the job in bytes
1205
1206 Sys::Virt::Domain::JOB_DISK_TEMP_USED
1207 Current total temporary disk space for the job in bytes
1208
1209 Sys::Virt::Domain::JOB_ERRMSG
1210 The error message from a failed job
1211
1212 The values for the Sys::Virt::Domain::JOB_OPERATION field are
1213
1214 Sys::Virt::Domain::JOB_OPERATION_UNKNOWN
1215 No known job type
1216
1217 Sys::Virt::Domain::JOB_OPERATION_START
1218 The guest is starting
1219
1220 Sys::Virt::Domain::JOB_OPERATION_SAVE
1221 The guest is saving to disk
1222
1223 Sys::Virt::Domain::JOB_OPERATION_RESTORE
1224 The guest is restoring from disk
1225
1226 Sys::Virt::Domain::JOB_OPERATION_MIGRATION_IN
1227 The guest is migrating in from another host
1228
1229 Sys::Virt::Domain::JOB_OPERATION_MIGRATION_OUT
1230 The guest is migrating out to another host
1231
1232 Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT
1233 The guest is saving a snapshot
1234
1235 Sys::Virt::Domain::JOB_OPERATION_SNAPSHOT_REVERT
1236 The guest is reverting to a snapshot
1237
1238 Sys::Virt::Domain::JOB_OPERATION_DUMP
1239 The guest is saving a crash dump
1240
1241 Sys::Virt::Domain::JOB_OPERATION_BACKUP
1242 The guest is performing a block backup
1243
1244 $dom->abort_job()
1245 Aborts the currently executing job
1246
1247 my $info = $dom->get_block_job_info($path, $flags=0)
1248 Returns a hash reference summarising the execution state of the
1249 block job. The $path parameter should be the fully qualified path
1250 of the block device being changed. Valid $flags include:
1251
1252 Sys::Virt::Domain::BLOCK_JOB_INFO_BANDWIDTH_BYTES
1253 Treat bandwidth value as bytes instead of MiB.
1254
1255 $dom->set_block_job_speed($path, $bandwidth, $flags=0)
1256 Change the maximum I/O bandwidth used by the block job that is
1257 currently executing for $path. The $bandwidth argument is specified
1258 in MB/s. The $flags parameter can take the bitwise union of the
1259 values:
1260
1261 Sys::Virt::Domain::BLOCK_JOB_SPEED_BANDWIDTH_BYTES
1262 The $bandwidth parameter value is measured in bytes/s instead
1263 of MB/s.
1264
1265 $dom->abort_block_job($path, $flags=0)
1266 Abort the current job that is executing for the block device
1267 associated with $path
1268
1269 $dom->block_pull($path, $bandwidth, $flags=0)
1270 Merge the backing files associated with $path into the top level
1271 file. The $bandwidth parameter specifies the maximum I/O rate to
1272 allow in MB/s. The $flags parameter can take the bitwise union of
1273 the values:
1274
1275 Sys::Virt::Domain::BLOCK_PULL_BANDWIDTH_BYTES
1276 The $bandwidth parameter value is measured in bytes/s instead
1277 of MB/s.
1278
1279 $dom->block_rebase($path, $base, $bandwidth, $flags=0)
1280 Switch the backing path associated with $path to instead use $base.
1281 The $bandwidth parameter specifies the maximum I/O rate to allow in
1282 MB/s. The $flags parameter can take the bitwise union of the
1283 values:
1284
1285 Sys::Virt::Domain::BLOCK_REBASE_BANDWIDTH_BYTES
1286 The $bandwidth parameter value is measured in bytes/s instead
1287 of MB/s.
1288
1289 $dom->block_copy($path, $destxml, $params, $flags=0)
1290 Copy contents of a disk image <$path> into the target volume
1291 described by $destxml which follows the schema of the <disk>
1292 element in the domain XML. The $params parameter is a hash of
1293 optional parameters to control the process
1294
1295 Sys::Virt::Domain::BLOCK_COPY_BANDWIDTH
1296 The maximum bandwidth in bytes per second.
1297
1298 Sys::Virt::Domain::BLOCK_COPY_GRANULARITY
1299 The granularity in bytes of the copy process
1300
1301 Sys::Virt::Domain::BLOCK_COPY_BUF_SIZE
1302 The maximum amount of data in flight in bytes.
1303
1304 $dom->block_commit($path, $base, $top, $bandwidth, $flags=0)
1305 Commit changes there were made to the temporary top level file
1306 $top. Takes all the differences between $top and $base and merge
1307 them into $base. The $bandwidth parameter specifies the maximum I/O
1308 rate to allow in MB/s. The $flags parameter can take the bitwise
1309 union of the values:
1310
1311 Sys::Virt::Domain::BLOCK_COMMIT_BANDWIDTH_BYTES
1312 The $bandwidth parameter value is measured in bytes instead of
1313 MB/s.
1314
1315 $count = $dom->num_of_snapshots()
1316 Return the number of saved snapshots of the domain
1317
1318 @names = $dom->list_snapshot_names()
1319 List the names of all saved snapshots. The names can be used with
1320 the "lookup_snapshot_by_name"
1321
1322 @snapshots = $dom->list_snapshots()
1323 Return a list of all snapshots currently known to the domain. The
1324 elements in the returned list are instances of the
1325 Sys::Virt::DomainSnapshot class. This method requires O(n) RPC
1326 calls, so the "list_all_snapshots" method is recommended as a more
1327 efficient alternative.
1328
1329 my @snapshots = $dom->list_all_snapshots($flags)
1330 Return a list of all domain snapshots associated with this domain.
1331 The elements in the returned list are instances of the
1332 Sys::Virt::DomainSnapshot class. The $flags parameter can be used
1333 to filter the list of return domain snapshots.
1334
1335 my $snapshot = $dom->get_snapshot_by_name($name)
1336 Return the domain snapshot with a name of $name. The returned
1337 object is an instance of the Sys::Virt::DomainSnapshot class.
1338
1339 $dom->has_current_snapshot()
1340 Returns a true value if the domain has a currently active snapshot
1341
1342 $snapshot = $dom->current_snapshot()
1343 Returns the currently active snapshot for the domain.
1344
1345 $snapshot = $dom->create_snapshot($xml[, $flags])
1346 Create a new snapshot from the $xml. The $flags parameter accepts
1347 the SNAPSHOT CREATION constants listed in
1348 "Sys::Virt::DomainSnapshots".
1349
1350 my @checkpoints = $dom->list_all_checkpoints($flags)
1351 Return a list of all domain checkpoints associated with this
1352 domain. The elements in the returned list are instances of the
1353 Sys::Virt::DomainCheckpoint class. The $flags parameter can be used
1354 to filter the list of return domain checkpoints.
1355
1356 my $checkpoint = $dom->get_checkpoint_by_name($name)
1357 Return the domain checkpoint with a name of $name. The returned
1358 object is an instance of the Sys::Virt::DomainCheckpoint class.
1359
1360 $checkpoint = $dom->create_checkpoint($xml[, $flags])
1361 Create a new checkpoint from the $xml. The $flags parameter accepts
1362 the CHECKPOINT CREATION constants listed in
1363 "Sys::Virt::DomainCheckpoints".
1364
1365 $dom->backup_begin($backupxml, $checkpointxml=undef, $flags=0);
1366 Start a point-in-time backup job for the specified disks of a
1367 running domain. The $backupxml parameter describes the backup
1368 operation, including which disks to use. The optional
1369 $checkpointxml parameter can be used to create a checkpoint
1370 covering to the same point in time as the backup. The optional
1371 $flags parameter can be one of the following constants:
1372
1373 Sys::Virt::Domain::BACKUP_BEGIN_REUSE_EXTERNAL
1374 Assume that the output/temporary files for the backup have been
1375 precreated by the caller with the correct size and format.
1376
1377 $xml = $dom->backup_get_xml_description($flags=0);
1378 Get the XML description of the currently executing backup job. If
1379 there is no backup job then an error is raised.
1380
1381 $dom->fs_trim($mountPoint, $minimum, $flags=0);
1382 Issue an FS_TRIM command to the device at $mountPoint to remove
1383 chunks of unused space that are at least $minimum bytes in length.
1384 $flags is currently unused and defaults to zero.
1385
1386 $dom->fs_freeze(\@mountPoints, $flags=0);
1387 Freeze all the filesystems associated with the @mountPoints array
1388 reference. If <@mountPoints> is an empty list, then all filesystems
1389 will be frozen. $flags is currently unused and defaults to zero.
1390
1391 $dom->fs_thaw(\@mountPoints, $flags=0);
1392 Thaw all the filesystems associated with the @mountPoints array
1393 reference. If <@mountPoints> is an empty list, then all filesystems
1394 will be thawed. $flags is currently unused and defaults to zero.
1395
1396 @fslist = $dom->get_fs_info($flags=0);
1397 Obtain a list of all guest filesystems. The returned list will
1398 contain one element for each filesystem, whose value will be a hash
1399 reference with the following keys
1400
1401 name
1402 The name of the guest device that is mounted
1403
1404 fstype
1405 The filesystem type (eg 'ext4', 'fat', 'ntfs', etc)
1406
1407 mountpoint
1408 The location in the filesystem tree of the mount
1409
1410 devalias
1411 An array reference containing list of device aliases associated
1412 with the guest device. The device aliases correspond to disk
1413 target names in the guest XML configuration
1414
1415 @nics = $dom->get_interface_addresses($src, $flags=0);
1416 Obtain a list of all guest network interfaces. The $src parameter
1417 is one of the constants
1418
1419 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_LEASE
1420 Extract the DHCP server lease information
1421
1422 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_AGENT
1423 Query the guest OS via an agent
1424
1425 Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_ARP
1426 Extract from the local ARP tables
1427
1428 The returned list will contain one element for each interface. The
1429 values in the list will be a hash reference with the following keys
1430
1431 name
1432 The name of the guest interface that is mounted
1433
1434 hwaddr
1435 The hardware address, aka MAC, if available.
1436
1437 addrs
1438 An array reference containing list of IP addresses associated
1439 with the guest NIC. Each element in the array is a further hash
1440 containing
1441
1442 addr
1443 The IP address string
1444
1445 prefix
1446 The IP address network prefix
1447
1448 type
1449 The IP address type (IPv4 vs IPv6)
1450
1451 $dom->send_process_signal($pid, $signum, $flags=0);
1452 Send the process $pid the signal $signum. The $signum value must be
1453 one of the constants listed later, not a POSIX or Linux signal
1454 value. $flags is currently unused and defaults to zero.
1455
1456 $dom->set_block_threshold($dev, $threshold, $flags=0);
1457 Set the threshold level for delivering the EVENT_ID_BLOCK_THRESHOLD
1458 if the device or backing chain element described by $dev is written
1459 beyond the set $threshold level. The threshold level is unset once
1460 the event fires. The event might not be delivered at all if
1461 libvirtd was not running at the moment when the threshold was
1462 reached.
1463
1464 $dom->set_lifecycle_action($type, $action, $flags=0)
1465 Changes the actions of lifecycle events for domain represented as
1466 <on_$type>$action</on_$type> in the domain XML.
1467
1468 $info = $dom->get_launch_security_info($flags=0)
1469 Get information about the domain launch security policy. $flags is
1470 currently unused and defaults to zero. The returned hash may
1471 contain the following keys
1472
1473 Sys::Virt::Domain::LAUNCH_SECURITY_SEV_MEASUREMENT
1474 The AMD SEV launch measurement
1475
1476 $info = $dom->get_guest_info($types, $flags=0)
1477 Get information about the domain guest configuration. The $types
1478 parameter determines what pieces of information are returned and
1479 should be the bitwise or of the following constants:
1480
1481 Sys::Virt::Domain::GUEST_INFO_USERS
1482 Active user information
1483
1484 Sys::Virt::Domain::GUEST_INFO_OS
1485 Misc operating system information
1486
1487 Sys::Virt::Domain::GUEST_INFO_TIMEZONE
1488 The guest timezone
1489
1490 Sys::Virt::Domain::GUEST_INFO_HOSTNAME
1491 The guest hostname
1492
1493 Sys::Virt::Domain::GUEST_INFO_FILESYSTEM
1494 Filesystem mount information
1495
1496 $flags is currently unused and defaults to zero.
1497
1498 $dom->set_agent_response_timeout($timeout, $flags=0)
1499 Set the amount of time to wait for the agent to respond to a
1500 command. $timeout is a positive integer representing the number of
1501 seconds to wait, or one of the constants:
1502
1503 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_BLOCK
1504 Wait forever with no timeout
1505
1506 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_NOWAIT
1507 Don't want at all, return immediately
1508
1509 Sys::Virt::Domain::AGENT_RESPONSE_TIMEOUT_DEFAULT
1510 Use the hypervisor driver's default timeout
1511
1512 The $flags parameter is currently unused and defaults to zero.
1513
1515 A number of the APIs take a "flags" parameter. In most cases passing a
1516 value of zero will be satisfactory. Some APIs, however, accept named
1517 constants to alter their behaviour. This section documents the current
1518 known constants.
1519
1520 DOMAIN STATE
1521 The domain state constants are useful in interpreting the "state" key
1522 in the hash returned by the "get_info" method.
1523
1524 Sys::Virt::Domain::STATE_NOSTATE
1525 The domain is active, but is not running / blocked (eg idle)
1526
1527 Sys::Virt::Domain::STATE_RUNNING
1528 The domain is active and running
1529
1530 Sys::Virt::Domain::STATE_BLOCKED
1531 The domain is active, but execution is blocked
1532
1533 Sys::Virt::Domain::STATE_PAUSED
1534 The domain is active, but execution has been paused
1535
1536 Sys::Virt::Domain::STATE_SHUTDOWN
1537 The domain is active, but in the shutdown phase
1538
1539 Sys::Virt::Domain::STATE_SHUTOFF
1540 The domain is inactive, and shut down.
1541
1542 Sys::Virt::Domain::STATE_CRASHED
1543 The domain is inactive, and crashed.
1544
1545 Sys::Virt::Domain::STATE_PMSUSPENDED
1546 The domain is active, but in power management suspend state
1547
1548 CONTROL INFO
1549 The following constants can be used to determine what the guest domain
1550 control channel status is
1551
1552 Sys::Virt::Domain::CONTROL_ERROR
1553 The control channel has a fatal error
1554
1555 Sys::Virt::Domain::CONTROL_OK
1556 The control channel is ready for jobs
1557
1558 Sys::Virt::Domain::CONTROL_OCCUPIED
1559 The control channel is busy
1560
1561 Sys::Virt::Domain::CONTROL_JOB
1562 The control channel is busy with a job
1563
1564 If the status is "Sys::Virt::Domain::CONTROL_ERROR", then one of the
1565 following constants describes the reason
1566
1567 Sys::Virt::Domain::CONTROL_ERROR_REASON_NONE
1568 There is no reason for the error available
1569
1570 Sys::Virt::Domain::CONTROL_ERROR_REASON_UNKNOWN
1571 The reason for the error is unknown
1572
1573 Sys::Virt::Domain::CONTROL_ERROR_REASON_INTERNAL
1574 There was an internal error in libvirt
1575
1576 Sys::Virt::Domain::CONTROL_ERROR_REASON_MONITOR
1577 There was an error speaking to the monitor
1578
1579 DOMAIN CREATION
1580 The following constants can be used to control the behaviour of domain
1581 creation
1582
1583 Sys::Virt::Domain::START_PAUSED
1584 Keep the guest vCPUs paused after starting the guest
1585
1586 Sys::Virt::Domain::START_AUTODESTROY
1587 Automatically destroy the guest when the connection is closed (or
1588 fails)
1589
1590 Sys::Virt::Domain::START_BYPASS_CACHE
1591 Do not use OS I/O cache if starting a domain with a saved state
1592 image
1593
1594 Sys::Virt::Domain::START_FORCE_BOOT
1595 Boot the guest, even if there was a saved snapshot
1596
1597 Sys::Virt::Domain::START_VALIDATE
1598 Validate the XML document against the XML schema
1599
1600 DOMAIN DEFINE
1601 The following constants can be used to control the behaviour of domain
1602 define operations
1603
1604 Sys::Virt::Domain::DEFINE_VALIDATE
1605 Validate the XML document against the XML schema
1606
1607 KEYCODE SETS
1608 The following constants define the set of supported keycode sets
1609
1610 Sys::Virt::Domain::KEYCODE_SET_LINUX
1611 The Linux event subsystem keycodes
1612
1613 Sys::Virt::Domain::KEYCODE_SET_XT
1614 The original XT keycodes
1615
1616 Sys::Virt::Domain::KEYCODE_SET_ATSET1
1617 The AT Set1 keycodes (aka XT)
1618
1619 Sys::Virt::Domain::KEYCODE_SET_ATSET2
1620 The AT Set2 keycodes (aka AT)
1621
1622 Sys::Virt::Domain::KEYCODE_SET_ATSET3
1623 The AT Set3 keycodes (aka PS2)
1624
1625 Sys::Virt::Domain::KEYCODE_SET_OSX
1626 The OS-X keycodes
1627
1628 Sys::Virt::Domain::KEYCODE_SET_XT_KBD
1629 The XT keycodes from the Linux Keyboard driver
1630
1631 Sys::Virt::Domain::KEYCODE_SET_USB
1632 The USB HID keycode set
1633
1634 Sys::Virt::Domain::KEYCODE_SET_WIN32
1635 The Windows keycode set
1636
1637 Sys::Virt::Domain::KEYCODE_SET_QNUM
1638 The XT keycode set, with the extended scancodes using the high bit
1639 of the first byte, instead of the low bit of the second byte.
1640
1641 Sys::Virt::Domain::KEYCODE_SET_RFB
1642 A deprecated alias for "Sys::Virt::Domain::KEYCODE_SET_QNUM"
1643
1644 MEMORY PEEK
1645 The following constants can be used with the "memory_peek" method's
1646 flags parameter
1647
1648 Sys::Virt::Domain::MEMORY_VIRTUAL
1649 Indicates that the offset is using virtual memory addressing.
1650
1651 Sys::Virt::Domain::MEMORY_PHYSICAL
1652 Indicates that the offset is using physical memory addressing.
1653
1654 VCPU STATE
1655 The following constants are useful when interpreting the virtual CPU
1656 run state
1657
1658 Sys::Virt::Domain::VCPU_OFFLINE
1659 The virtual CPU is not online
1660
1661 Sys::Virt::Domain::VCPU_RUNNING
1662 The virtual CPU is executing code
1663
1664 Sys::Virt::Domain::VCPU_BLOCKED
1665 The virtual CPU is waiting to be scheduled
1666
1667 OPEN GRAPHICS CONSTANTS
1668 The following constants are used when opening a connection to the guest
1669 graphics server
1670
1671 Sys::Virt::Domain::OPEN_GRAPHICS_SKIPAUTH
1672 Skip authentication of the client
1673
1674 OPEN CONSOLE CONSTANTS
1675 The following constants are used when opening a connection to the guest
1676 console
1677
1678 Sys::Virt::Domain::OPEN_CONSOLE_FORCE
1679 Force opening of the console, disconnecting any other open session
1680
1681 Sys::Virt::Domain::OPEN_CONSOLE_SAFE
1682 Check if the console driver supports safe operations
1683
1684 OPEN CHANNEL CONSTANTS
1685 The following constants are used when opening a connection to the guest
1686 channel
1687
1688 Sys::Virt::Domain::OPEN_CHANNEL_FORCE
1689 Force opening of the channel, disconnecting any other open session
1690
1691 XML DUMP OPTIONS
1692 The following constants are used to control the information included in
1693 the XML configuration dump
1694
1695 Sys::Virt::Domain::XML_INACTIVE
1696 Report the persistent inactive configuration for the guest, even if
1697 it is currently running.
1698
1699 Sys::Virt::Domain::XML_SECURE
1700 Include security sensitive information in the XML dump, such as
1701 passwords.
1702
1703 Sys::Virt::Domain::XML_UPDATE_CPU
1704 Update the CPU model definition to match the current executing
1705 state.
1706
1707 Sys::Virt::Domain::XML_MIGRATABLE
1708 Update the XML to allow migration to older versions of libvirt
1709
1710 DEVICE HOTPLUG OPTIONS
1711 The following constants are used to control device hotplug operations
1712
1713 Sys::Virt::Domain::DEVICE_MODIFY_CURRENT
1714 Modify the domain in its current state
1715
1716 Sys::Virt::Domain::DEVICE_MODIFY_LIVE
1717 Modify only the live state of the domain
1718
1719 Sys::Virt::Domain::DEVICE_MODIFY_CONFIG
1720 Modify only the persistent config of the domain
1721
1722 Sys::Virt::Domain::DEVICE_MODIFY_FORCE
1723 Force the device to be modified
1724
1725 MEMORY OPTIONS
1726 The following constants are used to control memory change operations
1727
1728 Sys::Virt::Domain::MEM_CURRENT
1729 Modify the current state
1730
1731 Sys::Virt::Domain::MEM_LIVE
1732 Modify only the live state of the domain
1733
1734 Sys::Virt::Domain::MEM_CONFIG
1735 Modify only the persistent config of the domain
1736
1737 Sys::Virt::Domain::MEM_MAXIMUM
1738 Modify the maximum memory value
1739
1740 CONFIG OPTIONS
1741 The following constants are used to control what configuration a domain
1742 update changes
1743
1744 Sys::Virt::Domain::AFFECT_CURRENT
1745 Modify the current state
1746
1747 Sys::Virt::Domain::AFFECT_LIVE
1748 Modify only the live state of the domain
1749
1750 Sys::Virt::Domain::AFFECT_CONFIG
1751 Modify only the persistent config of the domain
1752
1753 MIGRATE OPTIONS
1754 The following constants are used to control how migration is performed
1755
1756 Sys::Virt::Domain::MIGRATE_LIVE
1757 Migrate the guest without interrupting its execution on the source
1758 host.
1759
1760 Sys::Virt::Domain::MIGRATE_PEER2PEER
1761 Manage the migration process over a direct peer-2-peer connection
1762 between the source and destination host libvirtd daemons.
1763
1764 Sys::Virt::Domain::MIGRATE_TUNNELLED
1765 Tunnel the migration data over the libvirt daemon connection,
1766 rather than the native hypervisor data transport. Requires
1767 PEER2PEER flag to be set.
1768
1769 Sys::Virt::Domain::MIGRATE_PERSIST_DEST
1770 Make the domain persistent on the destination host, defining its
1771 configuration file upon completion of migration.
1772
1773 Sys::Virt::Domain::MIGRATE_UNDEFINE_SOURCE
1774 Remove the domain's persistent configuration after migration
1775 completes successfully.
1776
1777 Sys::Virt::Domain::MIGRATE_PAUSED
1778 Do not re-start execution of the guest CPUs on the destination host
1779 after migration completes.
1780
1781 Sys::Virt::Domain::MIGRATE_NON_SHARED_DISK
1782 Copy the complete contents of the disk images during migration
1783
1784 Sys::Virt::Domain::MIGRATE_NON_SHARED_INC
1785 Copy the incrementally changed contents of the disk images during
1786 migration
1787
1788 Sys::Virt::Domain::MIGRATE_CHANGE_PROTECTION
1789 Do not allow changes to the virtual domain configuration while
1790 migration is taking place. This option is automatically implied if
1791 doing a peer-2-peer migration.
1792
1793 Sys::Virt::Domain::MIGRATE_UNSAFE
1794 Migrate even if the compatibility check indicates the migration
1795 will be unsafe to the guest.
1796
1797 Sys::Virt::Domain::MIGRATE_OFFLINE
1798 Migrate the guest config if the guest is not currently running
1799
1800 Sys::Virt::Domain::MIGRATE_COMPRESSED
1801 Enable compression of the migration data stream
1802
1803 Sys::Virt::Domain::MIGRATE_ABORT_ON_ERROR
1804 Abort if an I/O error occurrs on the disk
1805
1806 Sys::Virt::Domain::MIGRATE_AUTO_CONVERGE
1807 Force convergance of the migration operation by throttling guest
1808 runtime
1809
1810 Sys::Virt::Domain::MIGRATE_RDMA_PIN_ALL
1811 Pin memory for RDMA transfer
1812
1813 Sys::Virt::Domain::MIGRATE_POSTCOPY
1814 Enable support for post-copy migration
1815
1816 Sys::Virt::Domain::MIGRATE_TLS
1817 Setting this flag will cause the migration to attempt to use the
1818 TLS environment configured by the hypervisor in order to perform
1819 the migration. If incorrectly configured on either source or
1820 destination, the migration will fail.
1821
1822 Sys::Virt::Domain::MIGRATE_PARALLEL
1823 Send memory pages to the destination host through several network
1824 connections. See "Sys::Virt::Domain::MIGRATE_PARAM_PARALLEL_*"
1825 parameters for configuring the parallel migration.
1826
1827 UNDEFINE CONSTANTS
1828 The following constants can be used when undefining virtual domain
1829 configurations
1830
1831 Sys::Virt::Domain::UNDEFINE_MANAGED_SAVE
1832 Also remove any managed save image when undefining the virtual
1833 domain
1834
1835 Sys::Virt::Domain::UNDEFINE_SNAPSHOTS_METADATA
1836 Also remove any snapshot metadata when undefining the virtual
1837 domain.
1838
1839 Sys::Virt::Domain::UNDEFINE_NVRAM
1840 Also remove any NVRAM state file when undefining the virtual
1841 domain.
1842
1843 Sys::Virt::Domain::UNDEFINE_KEEP_NVRAM
1844 keep NVRAM state file when undefining the virtual domain.
1845
1846 Sys::Virt::Domain::UNDEFINE_CHECKPOINTS_METADATA
1847 Also remove any checkpoint metadata when undefining the virtual
1848 domain.
1849
1850 JOB TYPES
1851 The following constants describe the different background job types.
1852
1853 Sys::Virt::Domain::JOB_NONE
1854 No job is active
1855
1856 Sys::Virt::Domain::JOB_BOUNDED
1857 A job with a finite completion time is active
1858
1859 Sys::Virt::Domain::JOB_UNBOUNDED
1860 A job with an unbounded completion time is active
1861
1862 Sys::Virt::Domain::JOB_COMPLETED
1863 The job has finished, but isn't cleaned up
1864
1865 Sys::Virt::Domain::JOB_FAILED
1866 The job has hit an error, but isn't cleaned up
1867
1868 Sys::Virt::Domain::JOB_CANCELLED
1869 The job was aborted at user request, but isn't cleaned up
1870
1871 MEMORY PARAMETERS
1872 The following constants are useful when getting/setting memory
1873 parameters for guests
1874
1875 Sys::Virt::Domain::MEMORY_HARD_LIMIT
1876 The maximum memory the guest can use.
1877
1878 Sys::Virt::Domain::MEMORY_SOFT_LIMIT
1879 The memory upper limit enforced during memory contention.
1880
1881 Sys::Virt::Domain::MEMORY_MIN_GUARANTEE
1882 The minimum memory guaranteed to be reserved for the guest.
1883
1884 Sys::Virt::Domain::MEMORY_SWAP_HARD_LIMIT
1885 The maximum swap the guest can use.
1886
1887 Sys::Virt::Domain::MEMORY_PARAM_UNLIMITED
1888 The value of an unlimited memory parameter
1889
1890 BLKIO PARAMETERS
1891 The following parameters control I/O tuning for the domain as a whole
1892
1893 Sys::Virt::Domain::BLKIO_WEIGHT
1894 The I/O weight parameter
1895
1896 Sys::Virt::Domain::BLKIO_DEVICE_WEIGHT
1897 The per-device I/O weight parameter
1898
1899 Sys::Virt::Domain::BLKIO_DEVICE_READ_BPS
1900 The per-device I/O bytes read per second
1901
1902 Sys::Virt::Domain::BLKIO_DEVICE_READ_IOPS
1903 The per-device I/O operations read per second
1904
1905 Sys::Virt::Domain::BLKIO_DEVICE_WRITE_BPS
1906 The per-device I/O bytes write per second
1907
1908 Sys::Virt::Domain::BLKIO_DEVICE_WRITE_IOPS
1909 The per-device I/O operations write per second
1910
1911 BLKIO TUNING PARAMETERS
1912 The following parameters control I/O tuning for an individual guest
1913 disk.
1914
1915 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC
1916 The total bytes processed per second.
1917
1918 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC
1919 The bytes read per second.
1920
1921 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC
1922 The bytes written per second.
1923
1924 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC
1925 The total I/O operations processed per second.
1926
1927 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC
1928 The I/O operations read per second.
1929
1930 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC
1931 The I/O operations written per second.
1932
1933 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX
1934 The maximum total bytes processed per second.
1935
1936 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX
1937 The maximum bytes read per second.
1938
1939 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX
1940 The maximum bytes written per second.
1941
1942 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX
1943 The maximum total I/O operations processed per second.
1944
1945 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX
1946 The maximum I/O operations read per second.
1947
1948 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX
1949 The maximum I/O operations written per second.
1950
1951 Sys::Virt::Domain::BLOCK_IOTUNE_SIZE_IOPS_SEC
1952 The maximum I/O operations per second
1953
1954 Sys::Virt::Domain::BLOCK_IOTUNE_GROUP_NAME
1955 A string representing a group name to allow sharing of I/O
1956 throttling quota between multiple drives
1957
1958 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTH
1959 The duration in seconds allowed for maximum total bytes processed
1960 per second.
1961
1962 Sys::Virt::Domain::BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTH
1963 The duration in seconds allowed for maximum bytes read per second.
1964
1965 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTH
1966 The duration in seconds allowed for maximum bytes written per
1967 second.
1968
1969 Sys::Virt::Domain::BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTH
1970 The duration in seconds allowed for maximum total I/O operations
1971 processed per second.
1972
1973 Sys::Virt::Domain::BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTH
1974 The duration in seconds allowed for maximum I/O operations read per
1975 second.
1976
1977 Sys::Virt::Domain::BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTH
1978 The duration in seconds allowed for maximum I/O operations written
1979 per second.
1980
1981 SCHEDULER CONSTANTS
1982 Sys::Virt::Domain::SCHEDULER_CAP
1983 The VM cap tunable
1984
1985 Sys::Virt::Domain::SCHEDULER_CPU_SHARES
1986 The CPU shares tunable
1987
1988 Sys::Virt::Domain::SCHEDULER_LIMIT
1989 The VM limit tunable
1990
1991 Sys::Virt::Domain::SCHEDULER_RESERVATION
1992 The VM reservation tunable
1993
1994 Sys::Virt::Domain::SCHEDULER_SHARES
1995 The VM shares tunable
1996
1997 Sys::Virt::Domain::SCHEDULER_VCPU_PERIOD
1998 The VCPU period tunable
1999
2000 Sys::Virt::Domain::SCHEDULER_VCPU_QUOTA
2001 The VCPU quota tunable
2002
2003 Sys::Virt::Domain::SCHEDULER_GLOBAL_PERIOD
2004 The VM global period tunable
2005
2006 Sys::Virt::Domain::SCHEDULER_GLOBAL_QUOTA
2007 The VM global quota tunable
2008
2009 Sys::Virt::Domain::SCHEDULER_WEIGHT
2010 The VM weight tunable
2011
2012 NUMA PARAMETERS
2013 The following constants are useful when getting/setting the guest NUMA
2014 memory policy
2015
2016 Sys::Virt::Domain::NUMA_MODE
2017 The NUMA policy mode
2018
2019 Sys::Virt::Domain::NUMA_NODESET
2020 The NUMA nodeset mask
2021
2022 The following constants are useful when interpreting the
2023 "Sys::Virt::Domain::NUMA_MODE" parameter value
2024
2025 Sys::Virt::Domain::NUMATUNE_MEM_STRICT
2026 Allocation is mandatory from the mask nodes
2027
2028 Sys::Virt::Domain::NUMATUNE_MEM_PREFERRED
2029 Allocation is preferred from the masked nodes
2030
2031 Sys::Virt::Domain::NUMATUNE_MEM_INTERLEAVE
2032 Allocation is interleaved across all masked nods
2033
2034 INTERFACE PARAMETERS
2035 The following constants are useful when getting/setting the per network
2036 interface tunable parameters
2037
2038 Sys::Virt::Domain::BANDWIDTH_IN_AVERAGE
2039 The average inbound bandwidth
2040
2041 Sys::Virt::Domain::BANDWIDTH_IN_PEAK
2042 The peak inbound bandwidth
2043
2044 Sys::Virt::Domain::BANDWIDTH_IN_BURST
2045 The burstable inbound bandwidth
2046
2047 Sys::Virt::Domain::BANDWIDTH_IN_FLOOR
2048 The minimum inbound bandwidth
2049
2050 Sys::Virt::Domain::BANDWIDTH_OUT_AVERAGE
2051 The average outbound bandwidth
2052
2053 Sys::Virt::Domain::BANDWIDTH_OUT_PEAK
2054 The peak outbound bandwidth
2055
2056 Sys::Virt::Domain::BANDWIDTH_OUT_BURST
2057 The burstable outbound bandwidth
2058
2059 PERF EVENTS
2060 The following constants defined performance events which can be
2061 monitored for a guest
2062
2063 Sys::Virt::Domain::PERF_PARAM_CMT
2064 The CMT event counter which can be used to measure the usage of
2065 cache (bytes) by applications running on the platform. It
2066 corresponds to the "perf.cmt" field in the *Stats APIs.
2067
2068 Sys::Virt::Domain::PERF_PARAM_MBML
2069 The MBML event counter which can be used to monitor the amount of
2070 data (bytes/s) sent through the memory controller on the socket.
2071 It corresponds to the "perf.mbml" field in the *Stats APIs.
2072
2073 Sys::Virt::Domain::PERF_PARAM_MBMT
2074 The MBMT event counter which can be used to monitor total system
2075 bandwidth (bytes/s) from one level of cache to another. It
2076 corresponds to the "perf.mbmt" field in the *Stats APIs.
2077
2078 Sys::Virt::Domain::PERF_PARAM_CACHE_MISSES
2079 The cache_misses perf event counter which can be used to measure
2080 the count of cache misses by applications running on the platform.
2081 It corresponds to the "perf.cache_misses" field in the *Stats APIs.
2082
2083 Sys::Virt::Domain::PERF_PARAM_CACHE_REFERENCES
2084 The cache_references perf event counter which can be used to
2085 measure the count of cache hits by applications running on the
2086 platform. It corresponds to the "perf.cache_references" field in
2087 the *Stats APIs.
2088
2089 Sys::Virt::Domain::PERF_PARAM_CPU_CYCLES
2090 The cpu_cycles perf event counter which can be used to measure how
2091 many cpu cycles one instruction needs. It corresponds to the
2092 "perf.cpu_cycles" field in the *Stats APIs.
2093
2094 Sys::Virt::Domain::PERF_PARAM_INSTRUCTIONS
2095 The instructions perf event counter which can be used to measure
2096 the count of instructions by applications running on the platform.
2097 It corresponds to the "perf.instructions" field in the *Stats APIs.
2098
2099 Sys::Virt::Domain::PERF_PARAM_BRANCH_INSTRUCTIONS
2100 The branch_instructions perf event counter which can be used to
2101 measure the count of instructions by applications running on the
2102 platform. It corresponds to the "perf.branch_instructions" field in
2103 the *Stats APIs.
2104
2105 Sys::Virt::Domain::PERF_PARAM_BRANCH_MISSES
2106 The branch_misses perf event which can be used to measure the count
2107 of branch misses by applications running on the platform. It
2108 corresponds to the "perf.branch_misses" field in the *Stats APIs.
2109
2110 Sys::Virt::Domain::PERF_PARAM_BUS_CYCLES The bus_cycles perf event
2111 counter which can be used to measure the count of bus cycles by
2112 applications running on the platform. It corresponds to the
2113 "perf.bus_cycles" field in the *Stats APIs.
2114 Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_FRONTEND The
2115 stalled_cycles_frontend perf event counter which can be used to measure
2116 the count of stalled cpu cycles in the frontend of the instruction
2117 processor pipeline by applications running on the platform. It
2118 corresponds to the "perf.stalled_cycles_frontend" field in the *Stats
2119 APIs.
2120 Sys::Virt::Domain::PERF_PARAM_STALLED_CYCLES_BACKEND The
2121 stalled_cycles_backend perf event counter which can be used to measure
2122 the count of stalled cpu cycles in the backend of the instruction
2123 processor pipeline by application running on the platform. It
2124 corresponds to the "perf.stalled_cycles_backend" field in the *Stats
2125 APIs.
2126 Sys::Virt::Domain::PERF_PARAM_REF_CPU_CYCLES The ref_cpu_cycles perf
2127 event counter which can be used to measure the count of total cpu
2128 cycles not affected by CPU frequency scaling by applications running on
2129 the platform. It corresponds to the "perf.ref_cpu_cycles" field in the
2130 *Stats APIs.
2131 Sys::Virt::Domain::PERF_PARAM_CPU_CLOCK The cpu_clock perf event
2132 counter which can be used to measure the count of cpu clock time by
2133 applications running on the platform. It corresponds to the
2134 "perf.cpu_clock" field in the *Stats APIs.
2135 Sys::Virt::Domain::PERF_PARAM_TASK_CLOCK The task_clock perf event
2136 counter which can be used to measure the count of task clock time by
2137 applications running on the platform. It corresponds to the
2138 "perf.task_clock" field in the *Stats APIs.
2139 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS The page_faults perf event
2140 counter which can be used to measure the count of page faults by
2141 applications running on the platform. It corresponds to the
2142 "perf.page_faults" field in the *Stats APIs.
2143 Sys::Virt::Domain::PERF_PARAM_CONTEXT_SWITCHES The context_switches
2144 perf event counter which can be used to measure the count of context
2145 switches by applications running on the platform. It corresponds to the
2146 "perf.context_switches" field in the *Stats APIs.
2147 Sys::Virt::Domain::PERF_PARAM_CPU_MIGRATIONS The cpu_migrations perf
2148 event counter which can be used to measure the count of cpu migrations
2149 by applications running on the platform. It corresponds to the
2150 "perf.cpu_migrations" field in the *Stats APIs.
2151 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MIN The page_faults_min perf
2152 event counter which can be used to measure the count of minor page
2153 faults by applications running on the platform. It corresponds to the
2154 "perf.page_faults_min" field in the *Stats APIs.
2155 Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MAJ The page_faults_maj perf
2156 event counter which can be used to measure the count of major page
2157 faults by applications running on the platform. It corresponds to the
2158 "perf.page_faults_maj" field in the *Stats APIs.
2159 Sys::Virt::Domain::PERF_PARAM_ALIGNMENT_FAULTS The alignment_faults
2160 perf event counter which can be used to measure the count of alignment
2161 faults by applications running on the platform. It corresponds to the
2162 "perf.alignment_faults" field in the *Stats APIs.
2163 Sys::Virt::Domain::PERF_PARAM_EMULATION_FAULTS The emulation_faults
2164 perf event counter which can be used to measure the count of emulation
2165 faults by applications running on the platform. It corresponds to the
2166 "perf.emulation_faults" field in the *Stats APIs.
2167
2168 IOTHREAD STATS
2169 The following constants defined IOThread statistics which can be
2170 monitored for a guest
2171
2172 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_MAX_NS
2173 The maximum polling time that can be used by polling algorithm in
2174 ns. The polling time starts at 0 (zero) and is the time spent by
2175 the guest to process IOThread data before returning the CPU to the
2176 host. The polling time will be dynamically modified over time based
2177 on the poll_grow and poll_shrink parameters provided.
2178
2179 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_GROW
2180 This provides a value for the dynamic polling adjustment algorithm
2181 to use to grow its polling interval up to the poll_max_ns value.
2182
2183 Sys::Virt::Domain::IOTHREAD_PARAM_POLL_SHRINK
2184 This provides a value for the dynamic polling adjustment algorithm
2185 to use to shrink its polling interval when the polling interval
2186 exceeds the poll_max_ns value.
2187
2188 VCPU FLAGS
2189 The following constants are useful when getting/setting the VCPU count
2190 for a guest
2191
2192 Sys::Virt::Domain::VCPU_LIVE
2193 Flag to request the live value
2194
2195 Sys::Virt::Domain::VCPU_CONFIG
2196 Flag to request the persistent config value
2197
2198 Sys::Virt::Domain::VCPU_CURRENT
2199 Flag to request the current config value
2200
2201 Sys::Virt::Domain::VCPU_MAXIMUM
2202 Flag to request adjustment of the maximum vCPU value
2203
2204 Sys::Virt::Domain::VCPU_GUEST
2205 Flag to request the guest VCPU mask
2206
2207 Sys::Virt::Domain::VCPU_HOTPLUGGABLE
2208 Flag to make vcpus added hot(un)pluggable
2209
2210 STATE CHANGE EVENTS
2211 The following constants allow domain state change events to be
2212 interpreted. The events contain both a state change, and a reason.
2213
2214 Sys::Virt::Domain::EVENT_DEFINED
2215 Indicates that a persistent configuration has been defined for the
2216 domain.
2217
2218 Sys::Virt::Domain::EVENT_DEFINED_ADDED
2219 The defined configuration is newly added
2220
2221 Sys::Virt::Domain::EVENT_DEFINED_UPDATED
2222 The defined configuration is an update to an existing
2223 configuration
2224
2225 Sys::Virt::Domain::EVENT_DEFINED_RENAMED
2226 The defined configuration is a rename of an existing
2227 configuration
2228
2229 Sys::Virt::Domain::EVENT_DEFINED_FROM_SNAPSHOT
2230 The defined configuration was restored from a snapshot
2231
2232 Sys::Virt::Domain::EVENT_RESUMED
2233 The domain has resumed execution
2234
2235 Sys::Virt::Domain::EVENT_RESUMED_MIGRATED
2236 The domain resumed because migration has completed. This is
2237 emitted on the destination host.
2238
2239 Sys::Virt::Domain::EVENT_RESUMED_UNPAUSED
2240 The domain resumed because the admin unpaused it.
2241
2242 Sys::Virt::Domain::EVENT_RESUMED_FROM_SNAPSHOT
2243 The domain resumed because it was restored from a snapshot
2244
2245 Sys::Virt::Domain::EVENT_RESUMED_POSTCOPY
2246 The domain resumed but post-copy is running in background
2247
2248 Sys::Virt::Domain::EVENT_STARTED
2249 The domain has started running
2250
2251 Sys::Virt::Domain::EVENT_STARTED_BOOTED
2252 The domain was booted from shutoff state
2253
2254 Sys::Virt::Domain::EVENT_STARTED_MIGRATED
2255 The domain started due to an incoming migration
2256
2257 Sys::Virt::Domain::EVENT_STARTED_RESTORED
2258 The domain was restored from saved state file
2259
2260 Sys::Virt::Domain::EVENT_STARTED_FROM_SNAPSHOT
2261 The domain was restored from a snapshot
2262
2263 Sys::Virt::Domain::EVENT_STARTED_WAKEUP
2264 The domain was woken up from suspend
2265
2266 Sys::Virt::Domain::EVENT_STOPPED
2267 The domain has stopped running
2268
2269 Sys::Virt::Domain::EVENT_STOPPED_CRASHED
2270 The domain stopped because guest operating system has crashed
2271
2272 Sys::Virt::Domain::EVENT_STOPPED_DESTROYED
2273 The domain stopped because administrator issued a destroy
2274 command.
2275
2276 Sys::Virt::Domain::EVENT_STOPPED_FAILED
2277 The domain stopped because of a fault in the host
2278 virtualization environment.
2279
2280 Sys::Virt::Domain::EVENT_STOPPED_MIGRATED
2281 The domain stopped because it was migrated to another machine.
2282
2283 Sys::Virt::Domain::EVENT_STOPPED_SAVED
2284 The domain was saved to a state file
2285
2286 Sys::Virt::Domain::EVENT_STOPPED_SHUTDOWN
2287 The domain stopped due to graceful shutdown of the guest.
2288
2289 Sys::Virt::Domain::EVENT_STOPPED_FROM_SNAPSHOT
2290 The domain was stopped due to a snapshot
2291
2292 Sys::Virt::Domain::EVENT_SHUTDOWN
2293 The domain has shutdown but is not yet stopped
2294
2295 Sys::Virt::Domain::EVENT_SHUTDOWN_FINISHED
2296 The domain finished shutting down
2297
2298 Sys::Virt::Domain::EVENT_SHUTDOWN_HOST
2299 The domain shutdown due to host trigger
2300
2301 Sys::Virt::Domain::EVENT_SHUTDOWN_GUEST
2302 The domain shutdown due to guest trigger
2303
2304 Sys::Virt::Domain::EVENT_SUSPENDED
2305 The domain has stopped executing, but still exists
2306
2307 Sys::Virt::Domain::EVENT_SUSPENDED_MIGRATED
2308 The domain has been suspended due to offline migration
2309
2310 Sys::Virt::Domain::EVENT_SUSPENDED_PAUSED
2311 The domain has been suspended due to administrator pause
2312 request.
2313
2314 Sys::Virt::Domain::EVENT_SUSPENDED_IOERROR
2315 The domain has been suspended due to a block device I/O error.
2316
2317 Sys::Virt::Domain::EVENT_SUSPENDED_FROM_SNAPSHOT
2318 The domain has been suspended due to resume from snapshot
2319
2320 Sys::Virt::Domain::EVENT_SUSPENDED_WATCHDOG
2321 The domain has been suspended due to the watchdog triggering
2322
2323 Sys::Virt::Domain::EVENT_SUSPENDED_RESTORED
2324 The domain has been suspended due to restore from saved state
2325
2326 Sys::Virt::Domain::EVENT_SUSPENDED_API_ERROR
2327 The domain has been suspended due to an API error
2328
2329 Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY
2330 The domain has been suspended for post-copy migration
2331
2332 Sys::Virt::Domain::EVENT_SUSPENDED_POSTCOPY_FAILED
2333 The domain has been suspended due post-copy migration failing
2334
2335 Sys::Virt::Domain::EVENT_UNDEFINED
2336 The persistent configuration has gone away
2337
2338 Sys::Virt::Domain::EVENT_UNDEFINED_REMOVED
2339 The domain configuration has gone away due to it being removed
2340 by administrator.
2341
2342 Sys::Virt::Domain::EVENT_UNDEFINED_RENAMED
2343 The undefined configuration is a rename of an existing
2344 configuration
2345
2346 Sys::Virt::Domain::EVENT_PMSUSPENDED
2347 The domain has stopped running
2348
2349 Sys::Virt::Domain::EVENT_PMSUSPENDED_MEMORY
2350 The domain has suspend to RAM.
2351
2352 Sys::Virt::Domain::EVENT_PMSUSPENDED_DISK
2353 The domain has suspend to Disk.
2354
2355 Sys::Virt::Domain::EVENT_CRASHED
2356 The domain has crashed
2357
2358 Sys::Virt::Domain::EVENT_CRASHED_PANICKED
2359 The domain has crashed due to a kernel panic
2360
2361 Sys::Virt::Domain::EVENT_CRASHED_CRASHLOADED
2362 The domain has crashed and reloaded itself
2363
2364 EVENT ID CONSTANTS
2365 Sys::Virt::Domain::EVENT_ID_LIFECYCLE
2366 Domain lifecycle events
2367
2368 Sys::Virt::Domain::EVENT_ID_REBOOT
2369 Soft / warm reboot events
2370
2371 Sys::Virt::Domain::EVENT_ID_RTC_CHANGE
2372 RTC clock adjustments
2373
2374 Sys::Virt::Domain::EVENT_ID_IO_ERROR
2375 File IO errors, typically from disks
2376
2377 Sys::Virt::Domain::EVENT_ID_WATCHDOG
2378 Watchdog device triggering
2379
2380 Sys::Virt::Domain::EVENT_ID_GRAPHICS
2381 Graphics client connections.
2382
2383 Sys::Virt::Domain::EVENT_ID_IO_ERROR_REASON
2384 File IO errors, typically from disks, with a root cause
2385
2386 Sys::Virt::Domain::EVENT_ID_CONTROL_ERROR
2387 Errors from the virtualization control channel
2388
2389 Sys::Virt::Domain::EVENT_ID_BLOCK_JOB
2390 Completion status of asynchronous block jobs, identified by source
2391 file name.
2392
2393 Sys::Virt::Domain::EVENT_ID_BLOCK_JOB_2
2394 Completion status of asynchronous block jobs, identified by target
2395 device name.
2396
2397 Sys::Virt::Domain::EVENT_ID_DISK_CHANGE
2398 Changes in disk media
2399
2400 Sys::Virt::Domain::EVENT_ID_TRAY_CHANGE
2401 CDROM media tray state
2402
2403 Sys::Virt::Domain::EVENT_ID_PMSUSPEND
2404 Power management initiated suspend to RAM
2405
2406 Sys::Virt::Domain::EVENT_ID_PMSUSPEND_DISK
2407 Power management initiated suspend to Disk
2408
2409 Sys::Virt::Domain::EVENT_ID_PMWAKEUP
2410 Power management initiated wakeup
2411
2412 Sys::Virt::Domain::EVENT_ID_BALLOON_CHANGE
2413 Balloon target changes
2414
2415 Sys::Virt::Domain::EVENT_ID_DEVICE_ADDED
2416 Asynchronous guest device addition
2417
2418 Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVED
2419 Asynchronous guest device removal
2420
2421 Sys::Virt::Domain::EVENT_ID_TUNABLE
2422 Changes of any domain tuning parameters. The callback will be
2423 provided with a hash listing all changed parameters. The later
2424 DOMAIN TUNABLE constants can be useful when accessing the hash keys
2425
2426 Sys::Virt::Domain::EVENT_ID_AGENT_LIFECYCLE
2427 Domain guest agent lifecycle events. The "state" parameter to the
2428 callback will match one of the constants
2429
2430 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_CONNECTED
2431 The agent is now connected
2432
2433 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_STATE_DISCONNECTED
2434 The agent is now disconnected
2435
2436 The second parameter, "reason", matches one of the following
2437 constants
2438
2439 Sys::Virt::Domain::EVENT_ID_MIGRATION_ITERATION
2440 Domain migration progress iteration. The "iteration" parameter to
2441 the callback will specify the number of iterations migration has
2442 made over guest RAM.
2443
2444 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_UNKNOWN
2445 The reason is unknown
2446
2447 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_DOMAIN_STARTED
2448 The domain was initially booted
2449
2450 Sys::Virt::Domain::EVENT_AGENT_LIFECYCLE_REASON_CHANNEL
2451 The channel on a running guest changed state
2452
2453 Sys::Virt::Domain::EVENT_ID_JOB_COMPLETED
2454 Domain background job completion notification. The callback
2455 provides a hash containing the job stats. The keyus in the hash are
2456 the same as those used with the
2457 "Sys::Virt::Domain::get_job_stats()" method.
2458
2459 Sys::Virt::Domain::EVENT_ID_DEVICE_REMOVAL_FAILED
2460 Guest device removal has failed.
2461
2462 Sys::Virt::Domain::EVENT_ID_METADATA_CHANGE
2463 The domain metadata has changed
2464
2465 Sys::Virt::Domain::EVENT_ID_BLOCK_THRESHOLD
2466 The event occurs when the hypervisor detects that the given storage
2467 element was written beyond the point specified by threshold. The
2468 event is useful for thin-provisioned storage.
2469
2470 IO ERROR EVENT CONSTANTS
2471 These constants describe what action was taken due to the IO error.
2472
2473 Sys::Virt::Domain::EVENT_IO_ERROR_NONE
2474 No action was taken, the error was ignored & reported as success to
2475 guest
2476
2477 Sys::Virt::Domain::EVENT_IO_ERROR_PAUSE
2478 The guest is paused since the error occurred
2479
2480 Sys::Virt::Domain::EVENT_IO_ERROR_REPORT
2481 The error has been reported to the guest OS
2482
2483 WATCHDOG EVENT CONSTANTS
2484 These constants describe what action was taken due to the watchdog
2485 firing
2486
2487 Sys::Virt::Domain::EVENT_WATCHDOG_NONE
2488 No action was taken, the watchdog was ignored
2489
2490 Sys::Virt::Domain::EVENT_WATCHDOG_PAUSE
2491 The guest is paused since the watchdog fired
2492
2493 Sys::Virt::Domain::EVENT_WATCHDOG_POWEROFF
2494 The guest is powered off after the watchdog fired
2495
2496 Sys::Virt::Domain::EVENT_WATCHDOG_RESET
2497 The guest is reset after the watchdog fired
2498
2499 Sys::Virt::Domain::EVENT_WATCHDOG_SHUTDOWN
2500 The guest attempted to gracefully shutdown after the watchdog fired
2501
2502 Sys::Virt::Domain::EVENT_WATCHDOG_DEBUG
2503 No action was taken, the watchdog was logged
2504
2505 Sys::Virt::Domain::EVENT_WATCHDOG_INJECTNMI
2506 An NMI was injected into the guest after the watchdog fired
2507
2508 GRAPHICS EVENT PHASE CONSTANTS
2509 These constants describe the phase of the graphics connection
2510
2511 Sys::Virt::Domain::EVENT_GRAPHICS_CONNECT
2512 The initial client connection
2513
2514 Sys::Virt::Domain::EVENT_GRAPHICS_INITIALIZE
2515 The client has been authenticated & the connection is running
2516
2517 Sys::Virt::Domain::EVENT_GRAPHICS_DISCONNECT
2518 The client has disconnected
2519
2520 GRAPHICS EVENT ADDRESS CONSTANTS
2521 These constants describe the format of the address
2522
2523 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV4
2524 An IPv4 address
2525
2526 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_IPV6
2527 An IPv6 address
2528
2529 Sys::Virt::Domain::EVENT_GRAPHICS_ADDRESS_UNIX
2530 An UNIX socket path address
2531
2532 DISK CHANGE EVENT CONSTANTS
2533 These constants describe the reason for a disk change event
2534
2535 Sys::Virt::Domain::EVENT_DISK_CHANGE_MISSING_ON_START
2536 The disk media was cleared, as its source was missing when
2537 attempting to start the guest
2538
2539 Sys::Virt::Domain::EVENT_DISK_DROP_MISSING_ON_START
2540 The disk device was dropped, as its source was missing when
2541 attempting to start the guest
2542
2543 TRAY CHANGE CONSTANTS
2544 These constants describe the reason for a tray change event
2545
2546 Sys::Virt::Domain::EVENT_TRAY_CHANGE_CLOSE
2547 The tray was closed
2548
2549 Sys::Virt::Domain::EVENT_TRAY_CHANGE_OPEN
2550 The tray was opened
2551
2552 DOMAIN BLOCK JOB TYPE CONSTANTS
2553 The following constants identify the different types of domain block
2554 jobs
2555
2556 Sys::Virt::Domain::BLOCK_JOB_TYPE_UNKNOWN
2557 An unknown block job type
2558
2559 Sys::Virt::Domain::BLOCK_JOB_TYPE_PULL
2560 The block pull job type
2561
2562 Sys::Virt::Domain::BLOCK_JOB_TYPE_COPY
2563 The block copy job type
2564
2565 Sys::Virt::Domain::BLOCK_JOB_TYPE_COMMIT
2566 The block commit job type
2567
2568 Sys::Virt::Domain::BLOCK_JOB_TYPE_ACTIVE_COMMIT
2569 The block active commit job type
2570
2571 Sys::Virt::Domain::BLOCK_JOB_TYPE_BACKUP
2572 The block backup job type
2573
2574 DOMAIN BLOCK JOB COMPLETION CONSTANTS
2575 The following constants can be used to determine the completion status
2576 of a block job
2577
2578 Sys::Virt::Domain::BLOCK_JOB_COMPLETED
2579 A successfully completed block job
2580
2581 Sys::Virt::Domain::BLOCK_JOB_FAILED
2582 An unsuccessful block job
2583
2584 Sys::Virt::Domain::BLOCK_JOB_CANCELED
2585 A block job canceled byy the user
2586
2587 Sys::Virt::Domain::BLOCK_JOB_READY
2588 A block job is running
2589
2590 DOMAIN BLOCK REBASE CONSTANTS
2591 The following constants are useful when rebasing block devices
2592
2593 Sys::Virt::Domain::BLOCK_REBASE_SHALLOW
2594 Limit copy to top of source backing chain
2595
2596 Sys::Virt::Domain::BLOCK_REBASE_REUSE_EXT
2597 Reuse existing external file for copy
2598
2599 Sys::Virt::Domain::BLOCK_REBASE_COPY_RAW
2600 Make destination file raw
2601
2602 Sys::Virt::Domain::BLOCK_REBASE_COPY
2603 Start a copy job
2604
2605 Sys::Virt::Domain::BLOCK_REBASE_COPY_DEV
2606 Treat destination as a block device instead of file
2607
2608 Sys::Virt::Domain::BLOCK_REBASE_RELATIVE
2609 Keep backing chain referenced using relative names
2610
2611 DOMAIN BLOCK COPY CONSTANTS
2612 The following constants are useful when copying block devices
2613
2614 Sys::Virt::Domain::BLOCK_COPY_SHALLOW
2615 Limit copy to top of source backing chain
2616
2617 Sys::Virt::Domain::BLOCK_COPY_REUSE_EXT
2618 Reuse existing external file for copy
2619
2620 Sys::Virt::Domain::BLOCK_COPY_TRANSIENT_JOB
2621 Don't force usage of recoverable job for the copy operation
2622
2623 DOMAIN BLOCK JOB ABORT CONSTANTS
2624 The following constants are useful when aborting job copy jobs
2625
2626 Sys::Virt::Domain::BLOCK_JOB_ABORT_ASYNC
2627 Request only, do not wait for completion
2628
2629 Sys::Virt::Domain::BLOCK_JOB_ABORT_PIVOT
2630 Pivot to mirror when ending a copy job
2631
2632 DOMAIN BLOCK COMMIT JOB CONSTANTS
2633 The following constants are useful with block commit job types
2634
2635 Sys::Virt::Domain::BLOCK_COMMIT_DELETE
2636 Delete any files that are invalid after commit
2637
2638 Sys::Virt::Domain::BLOCK_COMMIT_SHALLOW
2639 NULL base means next backing file, not whole chain
2640
2641 Sys::Virt::Domain::BLOCK_COMMIT_ACTIVE
2642 Allow two phase commit when top is active layer
2643
2644 Sys::Virt::Domain::BLOCK_COMMIT_RELATIVE
2645 Keep backing chain referenced using relative names
2646
2647 DOMAIN SAVE / RESTORE CONSTANTS
2648 The following constants can be used when saving or restoring virtual
2649 machines
2650
2651 Sys::Virt::Domain::SAVE_BYPASS_CACHE
2652 Do not use OS I/O cache when saving state.
2653
2654 Sys::Virt::Domain::SAVE_PAUSED
2655 Mark the saved state as paused to prevent the guest CPUs starting
2656 upon restore.
2657
2658 Sys::Virt::Domain::SAVE_RUNNING
2659 Mark the saved state as running to allow the guest CPUs to start
2660 upon restore.
2661
2662 DOMAIN CORE DUMP CONSTANTS
2663 The following constants can be used when triggering domain core dumps
2664
2665 Sys::Virt::Domain::DUMP_LIVE
2666 Do not pause execution while dumping the guest
2667
2668 Sys::Virt::Domain::DUMP_CRASH
2669 Crash the guest after completing the core dump
2670
2671 Sys::Virt::Domain::DUMP_BYPASS_CACHE
2672 Do not use OS I/O cache when writing core dump
2673
2674 Sys::Virt::Domain::DUMP_RESET
2675 Reset the virtual machine after finishing the dump
2676
2677 Sys::Virt::Domain::DUMP_MEMORY_ONLY
2678 Only include guest RAM in the dump, not the device state
2679
2680 DESTROY CONSTANTS
2681 The following constants are useful when terminating guests using the
2682 "destroy" API.
2683
2684 Sys::Virt::Domain::DESTROY_DEFAULT
2685 Destroy the guest using the default approach
2686
2687 Sys::Virt::Domain::DESTROY_GRACEFUL
2688 Destroy the guest in a graceful manner
2689
2690 SHUTDOWN CONSTANTS
2691 The following constants are useful when requesting that a guest
2692 terminate using the "shutdown" API
2693
2694 Sys::Virt::Domain::SHUTDOWN_DEFAULT
2695 Shutdown using the hypervisor's default mechanism
2696
2697 Sys::Virt::Domain::SHUTDOWN_GUEST_AGENT
2698 Shutdown by issuing a command to a guest agent
2699
2700 Sys::Virt::Domain::SHUTDOWN_ACPI_POWER_BTN
2701 Shutdown by injecting an ACPI power button press
2702
2703 Sys::Virt::Domain::SHUTDOWN_INITCTL
2704 Shutdown by talking to initctl (containers only)
2705
2706 Sys::Virt::Domain::SHUTDOWN_SIGNAL
2707 Shutdown by sending SIGTERM to the init process
2708
2709 Sys::Virt::Domain::SHUTDOWN_PARAVIRT
2710 Shutdown by issuing a paravirt power control command
2711
2712 REBOOT CONSTANTS
2713 The following constants are useful when requesting that a guest
2714 terminate using the "reboot" API
2715
2716 Sys::Virt::Domain::REBOOT_DEFAULT
2717 Reboot using the hypervisor's default mechanism
2718
2719 Sys::Virt::Domain::REBOOT_GUEST_AGENT
2720 Reboot by issuing a command to a guest agent
2721
2722 Sys::Virt::Domain::REBOOT_ACPI_POWER_BTN
2723 Reboot by injecting an ACPI power button press
2724
2725 Sys::Virt::Domain::REBOOT_INITCTL
2726 Reboot by talking to initctl (containers only)
2727
2728 Sys::Virt::Domain::REBOOT_SIGNAL
2729 Reboot by sending SIGHUP to the init process
2730
2731 Sys::Virt::Domain::REBOOT_PARAVIRT
2732 Reboot by issuing a paravirt power control command
2733
2734 METADATA CONSTANTS
2735 The following constants are useful when reading/writing metadata about
2736 a guest
2737
2738 Sys::Virt::Domain::METADATA_TITLE
2739 The short human friendly title of the guest
2740
2741 Sys::Virt::Domain::METADATA_DESCRIPTION
2742 The long free text description of the guest
2743
2744 Sys::Virt::Domain::METADATA_ELEMENT
2745 The structured metadata elements for the guest
2746
2747 DISK ERROR CONSTANTS
2748 The following constants are useful when interpreting disk error codes
2749
2750 Sys::Virt::Domain::DISK_ERROR_NONE
2751 No error
2752
2753 Sys::Virt::Domain::DISK_ERROR_NO_SPACE
2754 The host storage has run out of free space
2755
2756 Sys::Virt::Domain::DISK_ERROR_UNSPEC
2757 An unspecified error has occurred.
2758
2759 MEMORY STATISTIC CONSTANTS
2760 Sys::Virt::Domain::MEMORY_STAT_SWAP_IN
2761 Swap in
2762
2763 Sys::Virt::Domain::MEMORY_STAT_SWAP_OUT
2764 Swap out
2765
2766 Sys::Virt::Domain::MEMORY_STAT_MINOR_FAULT
2767 Minor faults
2768
2769 Sys::Virt::Domain::MEMORY_STAT_MAJOR_FAULT
2770 Major faults
2771
2772 Sys::Virt::Domain::MEMORY_STAT_RSS
2773 Resident memory
2774
2775 Sys::Virt::Domain::MEMORY_STAT_UNUSED
2776 Unused memory
2777
2778 Sys::Virt::Domain::MEMORY_STAT_AVAILABLE
2779 Available memory
2780
2781 Sys::Virt::Domain::MEMORY_STAT_ACTUAL_BALLOON
2782 Actual balloon limit
2783
2784 Sys::Virt::Domain::MEMORY_STAT_USABLE
2785 Amount of usable memory
2786
2787 Sys::Virt::Domain::MEMORY_STAT_LAST_UPDATE
2788 Time of last stats refresh from guest
2789
2790 Sys::Virt::Domain::MEMORY_STAT_DISK_CACHES
2791 Disk cache size
2792
2793 Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGALLOC
2794 The amount of successful huge page allocations
2795
2796 Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGFAIL
2797 The amount of failed huge page allocations
2798
2799 DOMAIN LIST CONSTANTS
2800 The following constants can be used when listing domains
2801
2802 Sys::Virt::Domain::LIST_ACTIVE
2803 Only list domains that are currently active (running, or paused)
2804
2805 Sys::Virt::Domain::LIST_AUTOSTART
2806 Only list domains that are set to automatically start on boot
2807
2808 Sys::Virt::Domain::LIST_HAS_SNAPSHOT
2809 Only list domains that have a stored snapshot
2810
2811 Sys::Virt::Domain::LIST_INACTIVE
2812 Only list domains that are currently inactive (shutoff, saved)
2813
2814 Sys::Virt::Domain::LIST_MANAGEDSAVE
2815 Only list domains that have current managed save state
2816
2817 Sys::Virt::Domain::LIST_NO_AUTOSTART
2818 Only list domains that are not set to automatically start on boto
2819
2820 Sys::Virt::Domain::LIST_NO_MANAGEDSAVE
2821 Only list domains that do not have any managed save state
2822
2823 Sys::Virt::Domain::LIST_NO_SNAPSHOT
2824 Only list domains that do not have a stored snapshot
2825
2826 Sys::Virt::Domain::LIST_OTHER
2827 Only list domains that are not running, paused or shutoff
2828
2829 Sys::Virt::Domain::LIST_PAUSED
2830 Only list domains that are paused
2831
2832 Sys::Virt::Domain::LIST_PERSISTENT
2833 Only list domains which have a persistent config
2834
2835 Sys::Virt::Domain::LIST_RUNNING
2836 Only list domains that are currently running
2837
2838 Sys::Virt::Domain::LIST_SHUTOFF
2839 Only list domains that are currently shutoff
2840
2841 Sys::Virt::Domain::LIST_TRANSIENT
2842 Only list domains that do not have a persistent config
2843
2844 Sys::Virt::Domain::LIST_HAS_CHECKPOINT
2845 Only list domains that have a stored checkpoint
2846
2847 Sys::Virt::Domain::LIST_NO_CHECKPOINT
2848 Only list domains that do not have a stored checkpoint
2849
2850 SEND KEY CONSTANTS
2851 The following constants are to be used with the "send_key" API
2852
2853 Sys::Virt::Domain::SEND_KEY_MAX_KEYS
2854 The maximum number of keys that can be sent in a single call to
2855 "send_key"
2856
2857 BLOCK STATS CONSTANTS
2858 The following constants provide the names of well known block stats
2859 fields
2860
2861 Sys::Virt::Domain::BLOCK_STATS_ERRS
2862 The number of I/O errors
2863
2864 Sys::Virt::Domain::BLOCK_STATS_FLUSH_REQ
2865 The number of flush requests
2866
2867 Sys::Virt::Domain::BLOCK_STATS_FLUSH_TOTAL_TIMES
2868 The time spent processing flush requests
2869
2870 Sys::Virt::Domain::BLOCK_STATS_READ_BYTES
2871 The amount of data read
2872
2873 Sys::Virt::Domain::BLOCK_STATS_READ_REQ
2874 The number of read requests
2875
2876 Sys::Virt::Domain::BLOCK_STATS_READ_TOTAL_TIMES
2877 The time spent processing read requests
2878
2879 Sys::Virt::Domain::BLOCK_STATS_WRITE_BYTES
2880 The amount of data written
2881
2882 Sys::Virt::Domain::BLOCK_STATS_WRITE_REQ
2883 The number of write requests
2884
2885 Sys::Virt::Domain::BLOCK_STATS_WRITE_TOTAL_TIMES
2886 The time spent processing write requests
2887
2888 CPU STATS CONSTANTS
2889 The following constants provide the names of well known cpu stats
2890 fields
2891
2892 Sys::Virt::Domain::CPU_STATS_CPUTIME
2893 The total CPU time, including both hypervisor and vCPU time.
2894
2895 Sys::Virt::Domain::CPU_STATS_USERTIME
2896 THe total time in kernel
2897
2898 Sys::Virt::Domain::CPU_STATS_SYSTEMTIME
2899 The total time in userspace
2900
2901 Sys::Virt::Domain::CPU_STATS_VCPUTIME
2902 The total vCPU time.
2903
2904 CPU STATS CONSTANTS
2905 The following constants provide the names of well known schedular
2906 parameters
2907
2908 Sys::Virt::SCHEDULER_EMULATOR_PERIOD
2909 The duration of the time period for scheduling the emulator
2910
2911 Sys::Virt::SCHEDULER_EMULATOR_QUOTA
2912 The quota for the emulator in one schedular time period
2913
2914 Sys::Virt::SCHEDULER_IOTHREAD_PERIOD
2915 The duration of the time period for scheduling the iothread
2916
2917 Sys::Virt::SCHEDULER_IOTHREAD_QUOTA
2918 The quota for the iothread in one schedular time period
2919
2920 DOMAIN STATS FLAG CONSTANTS
2921 The following constants are used as flags when requesting bulk domain
2922 stats from "Sys::Virt::get_all_domain_stats".
2923
2924 Sys::Virt::Domain::GET_ALL_STATS_ACTIVE
2925 Include stats for active domains
2926
2927 Sys::Virt::Domain::GET_ALL_STATS_INACTIVE
2928 Include stats for inactive domains
2929
2930 Sys::Virt::Domain::GET_ALL_STATS_OTHER
2931 Include stats for other domains
2932
2933 Sys::Virt::Domain::GET_ALL_STATS_PAUSED
2934 Include stats for paused domains
2935
2936 Sys::Virt::Domain::GET_ALL_STATS_PERSISTENT
2937 Include stats for persistent domains
2938
2939 Sys::Virt::Domain::GET_ALL_STATS_RUNNING
2940 Include stats for running domains
2941
2942 Sys::Virt::Domain::GET_ALL_STATS_SHUTOFF
2943 Include stats for shutoff domains
2944
2945 Sys::Virt::Domain::GET_ALL_STATS_TRANSIENT
2946 Include stats for transient domains
2947
2948 Sys::Virt::Domain::GET_ALL_STATS_ENFORCE_STATS
2949 Require that all requested stats fields are returned
2950
2951 Sys::Virt::Domain::GET_ALL_STATS_BACKING
2952 Get stats for image backing files too
2953
2954 Sys::Virt::Domain::GET_ALL_STATS_NOWAIT
2955 Skip stats if they can't be acquired without waiting
2956
2957 DOMAIN STATS FIELD CONSTANTS
2958 The following constants are used to control which fields are returned
2959 for stats queries.
2960
2961 Sys::Virt::Domain::STATS_BALLOON
2962 Balloon statistics
2963
2964 Sys::Virt::Domain::STATS_BLOCK
2965 Block device info
2966
2967 Sys::Virt::Domain::STATS_CPU_TOTAL
2968 CPU usage info
2969
2970 Sys::Virt::Domain::STATS_INTERFACE
2971 Network interface info
2972
2973 Sys::Virt::Domain::STATS_STATE
2974 General lifecycle state
2975
2976 Sys::Virt::Domain::STATS_VCPU
2977 Virtual CPU info
2978
2979 Sys::Virt::Domain::STATS_PERF
2980 Performance event counter values
2981
2982 Sys::Virt::Domain::STATS_IOTHREAD
2983 IOThread performance statistics values
2984
2985 Sys::Virt::Domain::STATS_MEMORY
2986 Memory bandwidth statistics values
2987
2988 PROCESS SIGNALS
2989 The following constants provide the names of signals which can be sent
2990 to guest processes. They mostly correspond to POSIX signal names.
2991
2992 Sys::Virt::Domain::PROCESS_SIGNAL_NOP
2993 SIGNOP
2994
2995 Sys::Virt::Domain::PROCESS_SIGNAL_HUP
2996 SIGHUP
2997
2998 Sys::Virt::Domain::PROCESS_SIGNAL_INT
2999 SIGINT
3000
3001 Sys::Virt::Domain::PROCESS_SIGNAL_QUIT
3002 SIGQUIT
3003
3004 Sys::Virt::Domain::PROCESS_SIGNAL_ILL
3005 SIGILL
3006
3007 Sys::Virt::Domain::PROCESS_SIGNAL_TRAP
3008 SIGTRAP
3009
3010 Sys::Virt::Domain::PROCESS_SIGNAL_ABRT
3011 SIGABRT
3012
3013 Sys::Virt::Domain::PROCESS_SIGNAL_BUS
3014 SIGBUS
3015
3016 Sys::Virt::Domain::PROCESS_SIGNAL_FPE
3017 SIGFPE
3018
3019 Sys::Virt::Domain::PROCESS_SIGNAL_KILL
3020 SIGKILL
3021
3022 Sys::Virt::Domain::PROCESS_SIGNAL_USR1
3023 SIGUSR1
3024
3025 Sys::Virt::Domain::PROCESS_SIGNAL_SEGV
3026 SIGSEGV
3027
3028 Sys::Virt::Domain::PROCESS_SIGNAL_USR2
3029 SIGUSR2
3030
3031 Sys::Virt::Domain::PROCESS_SIGNAL_PIPE
3032 SIGPIPE
3033
3034 Sys::Virt::Domain::PROCESS_SIGNAL_ALRM
3035 SIGALRM
3036
3037 Sys::Virt::Domain::PROCESS_SIGNAL_TERM
3038 SIGTERM
3039
3040 Sys::Virt::Domain::PROCESS_SIGNAL_STKFLT
3041 SIGSTKFLT
3042
3043 Sys::Virt::Domain::PROCESS_SIGNAL_CHLD
3044 SIGCHLD
3045
3046 Sys::Virt::Domain::PROCESS_SIGNAL_CONT
3047 SIGCONT
3048
3049 Sys::Virt::Domain::PROCESS_SIGNAL_STOP
3050 SIGSTOP
3051
3052 Sys::Virt::Domain::PROCESS_SIGNAL_TSTP
3053 SIGTSTP
3054
3055 Sys::Virt::Domain::PROCESS_SIGNAL_TTIN
3056 SIGTTIN
3057
3058 Sys::Virt::Domain::PROCESS_SIGNAL_TTOU
3059 SIGTTOU
3060
3061 Sys::Virt::Domain::PROCESS_SIGNAL_URG
3062 SIGURG
3063
3064 Sys::Virt::Domain::PROCESS_SIGNAL_XCPU
3065 SIGXCPU
3066
3067 Sys::Virt::Domain::PROCESS_SIGNAL_XFSZ
3068 SIGXFSZ
3069
3070 Sys::Virt::Domain::PROCESS_SIGNAL_VTALRM
3071 SIGVTALRM
3072
3073 Sys::Virt::Domain::PROCESS_SIGNAL_PROF
3074 SIGPROF
3075
3076 Sys::Virt::Domain::PROCESS_SIGNAL_WINCH
3077 SIGWINCH
3078
3079 Sys::Virt::Domain::PROCESS_SIGNAL_POLL
3080 SIGPOLL
3081
3082 Sys::Virt::Domain::PROCESS_SIGNAL_PWR
3083 SIGPWR
3084
3085 Sys::Virt::Domain::PROCESS_SIGNAL_SYS
3086 SIGSYS
3087
3088 Sys::Virt::Domain::PROCESS_SIGNAL_RT0
3089 SIGRT0
3090
3091 Sys::Virt::Domain::PROCESS_SIGNAL_RT1
3092 SIGRT1
3093
3094 Sys::Virt::Domain::PROCESS_SIGNAL_RT2
3095 SIGRT2
3096
3097 Sys::Virt::Domain::PROCESS_SIGNAL_RT3
3098 SIGRT3
3099
3100 Sys::Virt::Domain::PROCESS_SIGNAL_RT4
3101 SIGRT4
3102
3103 Sys::Virt::Domain::PROCESS_SIGNAL_RT5
3104 SIGRT5
3105
3106 Sys::Virt::Domain::PROCESS_SIGNAL_RT6
3107 SIGRT6
3108
3109 Sys::Virt::Domain::PROCESS_SIGNAL_RT7
3110 SIGRT7
3111
3112 Sys::Virt::Domain::PROCESS_SIGNAL_RT8
3113 SIGRT8
3114
3115 Sys::Virt::Domain::PROCESS_SIGNAL_RT9
3116 SIGRT9
3117
3118 Sys::Virt::Domain::PROCESS_SIGNAL_RT10
3119 SIGRT10
3120
3121 Sys::Virt::Domain::PROCESS_SIGNAL_RT11
3122 SIGRT11
3123
3124 Sys::Virt::Domain::PROCESS_SIGNAL_RT12
3125 SIGRT12
3126
3127 Sys::Virt::Domain::PROCESS_SIGNAL_RT13
3128 SIGRT13
3129
3130 Sys::Virt::Domain::PROCESS_SIGNAL_RT14
3131 SIGRT14
3132
3133 Sys::Virt::Domain::PROCESS_SIGNAL_RT15
3134 SIGRT15
3135
3136 Sys::Virt::Domain::PROCESS_SIGNAL_RT16
3137 SIGRT16
3138
3139 Sys::Virt::Domain::PROCESS_SIGNAL_RT17
3140 SIGRT17
3141
3142 Sys::Virt::Domain::PROCESS_SIGNAL_RT18
3143 SIGRT18
3144
3145 Sys::Virt::Domain::PROCESS_SIGNAL_RT19
3146 SIGRT19
3147
3148 Sys::Virt::Domain::PROCESS_SIGNAL_RT20
3149 SIGRT20
3150
3151 Sys::Virt::Domain::PROCESS_SIGNAL_RT21
3152 SIGRT21
3153
3154 Sys::Virt::Domain::PROCESS_SIGNAL_RT22
3155 SIGRT22
3156
3157 Sys::Virt::Domain::PROCESS_SIGNAL_RT23
3158 SIGRT23
3159
3160 Sys::Virt::Domain::PROCESS_SIGNAL_RT24
3161 SIGRT24
3162
3163 Sys::Virt::Domain::PROCESS_SIGNAL_RT25
3164 SIGRT25
3165
3166 Sys::Virt::Domain::PROCESS_SIGNAL_RT26
3167 SIGRT26
3168
3169 Sys::Virt::Domain::PROCESS_SIGNAL_RT27
3170 SIGRT27
3171
3172 Sys::Virt::Domain::PROCESS_SIGNAL_RT28
3173 SIGRT28
3174
3175 Sys::Virt::Domain::PROCESS_SIGNAL_RT29
3176 SIGRT29
3177
3178 Sys::Virt::Domain::PROCESS_SIGNAL_RT30
3179 SIGRT30
3180
3181 Sys::Virt::Domain::PROCESS_SIGNAL_RT31
3182 SIGRT31
3183
3184 Sys::Virt::Domain::PROCESS_SIGNAL_RT32
3185 SIGRT32
3186
3187 DOMAIN TUNABLE CONSTANTS
3188 The following constants are useful when accessing domain tuning
3189 parameters in APIs and events
3190
3191 Sys::Virt::Domain::TUNABLE_CPU_CPU_SHARES
3192 Proportional CPU weight
3193
3194 Sys::Virt::Domain::TUNABLE_CPU_EMULATORPIN
3195 Emulator thread CPU pinning mask
3196
3197 Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_PERIOD
3198 Emulator thread CPU period
3199
3200 Sys::Virt::Domain::TUNABLE_CPU_EMULATOR_QUOTA
3201 Emulator thread CPU quota
3202
3203 Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_PERIOD
3204 Iothread thread CPU period
3205
3206 Sys::Virt::Domain::TUNABLE_CPU_IOTHREAD_QUOTA
3207 Iothread thread CPU quota
3208
3209 Sys::Virt::Domain::TUNABLE_CPU_VCPUPIN
3210 VCPU thread pinning mask
3211
3212 Sys::Virt::Domain::TUNABLE_CPU_VCPU_PERIOD
3213 VCPU thread period
3214
3215 Sys::Virt::Domain::TUNABLE_CPU_VCPU_QUOTA
3216 VCPU thread quota
3217
3218 Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_PERIOD
3219 VM global period
3220
3221 Sys::Virt::Domain::TUNABLE_CPU_GLOBAL_QUOTA
3222 VM global quota
3223
3224 Sys::Virt::Domain::TUNABLE_BLKDEV_DISK
3225 The name of guest disks
3226
3227 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC
3228 Read throughput in bytes per sec
3229
3230 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC
3231 Read throughput in I/O operations per sec
3232
3233 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC
3234 Total throughput in bytes per sec
3235
3236 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC
3237 Total throughput in I/O operations per sec
3238
3239 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC
3240 Write throughput in bytes per sec
3241
3242 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC
3243 Write throughput in I/O operations per sec
3244
3245 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX
3246 Maximum read throughput in bytes per sec
3247
3248 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX
3249 Maximum read throughput in I/O operations per sec
3250
3251 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX
3252 Maximum total throughput in bytes per sec
3253
3254 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX
3255 Maximum total throughput in I/O operations per sec
3256
3257 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX
3258 Maximum write throughput in bytes per sec
3259
3260 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX
3261 Maximum write throughput in I/O operations per sec
3262
3263 Sys::Virt::Domain::TUNABLE_BLKDEV_SIZE_IOPS_SEC
3264 The maximum I/O operations per second
3265
3266 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_BYTES_SEC_MAX_LENGTH
3267 The duration in seconds allowed for maximum total bytes processed
3268 per second.
3269
3270 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_BYTES_SEC_MAX_LENGTH
3271 The duration in seconds allowed for maximum bytes read per second.
3272
3273 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_BYTES_SEC_MAX_LENGTH
3274 The duration in seconds allowed for maximum bytes written per
3275 second.
3276
3277 Sys::Virt::Domain::TUNABLE_BLKDEV_TOTAL_IOPS_SEC_MAX_LENGTH
3278 The duration in seconds allowed for maximum total I/O operations
3279 processed per second.
3280
3281 Sys::Virt::Domain::TUNABLE_BLKDEV_READ_IOPS_SEC_MAX_LENGTH
3282 The duration in seconds allowed for maximum I/O operations read per
3283 second.
3284
3285 Sys::Virt::Domain::TUNABLE_BLKDEV_WRITE_IOPS_SEC_MAX_LENGTH
3286 The duration in seconds allowed for maximum I/O operations written
3287 per second.
3288
3289 Sys::Virt::Domain::TUNABLE_BLKDEV_GROUP_NAME
3290 The name of the blkdev group
3291
3292 Sys::Virt::Domain::TUNABLE_IOTHREADSPIN
3293 The I/O threads pinning
3294
3295 DOMAIN LIFECYCLE CONSTANTS
3296 The following constants are useful when setting action for lifecycle
3297 events.
3298
3299 Sys::Virt::Domain::LIFECYCLE_POWEROFF
3300 The poweroff lifecycle event type
3301
3302 Sys::Virt::Domain::LIFECYCLE_REBOOT
3303 The reboot lifecycle event type
3304
3305 Sys::Virt::Domain::LIFECYCLE_CRASH
3306 The crash lifecycle event type
3307
3308 DOMAIN LIFECYCLE ACTION CONSTANTS
3309 Sys::Virt::Domain::LIFECYCLE_ACTION_DESTROY
3310 The destroy lifecycle action
3311
3312 Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART
3313 The restart lifecycle action
3314
3315 Sys::Virt::Domain::LIFECYCLE_ACTION_RESTART_RENAME
3316 The restart-rename lifecycle action
3317
3318 Sys::Virt::Domain::LIFECYCLE_ACTION_PRESERVE
3319 The preserve lifecycle action
3320
3321 Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_DESTROY
3322 The coredump-destroy lifecycle action
3323
3324 Sys::Virt::Domain::LIFECYCLE_ACTION_COREDUMP_RESTART
3325 The coredump-restart lifecycle action
3326
3328 Daniel P. Berrange <berrange@redhat.com>
3329
3331 Copyright (C) 2006 Red Hat Copyright (C) 2006-2007 Daniel P. Berrange
3332
3334 This program is free software; you can redistribute it and/or modify it
3335 under the terms of either the GNU General Public License as published
3336 by the Free Software Foundation (either version 2 of the License, or at
3337 your option any later version), or, the Artistic License, as specified
3338 in the Perl README file.
3339
3341 Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
3342
3343
3344
3345perl v5.32.0 2020-07-28 Sys::Virt::Domain(3)