systemd/man/systemd-detect-virt.1
2015-02-17 11:22:16 +01:00

188 lines
4.1 KiB
Groff

'\" t
.TH "SYSTEMD\-DETECT\-VIRT" "1" "" "systemd 219" "systemd-detect-virt"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-detect-virt \- Detect execution in a virtualized environment
.SH "SYNOPSIS"
.HP \w'\fBsystemd\-detect\-virt\ \fR\fB[OPTIONS...]\fR\ 'u
\fBsystemd\-detect\-virt \fR\fB[OPTIONS...]\fR
.SH "DESCRIPTION"
.PP
\fBsystemd\-detect\-virt\fR
detects execution in a virtualized environment\&. It identifies the virtualization technology and can distinguish full VM virtualization from container virtualization\&.
systemd\-detect\-virt
exits with a return value of 0 (success) if a virtualization technology is detected, and non\-zero (error) otherwise\&. By default any type of virtualization is detected, and the options
\fB\-\-container\fR
and
\fB\-\-vm\fR
can be used to limit what types of virtualization are detected\&.
.PP
When executed without
\fB\-\-quiet\fR
will print a short identifier for the detected virtualization technology\&. The following technologies are currently identified:
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&1.\ \&Known virtualization technologies (both VM, i.e. full hardware virtualization, and container, i.e. shared kernel virtualization)
.TS
allbox tab(:);
lB lB lB.
T{
Type
T}:T{
ID
T}:T{
Product
T}
.T&
l l l
^ l l
^ l l
^ l l
^ l l
^ l l
^ l l
^ l l
^ l l
l l l
^ l l
^ l l
^ l l
^ l l
^.
T{
VM
T}:T{
\fIqemu\fR
T}:T{
QEMU software virtualization
T}
:T{
\fIkvm\fR
T}:T{
Linux KVM kernel virtual machine
T}
:T{
\fIzvm\fR
T}:T{
s390 z/VM
T}
:T{
\fIvmware\fR
T}:T{
VMware Workstation or Server, and related products
T}
:T{
\fImicrosoft\fR
T}:T{
Hyper\-V, also known as Viridian or Windows Server Virtualization
T}
:T{
\fIoracle\fR
T}:T{
Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)
T}
:T{
\fIxen\fR
T}:T{
Xen hypervisor (only domU, not dom0)
T}
:T{
\fIbochs\fR
T}:T{
Bochs Emulator
T}
:T{
\fIuml\fR
T}:T{
User\-mode Linux
T}
T{
container
T}:T{
\fIopenvz\fR
T}:T{
OpenVZ/Virtuozzo
T}
:T{
\fIlxc\fR
T}:T{
Linux container implementation by LXC
T}
:T{
\fIlxc\-libvirt\fR
T}:T{
Linux container implementation by libvirt
T}
:T{
\fIsystemd\-nspawn\fR
T}:T{
systemd\*(Aqs minimal container implementation, see \fBsystemd-nspawn\fR(1)
T}
:T{
\fIdocker\fR
T}:T{
Docker container manager
T}
.TE
.sp 1
.PP
If multiple virtualization solutions are used, only the "innermost" is detected and identified\&. That means if both VM virtualization and container virtualization are used in conjunction, only the latter will be identified (unless
\fB\-\-vm\fR
is passed)\&.
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-c\fR, \fB\-\-container\fR
.RS 4
Only detects container virtualization (i\&.e\&. shared kernel virtualization)\&.
.RE
.PP
\fB\-v\fR, \fB\-\-vm\fR
.RS 4
Only detects VM virtualization (i\&.e\&. full hardware virtualization)\&.
.RE
.PP
\fB\-q\fR, \fB\-\-quiet\fR
.RS 4
Suppress output of the virtualization technology identifier\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "EXIT STATUS"
.PP
If a virtualization technology is detected, 0 is returned, a non\-zero code otherwise\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemd-nspawn\fR(1)