1virt-get-kernel(1) Virtualization Support virt-get-kernel(1)
2
3
4
6 virt-get-kernel - Extract kernel and ramdisk from guests
7
9 virt-get-kernel [--options] -d domname
10
11 virt-get-kernel [--options] -a disk.img
12
14 This option extracts the kernel and initramfs from a guest.
15
16 The format of the disk image is automatically detected unless you
17 specify it by using the --format option.
18
19 In the case where the guest contains multiple kernels, the one with the
20 highest version number is chosen. To extract arbitrary kernels from
21 the disk image, see guestfish(1). To extract the entire "/boot"
22 directory of a guest, see virt-copy-out(1).
23
25 --help
26 Display help.
27
28 -a file
29 --add file
30 Add file which should be a disk image from a virtual machine.
31
32 The format of the disk image is auto-detected. To override this
33 and force a particular format use the --format option.
34
35 -a URI
36 --add URI
37 Add a remote disk. The URI format is compatible with guestfish.
38 See "ADDING REMOTE STORAGE" in guestfish(1).
39
40 --colors
41 --colours
42 Use ANSI colour sequences to colourize messages. This is the
43 default when the output is a tty. If the output of the program is
44 redirected to a file, ANSI colour sequences are disabled unless you
45 use this option.
46
47 -c URI
48 --connect URI
49 If using libvirt, connect to the given URI. If omitted, then we
50 connect to the default libvirt hypervisor.
51
52 If you specify guest block devices directly (-a), then libvirt is
53 not used at all.
54
55 -d guest
56 --domain guest
57 Add all the disks from the named libvirt guest. Domain UUIDs can
58 be used instead of names.
59
60 --echo-keys
61 When prompting for keys and passphrases, virt-get-kernel normally
62 turns echoing off so you cannot see what you are typing. If you
63 are not worried about Tempest attacks and there is no one else in
64 the room you can specify this flag to see what you are typing.
65
66 --format raw|qcow2|..
67 --format auto
68 The default for the -a option is to auto-detect the format of the
69 disk image. Using this forces the disk format for the -a option on
70 the command line.
71
72 If you have untrusted raw-format guest disk images, you should use
73 this option to specify the disk format. This avoids a possible
74 security problem with malicious guests (CVE-2010-3851).
75
76 --key SELECTOR
77 Specify a key for LUKS, to automatically open a LUKS device when
78 using the inspection. "SELECTOR" can be in one of the following
79 formats:
80
81 --key "DEVICE":key:KEY_STRING
82 Use the specified "KEY_STRING" as passphrase.
83
84 --key "DEVICE":file:FILENAME
85 Read the passphrase from FILENAME.
86
87 --keys-from-stdin
88 Read key or passphrase parameters from stdin. The default is to
89 try to read passphrases from the user by opening /dev/tty.
90
91 --machine-readable
92 --machine-readable=format
93 This option is used to make the output more machine friendly when
94 being parsed by other programs. See "MACHINE READABLE OUTPUT"
95 below.
96
97 -o directory
98 --output directory
99 This option specifies the output directory where kernel and
100 initramfs from the guest are written.
101
102 If not specified, the default output is the current directory.
103
104 --prefix prefix
105 This option specifies a prefix for the extracted files.
106
107 If a prefix is specified, then there will be a dash ("-") after the
108 prefix and before the rest of the file name; for example, a kernel
109 in the guest like "vmlinuz-3.19.0-20-generic" is saved as
110 "mydistro-vmlinuz-3.19.0-20-generic" when the prefix is "mydistro".
111
112 See also --unversioned-names.
113
114 -q
115 --quiet
116 Don’t print ordinary progress messages.
117
118 --unversioned-names
119 This option affects the destination file name of extracted files.
120
121 If enabled, files will be saved locally just with the base name;
122 for example, kernel and ramdisk in the guest like
123 "vmlinuz-3.19.0-20-generic" and "initrd.img-3.19.0-20-generic" are
124 saved respectively as "vmlinuz" and "initrd.img".
125
126 See also --prefix.
127
128 -v
129 --verbose
130 Enable verbose messages for debugging.
131
132 -V
133 --version
134 Display version number and exit.
135
136 -x Enable tracing of libguestfs API calls.
137
139 The --machine-readable option can be used to make the output more
140 machine friendly, which is useful when calling virt-get-kernel from
141 other programs, GUIs etc.
142
143 Use the option on its own to query the capabilities of the virt-get-
144 kernel binary. Typical output looks like this:
145
146 $ virt-get-kernel --machine-readable
147 virt-get-kernel
148
149 A list of features is printed, one per line, and the program exits with
150 status 0.
151
152 It is possible to specify a format string for controlling the output;
153 see "ADVANCED MACHINE READABLE OUTPUT" in guestfs(3).
154
156 For other environment variables which affect all libguestfs programs,
157 see "ENVIRONMENT VARIABLES" in guestfs(3).
158
160 This program returns 0 if successful, or non-zero if there was an
161 error.
162
164 guestfs(3), guestfish(1), guestmount(1), virt-copy-out(1),
165 http://libguestfs.org/.
166
168 Richard W.M. Jones http://people.redhat.com/~rjones/
169
171 Copyright (C) 2013-2019 Red Hat Inc.
172
174 This program is free software; you can redistribute it and/or modify it
175 under the terms of the GNU General Public License as published by the
176 Free Software Foundation; either version 2 of the License, or (at your
177 option) any later version.
178
179 This program is distributed in the hope that it will be useful, but
180 WITHOUT ANY WARRANTY; without even the implied warranty of
181 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
182 General Public License for more details.
183
184 You should have received a copy of the GNU General Public License along
185 with this program; if not, write to the Free Software Foundation, Inc.,
186 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
187
189 To get a list of bugs against libguestfs, use this link:
190 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
191
192 To report a new bug against libguestfs, use this link:
193 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
194
195 When reporting a bug, please supply:
196
197 · The version of libguestfs.
198
199 · Where you got libguestfs (eg. which Linux distro, compiled from
200 source, etc)
201
202 · Describe the bug accurately and give a way to reproduce it.
203
204 · Run libguestfs-test-tool(1) and paste the complete, unedited output
205 into the bug report.
206
207
208
209libguestfs-1.40.1 2019-01-17 virt-get-kernel(1)