.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ImVirt 3" .TH ImVirt 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ImVirt \- detects several virtualizations .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use ImVirt; \& print imv_get(IMV_PROB_DEFAULT, imv_detect()),"\en"; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \f(CW\*(C`ImVirt\*(C'\fR package tries to detect if it is run in a virtualization container. At least the following container should be detected: .IP ARAnyM 4 .IX Item "ARAnyM" .PD 0 .IP KVM 4 .IX Item "KVM" .IP lguest 4 .IX Item "lguest" .IP LXC 4 .IX Item "LXC" .IP OpenVZ 4 .IX Item "OpenVZ" .IP QEMU 4 .IX Item "QEMU" .IP UML 4 .IX Item "UML" .IP VirtualBox 4 .IX Item "VirtualBox" .IP "Virtual PC/Server" 4 .IX Item "Virtual PC/Server" .IP VMware 4 .IX Item "VMware" .IP Xen 4 .IX Item "Xen" .PD .SH "DETECTION HEURISTIC" .IX Header "DETECTION HEURISTIC" The detection is based on a heuristic \- you should not trust the result at all. .PP ImVirt probes for different well-known characteristics of different virtualization containers. Any characteristics found or not found are weighted by their significance. .PP The result of the heuristic is a weighted tree. The leaves are the (not) detected containers. .SH FUNCTIONS .IX Header "FUNCTIONS" The following functions should be used to retrieve the detected virtualization containers: .ie n .IP "imv_get($prob) Returns exactly one string describing the detected container. If the detected container has a smaller match probability than $prob the string 'Unknown' is returned." 4 .el .IP "imv_get($prob) Returns exactly one string describing the detected container. If the detected container has a smaller match probability than \f(CW$prob\fR the string 'Unknown' is returned." 4 .IX Item "imv_get($prob) Returns exactly one string describing the detected container. If the detected container has a smaller match probability than $prob the string 'Unknown' is returned." .PD 0 .IP "\fBimv_get_all()\fR Returns a hash any positive detected containers as keys and their corresponding match probability as value." 4 .IX Item "imv_get_all() Returns a hash any positive detected containers as keys and their corresponding match probability as value." .IP "\fBimv_get_pos_results()\fR Returns a list of all possible results which might be returned by all detection modules. The list entries might be appended by some additional data like version numbers etc." 4 .IX Item "imv_get_pos_results() Returns a list of all possible results which might be returned by all detection modules. The list entries might be appended by some additional data like version numbers etc."