File: virt-customize.pod

package info (click to toggle)
libguestfs 1%3A1.40.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 123,660 kB
  • sloc: ansic: 460,074; ml: 63,059; sh: 14,955; java: 9,512; makefile: 9,133; cs: 6,300; haskell: 5,652; python: 3,856; perl: 3,619; erlang: 2,435; xml: 1,683; ruby: 350; pascal: 255; lex: 135; yacc: 128; cpp: 10
file content (309 lines) | stat: -rw-r--r-- 8,604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

=head1 名前

virt-customize - Customize a virtual machine

=head1 書式

 virt-customize
    [ -a disk.img [ -a disk.img ... ] | -d domname ]
    [--attach ISOFILE] [--attach-format FORMAT]
    [ -c URI | --connect URI ] [ -n | --dry-run ]
    [ --format FORMAT] [ -m MB | --memsize MB ]
    [ --network | --no-network ]
    [ -q | --quiet ] [--smp N] [ -v | --verbose ] [-x]
__CUSTOMIZE_SYNOPSIS__

 virt-customize [ -V | --version ]

=head1 説明

Virt-customize can customize a virtual machine (disk image) by installing
packages, editing configuration files, and so on.

Virt-customize modifies the guest or disk image I<in place>.  The guest must
be shut down.  If you want to preserve the existing contents of the guest,
I<you must snapshot, copy or clone the disk first>.

You do I<not> need to run virt-customize as root.  In fact we'd generally
recommend that you don't.

Related tools include: L<virt-sysprep(1)> and L<virt-builder(1)>.

=head1 オプション

=over 4

=item B<--help>

簡単なヘルプを表示します。

=item B<-a> file

=item B<--add> file

仮想マシンからディスクイメージの I<file> を追加します。

ディスクイメージの形式は自動的に検出されます。強制的に特定の形式を使用するには I<--format> オプションを使用します。

=item B<-a> URI

=item B<--add> URI

Add a remote disk.  The URI format is compatible with guestfish.  See
L<guestfish(1)/ADDING REMOTE STORAGE>.

=item B<--attach> ISOFILE

The given disk is attached to the libguestfs appliance.  This is used to
provide extra software repositories or other data for customization.

You probably want to ensure the volume(s) or filesystems in the attached
disks are labelled (or use an ISO volume name) so that you can mount them by
label in your run-scripts:

 mkdir /tmp/mount
 mount LABEL=EXTRA /tmp/mount

You can have multiple I<--attach> options, and the format can be any disk
format (not just an ISO).

=item B<--attach-format> FORMAT

Specify the disk format for the next I<--attach> option.  The C<FORMAT> is
usually C<raw> or C<qcow2>.  Use C<raw> for ISOs.

=item B<--colors>

=item B<--colours>

Use ANSI colour sequences to colourize messages.  This is the default when
the output is a tty.  If the output of the program is redirected to a file,
ANSI colour sequences are disabled unless you use this option.

=item B<-c> URI

=item B<--connect> URI

libvirt を使用していると、指定された I<URI> に接続します。  省略すると、デフォルトの libvirt ハイパーバイザーに接続します。

ゲストのブロックデバイスを直接指定していると((I<-a>))、libvirt は何も使用されません。

=item B<-d> guest

=item B<--domain> guest

名前付きの libvirt 仮想マシンからすべてのディスクを追加します。  名前の代わりに仮想マシンの UUID を使用できます。

=item B<-n>

=item B<--dry-run>

Perform a read-only "dry run" on the guest.  This runs the sysprep
operation, but throws away any changes to the disk at the end.

=item B<--echo-keys>

When prompting for keys and passphrases, virt-customize normally turns
echoing off so you cannot see what you are typing.  If you are not worried
about Tempest attacks and there is no one else in the room you can specify
this flag to see what you are typing.

=item B<--format> raw|qcow2|..

=item B<--format> auto

The default for the I<-a> option is to auto-detect the format of the disk
image.  Using this forces the disk format for I<-a> options which follow on
the command line.  Using I<--format auto> switches back to auto-detection
for subsequent I<-a> options.

例:

 virt-customize --format raw -a disk.img

forces raw format (no auto-detection) for F<disk.img>.

 virt-customize --format raw -a disk.img --format auto -a another.img

forces raw format (no auto-detection) for F<disk.img> and reverts to
auto-detection for F<another.img>.

仮想マシンのディスクイメージが信頼できない raw 形式である場合、 ディスク形式を指定するためにこのオプションを使用すべきです。
これにより、悪意のある仮想マシンにより起こり得る セキュリティ問題を回避できます (CVE-2010-3851)。

=item B<--key> SELECTOR

Specify a key for LUKS, to automatically open a LUKS device when using the
inspection.  C<SELECTOR> can be in one of the following formats:

=over 4

=item B<--key> C<DEVICE>:key:KEY_STRING

Use the specified C<KEY_STRING> as passphrase.

=item B<--key> C<DEVICE>:file:FILENAME

Read the passphrase from F<FILENAME>.

=back

=item B<--keys-from-stdin>

Read key or passphrase parameters from stdin.  The default is to try to read
passphrases from the user by opening F</dev/tty>.

=item B<-m> MB

=item B<--memsize> MB

Change the amount of memory allocated to I<--run> scripts.  Increase this if
you find that I<--run> scripts or the I<--install> option are running out of
memory.

The default can be found with this command:

 guestfish get-memsize

=item B<--network>

=item B<--no-network>

Enable or disable network access from the guest during the installation.

Enabled is the default.  Use I<--no-network> to disable access.

The network only allows outgoing connections and has other minor
limitations.  See L<virt-rescue(1)/NETWORK>.

If you use I<--no-network> then certain other options such as I<--install>
will not work.

This does not affect whether the guest can access the network once it has
been booted, because that is controlled by your hypervisor or cloud
environment and has nothing to do with virt-customize.

Generally speaking you should I<not> use I<--no-network>.  But here are some
reasons why you might want to:

=over 4

=item 1.

Because the libguestfs backend that you are using doesn't support the
network.  (See: L<guestfs(3)/BACKEND>).

=item 2.

Any software you need to install comes from an attached ISO, so you don't
need the network.

=item 3.

You don’t want untrusted guest code trying to access your host network when
running virt-customize.  This is particularly an issue when you don't trust
the source of the operating system templates.  (See L</SECURITY> below).

=item 4.

You don’t have a host network (eg. in secure/restricted environments).

=back

=item B<-q>

=item B<--quiet>

Don’t print log messages.

To enable detailed logging of individual file operations, use I<-x>.

=item B<--smp> N

Enable N E<ge> 2 virtual CPUs for I<--run> scripts to use.

=item B<-v>

=item B<--verbose>

デバッグ用の冗長なメッセージを有効にします。

=item B<-V>

=item B<--version>

バージョン番号を表示して、終了します。

=item B<-x>

libguestfs API 呼び出しのトレースを有効にします。

=back

=head2 Customization options

__CUSTOMIZE_OPTIONS__

=head1 SELinux

For guests which make use of SELinux, special handling for them might be
needed when using operations which create new files or alter existing ones.

For further details, see L<virt-builder(1)/SELINUX>.

=head1 終了ステータス

このプログラムは、成功すると 0 を返します。または、エラーが起きると 1 を返します。

=head1 環境変数

=over 4

=item C<VIRT_TOOLS_DATA_DIR>

This can point to the directory containing data files used for Windows
firstboot installation.

Normally you do not need to set this.  If not set, a compiled-in default
will be used (something like F</usr/share/virt-tools>).

This directory may contain the following files:

=over 4

=item F<rhsrvany.exe>

This is the RHSrvAny Windows binary, used to install a "firstboot" script in
Windows guests.  It is required if you intend to use the I<--firstboot> or
I<--firstboot-command> options with Windows guests.

See also: C<https://github.com/rwmjones/rhsrvany>

=item F<pvvxsvc.exe>

This is a Windows binary shipped with SUSE VMDP, used to install a
"firstboot" script in Windows guests.  It is required if you intend to use
the I<--firstboot> or I<--firstboot-command> options with Windows guests.

=back

=back

他の環境変数は L<guestfs(3)/環境変数> を参照してください。

=head1 関連項目

L<guestfs(3)>, L<guestfish(1)>, L<virt-builder(1)>, L<virt-clone(1)>,
L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>,
L<virt-sysprep(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)>,
L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>.

=head1 著者

Richard W.M. Jones L<http://people.redhat.com/~rjones/>

=head1 COPYRIGHT

Copyright (C) 2011-2019 Red Hat Inc.