Debian Codegraph @

upstream/debian-unstable/man1/systemd-detect-virt.1

raw
1 '\" t
2 .TH "SYSTEMD\-DETECT\-VIRT" "1" "" "systemd 261~rc3" "systemd-detect-virt"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-detect-virt \- Detect execution in a virtualized environment
24 .SH "SYNOPSIS"
25 .HP \w'\fBsystemd\-detect\-virt\fR\ 'u
26 \fBsystemd\-detect\-virt\fR [OPTIONS...]
27 .SH "DESCRIPTION"
28 .PP
29 \fBsystemd\-detect\-virt\fR
30 detects execution in a virtualized environment\&. It identifies the virtualization technology and can distinguish full machine virtualization from container virtualization\&.
31 systemd\-detect\-virt
32 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
33 \fB\-\-container\fR
34 and
35 \fB\-\-vm\fR
36 can be used to limit what types of virtualization are detected\&.
37 .PP
38 When executed without
39 \fB\-\-quiet\fR
40 will print a short identifier for the detected virtualization technology\&. The following technologies are currently identified:
41 .sp
42 .it 1 an-trap
43 .nr an-no-space-flag 1
44 .nr an-break-flag 1
45 .br
46 .B Table\ \&1.\ \&Known virtualization technologies (both VM, i\&.e\&. full hardware virtualization, and container, i\&.e\&. shared kernel virtualization)
47 .TS
48 allbox tab(:);
49 lB lB lB.
50 T{
51 Type
52 T}:T{
53 ID
54 T}:T{
55 Product
56 T}
57 .T&
58 lt l l
59 ^ l l
60 ^ l l
61 ^ l l
62 ^ l l
63 ^ l l
64 ^ l l
65 ^ l l
66 ^ l l
67 ^ l l
68 ^ l l
69 ^ l l
70 ^ l l
71 ^ l l
72 ^ l l
73 ^ l l
74 ^ l l
75 ^ l l
76 lt l l
77 ^ l l
78 ^ l l
79 ^ l l
80 ^ l l
81 ^ l l
82 ^ l l
83 ^ l l
84 ^ l l
85 ^ l l.
86 T{
87 VM
88 T}:T{
89 \fIqemu\fR
90 T}:T{
91 QEMU software virtualization, without KVM
92 T}
93 :T{
94 \fIkvm\fR
95 T}:T{
96 Linux KVM kernel virtual machine, in combination with QEMU\&. Not used for other virtualizers using the KVM interfaces, such as Oracle VirtualBox or Amazon EC2 Nitro, see below\&.
97 T}
98 :T{
99 \fIamazon\fR
100 T}:T{
101 Amazon EC2 Nitro using Linux KVM
102 T}
103 :T{
104 \fIzvm\fR
105 T}:T{
106 s390 z/VM
107 T}
108 :T{
109 \fIvmware\fR
110 T}:T{
111 VMware Workstation or Server, and related products
112 T}
113 :T{
114 \fImicrosoft\fR
115 T}:T{
116 Hyper\-V, also known as Viridian or Windows Server Virtualization
117 T}
118 :T{
119 \fIoracle\fR
120 T}:T{
121 Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems), for legacy and KVM hypervisor
122 T}
123 :T{
124 \fIpowervm\fR
125 T}:T{
126 IBM PowerVM hypervisor \(em comes as firmware with some IBM POWER servers
127 T}
128 :T{
129 \fIxen\fR
130 T}:T{
131 Xen hypervisor (only domU, not dom0)
132 T}
133 :T{
134 \fIbochs\fR
135 T}:T{
136 Bochs Emulator
137 T}
138 :T{
139 \fIuml\fR
140 T}:T{
141 User\-mode Linux
142 T}
143 :T{
144 \fIparallels\fR
145 T}:T{
146 Parallels Desktop, Parallels Server
147 T}
148 :T{
149 \fIbhyve\fR
150 T}:T{
151 bhyve, FreeBSD hypervisor
152 T}
153 :T{
154 \fIqnx\fR
155 T}:T{
156 QNX hypervisor
157 T}
158 :T{
159 \fIacrn\fR
160 T}:T{
161 \m[blue]\fBACRN hypervisor\fR\m[]\&\s-2\u[1]\d\s+2
162 T}
163 :T{
164 \fIapple\fR
165 T}:T{
166 \m[blue]\fBApple virtualization framework\fR\m[]\&\s-2\u[2]\d\s+2
167 T}
168 :T{
169 \fIsre\fR
170 T}:T{
171 \m[blue]\fBLMHS SRE hypervisor\fR\m[]\&\s-2\u[3]\d\s+2
172 T}
173 :T{
174 \fIgoogle\fR
175 T}:T{
176 \m[blue]\fBGoogle Compute Engine\fR\m[]\&\s-2\u[4]\d\s+2
177 T}
178 T{
179 Container
180 T}:T{
181 \fIopenvz\fR
182 T}:T{
183 OpenVZ/Virtuozzo
184 T}
185 :T{
186 \fIlxc\fR
187 T}:T{
188 Linux container implementation by LXC
189 T}
190 :T{
191 \fIlxc\-libvirt\fR
192 T}:T{
193 Linux container implementation by libvirt
194 T}
195 :T{
196 \fIsystemd\-nspawn\fR
197 T}:T{
198 systemd\*(Aqs minimal container implementation, see \fBsystemd-nspawn\fR(1)
199 T}
200 :T{
201 \fIdocker\fR
202 T}:T{
203 Docker container manager
204 T}
205 :T{
206 \fIpodman\fR
207 T}:T{
208 \m[blue]\fBPodman\fR\m[]\&\s-2\u[5]\d\s+2 container manager
209 T}
210 :T{
211 \fIrkt\fR
212 T}:T{
213 rkt app container runtime
214 T}
215 :T{
216 \fIwsl\fR
217 T}:T{
218 \m[blue]\fBWindows Subsystem for Linux\fR\m[]\&\s-2\u[6]\d\s+2
219 T}
220 :T{
221 \fIproot\fR
222 T}:T{
223 \m[blue]\fBproot\fR\m[]\&\s-2\u[7]\d\s+2 userspace chroot/bind mount emulation
224 T}
225 :T{
226 \fIpouch\fR
227 T}:T{
228 \m[blue]\fBPouch\fR\m[]\&\s-2\u[8]\d\s+2 Container Engine
229 T}
230 .TE
231 .sp 1
232 .PP
233 If multiple virtualization solutions are used, only the "innermost" is detected and identified\&. That means if both machine and container virtualization are used in conjunction, only the latter will be identified (unless
234 \fB\-\-vm\fR
235 is passed)\&.
236 .PP
237 Windows Subsystem for Linux is not a Linux container, but an environment for running Linux userspace applications on top of the Windows kernel using a Linux\-compatible interface\&. WSL is categorized as a container for practical purposes\&. Multiple WSL environments share the same kernel and services should generally behave like when being run in a container\&.
238 .PP
239 When executed with
240 \fB\-\-cvm\fR, instead of printing the virtualization technology, it will display the confidential virtual machine technology, if any\&. The following technologies are currently identified:
241 .sp
242 .it 1 an-trap
243 .nr an-no-space-flag 1
244 .nr an-break-flag 1
245 .br
246 .B Table\ \&2.\ \&Known confidential virtualization technologies
247 .TS
248 allbox tab(:);
249 lB lB lB.
250 T{
251 Arch
252 T}:T{
253 ID
254 T}:T{
255 Technology
256 T}
257 .T&
258 lt l l
259 ^ l l
260 ^ l l
261 ^ l l
262 l l l
263 l l l.
264 T{
265 x86_64
266 T}:T{
267 \fIsev\fR
268 T}:T{
269 AMD Secure Encrypted Virtualization
270 T}
271 :T{
272 \fIsev\-es\fR
273 T}:T{
274 AMD Secure Encrypted Virtualization \- Encrypted State
275 T}
276 :T{
277 \fIsev\-snp\fR
278 T}:T{
279 AMD Secure Encrypted Virtualization \- Secure Nested Paging
280 T}
281 :T{
282 \fItdx\fR
283 T}:T{
284 Intel Trust Domain Extensions
285 T}
286 T{
287 s390x
288 T}:T{
289 \fIprotvirt\fR
290 T}:T{
291 IBM Protected Virtualization (Secure Execution)
292 T}
293 T{
294 arm64
295 T}:T{
296 \fIcca\fR
297 T}:T{
298 Arm Confidential Compute Architecture
299 T}
300 .TE
301 .sp 1
302 .SH "OPTIONS"
303 .PP
304 The following options are understood:
305 .PP
306 \fB\-c\fR, \fB\-\-container\fR
307 .RS 4
308 Only detects container virtualization (i\&.e\&. shared kernel virtualization)\&.
309 .RE
310 .PP
311 \fB\-v\fR, \fB\-\-vm\fR
312 .RS 4
313 Only detects hardware virtualization\&.
314 .RE
315 .PP
316 \fB\-r\fR, \fB\-\-chroot\fR
317 .RS 4
318 Detect whether invoked in a
319 \fBchroot\fR(2)
320 environment\&. In this mode, no output is written, but the return value indicates whether the process was invoked in a
321 \fBchroot()\fR
322 environment or not\&.
323 .sp
324 Added in version 228\&.
325 .RE
326 .PP
327 \fB\-\-private\-users\fR
328 .RS 4
329 Detect whether invoked in a user namespace\&. In this mode, no output is written, but the return value indicates whether the process was invoked inside of a user namespace or not\&. See
330 \fBuser_namespaces\fR(7)
331 for more information\&.
332 .sp
333 Added in version 232\&.
334 .RE
335 .PP
336 \fB\-\-cvm\fR
337 .RS 4
338 Detect whether invoked in a confidential virtual machine\&. The result of this detection may be used to disable features that should not be used in confidential VMs\&. It must not be used to release security sensitive information\&. The latter must only be released after attestation of the confidential environment\&.
339 .sp
340 Added in version 254\&.
341 .RE
342 .PP
343 \fB\-q\fR, \fB\-\-quiet\fR
344 .RS 4
345 Suppress output of the virtualization technology identifier\&.
346 .RE
347 .PP
348 \fB\-\-list\fR
349 .RS 4
350 Output all currently known and detectable container and VM environments\&.
351 .sp
352 Added in version 239\&.
353 .RE
354 .PP
355 \fB\-\-list\-cvm\fR
356 .RS 4
357 Output all currently known and detectable confidential virtualization technologies\&.
358 .sp
359 Added in version 254\&.
360 .RE
361 .PP
362 \fB\-h\fR, \fB\-\-help\fR
363 .RS 4
364 Print a short help text and exit\&.
365 .RE
366 .PP
367 \fB\-\-version\fR
368 .RS 4
369 Print a short version string and exit\&.
370 .RE
371 .SH "EXIT STATUS"
372 .PP
373 If a virtualization technology is detected, 0 is returned, a non\-zero code otherwise\&.
374 .SH "SEE ALSO"
375 .PP
376 \fBsystemd\fR(1), \fBsystemd-nspawn\fR(1), \fBchroot\fR(2), \fBnamespaces\fR(7)
377 .SH "NOTES"
378 .IP " 1." 4
379 ACRN hypervisor
380 .RS 4
381 \%https://projectacrn.org
382 .RE
383 .IP " 2." 4
384 Apple virtualization framework
385 .RS 4
386 \%https://developer.apple.com/documentation/virtualization
387 .RE
388 .IP " 3." 4
389 LMHS SRE hypervisor
390 .RS 4
391 \%https://www.lockheedmartin.com/en-us/products/Hardened-Security-for-Intel-Processors.html
392 .RE
393 .IP " 4." 4
394 Google Compute Engine
395 .RS 4
396 \%https://cloud.google.com/compute
397 .RE
398 .IP " 5." 4
399 Podman
400 .RS 4
401 \%https://podman.io
402 .RE
403 .IP " 6." 4
404 Windows Subsystem for Linux
405 .RS 4
406 \%https://docs.microsoft.com/en-us/windows/wsl/about
407 .RE
408 .IP " 7." 4
409 proot
410 .RS 4
411 \%https://proot-me.github.io/
412 .RE
413 .IP " 8." 4
414 Pouch
415 .RS 4
416 \%https://github.com/alibaba/pouch
417 .RE