~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to .pc/9002-libvirt_disk_format.patch/man/en/virt-install.pod.in

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-02-01 15:40:11 UTC
  • mfrom: (1.3.16 experimental)
  • Revision ID: james.westby@ubuntu.com-20110201154011-op0nusgc240xajvb
Tags: 0.500.5-1ubuntu1
* Merge from debian experimental. Remaining changes:
  - debian/patches/9001_Ubuntu.patch:
     + Updated to add maverick and natty to OS list and enable virtio
       for them.
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch. (refreshed)
  - debian/control: added acl package to depends.
  - Demote virt-viewer to Suggests, as it's in universe.
  - Recommends libvirt-bin
* Removed patches:
  - debian/patches/9002-libvirt_disk_format.patch: Upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
=pod
2
 
 
3
 
=head1 NAME
4
 
 
5
 
virt-install - provision new virtual machines
6
 
 
7
 
=head1 SYNOPSIS
8
 
 
9
 
B<virt-install> [OPTION]...
10
 
 
11
 
=head1 DESCRIPTION
12
 
 
13
 
B<virt-install> is a command line tool for provisioning new virtual machines
14
 
using the C<libvirt> hypervisor management library. The tool supports both
15
 
text based & graphical installations, using serial console, SDL graphics
16
 
or a VNC client/server pair. The guest can be configured to use one or more
17
 
virtual disks, network interfaces, audio devices, and physical host devices
18
 
(USB, PCI).
19
 
 
20
 
The installation media can be held locally or remotely on NFS, HTTP, FTP
21
 
servers. In the latter case C<virt-install> will fetch the minimal files
22
 
necessary to kick off the installation process, allowing the guest
23
 
to fetch the rest of the OS distribution as needed. PXE booting, and importing
24
 
an existing disk image (thus skipping the install phase) are also supported.
25
 
 
26
 
Given suitable command line arguments, C<virt-install> is capable of running
27
 
completely unattended, with the guest 'kickstarting' itself too. This allows
28
 
for easy automation of guest installs. An interactive mode is also available
29
 
with the --prompt option, but this will only ask for the minimum required
30
 
options.
31
 
 
32
 
=head1 OPTIONS
33
 
 
34
 
Most options are not required. Minimum requirements are --name, --ram,
35
 
guest storage (--disk or --nodisks), and an install option.
36
 
 
37
 
=over 2
38
 
 
39
 
=item -h, --help
40
 
 
41
 
Show the help message and exit
42
 
 
43
 
=item  --connect=CONNECT
44
 
 
45
 
Connect to a non-default hypervisor. The default connection is chosen based
46
 
on the following rules:
47
 
 
48
 
=over 4
49
 
 
50
 
=item xen
51
 
 
52
 
If running on a host with the Xen kernel (checks against /proc/xen)
53
 
 
54
 
=item qemu:///system
55
 
 
56
 
If running on a bare metal kernel as root (needed for KVM installs)
57
 
 
58
 
=item qemu:///session
59
 
 
60
 
If running on a bare metal kernel as non-root
61
 
 
62
 
It is only necessary to provide the C<--connect> argument if this default
63
 
prioritization is incorrect, eg if wanting to use QEMU while on a Xen kernel.
64
 
 
65
 
=back
66
 
 
67
 
=back
68
 
 
69
 
=head2 General Options
70
 
 
71
 
General configuration parameters that apply to all types of guest installs.
72
 
 
73
 
=over 2
74
 
 
75
 
=item -n NAME, --name=NAME
76
 
 
77
 
Name of the new guest virtual machine instance. This must be unique amongst
78
 
all guests known to the hypervisor on the connection, including those not
79
 
currently active. To re-define an existing guest, use the C<virsh(1)> tool
80
 
to shut it down ('virsh shutdown') & delete ('virsh undefine') it prior to
81
 
running C<virt-install>.
82
 
 
83
 
=item -r MEMORY, --ram=MEMORY
84
 
 
85
 
Memory to allocate for guest instance in megabytes. If the hypervisor does
86
 
not have enough free memory, it is usual for it to automatically take memory
87
 
away from the host operating system to satisfy this allocation.
88
 
 
89
 
=item  --arch=ARCH
90
 
 
91
 
Request a non-native CPU architecture for the guest virtual machine.
92
 
If omitted, the host CPU architecture will be used in the guest.
93
 
 
94
 
=item -u UUID, --uuid=UUID
95
 
 
96
 
UUID for the guest; if none is given a random UUID will be generated. If you
97
 
specify UUID, you should use a 32-digit hexadecimal number. UUID are intended
98
 
to be unique across the entire data center, and indeed world. Bear this in
99
 
mind if manually specifying a UUID
100
 
 
101
 
=item --vcpus=VCPUS
102
 
 
103
 
Number of virtual cpus to configure for the guest. Not all hypervisors support
104
 
SMP guests, in which case this argument will be silently ignored
105
 
 
106
 
=item --cpuset=CPUSET
107
 
 
108
 
Set which physical cpus the guest can use. C<CPUSET> is a comma separated list of numbers, which can also be specified in ranges. Example:
109
 
 
110
 
    0,2,3,5     : Use processors 0,2,3 and 5
111
 
    1-3,5,6-8   : Use processors 1,2,3,5,6,7 and 8
112
 
 
113
 
If the value 'auto' is passed, virt-install attempts to automatically determine
114
 
an optimal cpu pinning using NUMA data, if available.
115
 
 
116
 
=item --description
117
 
 
118
 
Human readable text description of the virtual machine. This will be stored
119
 
in the guests XML configuration for access by other applications.
120
 
 
121
 
=item --security type=TYPE[,label=LABEL]
122
 
 
123
 
Configure domain security driver settings. Type can be either 'static' or
124
 
'dynamic'. 'static' configuration requires a security LABEL. Specifying
125
 
LABEL without TYPE implies static configuration.
126
 
 
127
 
=back
128
 
 
129
 
 
130
 
 
131
 
 
132
 
 
133
 
=head2 Installation Method options
134
 
 
135
 
=over 2
136
 
 
137
 
=item  -c CDROM, --cdrom=CDROM
138
 
 
139
 
File or device use as a virtual CD-ROM device for fully virtualized guests.
140
 
It can be path to an ISO image, or to a CDROM device. It can also be a URL
141
 
from which to fetch/access a minimal boot ISO image. The URLs take the same
142
 
format as described for the C<--location> argument. If a cdrom has been
143
 
specified via the C<--disk> option, and neither C<--cdrom> nor any other
144
 
install option is specified, the C<--disk> cdrom is used as the install media.
145
 
 
146
 
=item  -l LOCATION, --location=LOCATION
147
 
 
148
 
Installation source for guest virtual machine kernel+initrd pair.
149
 
The C<LOCATION> can take one of the following forms:
150
 
 
151
 
=over 4
152
 
 
153
 
=item DIRECTORY
154
 
 
155
 
Path to a local directory containing an installable distribution image
156
 
 
157
 
=item nfs:host:/path or nfs://host/path
158
 
 
159
 
An NFS server location containing an installable distribution image
160
 
 
161
 
=item http://host/path
162
 
 
163
 
An HTTP server location containing an installable distribution image
164
 
 
165
 
=item ftp://host/path
166
 
 
167
 
An FTP server location containing an installable distribution image
168
 
 
169
 
=back
170
 
 
171
 
Some distro specific url samples:
172
 
 
173
 
=over 4
174
 
 
175
 
=item Fedora/Red Hat Based
176
 
 
177
 
http://download.fedoraproject.org/pub/fedora/linux/releases/10/Fedora/i386/os/
178
 
 
179
 
=item Debian/Ubuntu
180
 
 
181
 
http://ftp.us.debian.org/debian/dists/etch/main/installer-amd64/
182
 
 
183
 
=item Suse
184
 
 
185
 
http://download.opensuse.org/distribution/11.0/repo/oss/
186
 
 
187
 
=item Mandriva
188
 
 
189
 
ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2009.0/i586/
190
 
 
191
 
=back
192
 
 
193
 
=item  --pxe
194
 
 
195
 
Use the PXE boot protocol to load the initial ramdisk and kernel for starting
196
 
the guest installation process.
197
 
 
198
 
=item  --import
199
 
 
200
 
Skip the OS installation process, and build a guest around an existing
201
 
disk image. The device used for booting is the first device specified via
202
 
C<--disk> or C<--file>.
203
 
 
204
 
=item  --livecd
205
 
 
206
 
Specify that the installation media is a live CD and thus the guest
207
 
needs to be configured to boot off the CDROM device permanently. It
208
 
may be desirable to also use the C<--nodisks> flag in combination.
209
 
 
210
 
=item  -x EXTRA, --extra-args=EXTRA
211
 
 
212
 
Additional kernel command line arguments to pass to the installer when
213
 
performing a guest install from C<--location>.
214
 
 
215
 
=item  --os-type=OS_TYPE
216
 
 
217
 
Optimize the guest configuration for a type of operating system (ex. 'linux',
218
 
'windows'). This will attempt to pick the most suitable ACPI & APIC settings,
219
 
optimally supported mouse drivers, virtio, and generally accommodate other
220
 
operating system quirks.
221
 
 
222
 
By default, virt-install will attempt to auto detect this value from
223
 
the install media (currently only supported for URL installs). Autodetection
224
 
can be disabled with the special value 'none'
225
 
 
226
 
See C<--os-variant> for valid options.
227
 
 
228
 
=item --os-variant=OS_VARIANT
229
 
 
230
 
Further optimize the guest configuration for a specific operating system
231
 
variant (ex. 'fedora8', 'winxp'). This parameter is optional, and does not
232
 
require an C<--os-type> to be specified.
233
 
 
234
 
By default, virt-install will attempt to auto detect this value from
235
 
the install media (currently only supported for URL installs). Autodetection
236
 
can be disabled with the special value 'none'.
237
 
 
238
 
Valid values are:
239
 
 
240
 
::VARIANT VALUES::
241
 
 
242
 
=back
243
 
 
244
 
 
245
 
 
246
 
 
247
 
 
248
 
=head2 Storage Configuration
249
 
 
250
 
=over 2
251
 
 
252
 
=item --disk=DISKOPTS
253
 
 
254
 
Specifies media to use as storage for the guest, with various options. The
255
 
general format of a disk string is
256
 
 
257
 
    --disk opt1=val1,opt2=val2,...
258
 
 
259
 
To specify media, the command can either be:
260
 
 
261
 
    --disk /some/storage/path,opt1=val1
262
 
 
263
 
or explicitly specify one of the following arguments:
264
 
 
265
 
=over 4
266
 
 
267
 
=item B<path>
268
 
 
269
 
A path to some storage media to use, existing or not. Existing media can be
270
 
a file or block device. If installing on a remote host, the existing media
271
 
must be shared as a libvirt storage volume.
272
 
 
273
 
Specifying a non-existent path implies attempting to create the new storage,
274
 
and will require specifyng a 'size' value. If the base directory of the path
275
 
is a libvirt storage pool on the host, the new storage will be created as a
276
 
libvirt storage volume. For remote hosts, the base directory is required to be
277
 
a storage pool if using this method.
278
 
 
279
 
=item B<pool>
280
 
 
281
 
An existing libvirt storage pool name to create new storage on. Requires
282
 
specifying a 'size' value.
283
 
 
284
 
=item B<vol>
285
 
 
286
 
An existing libvirt storage volume to use. This is specified as
287
 
'poolname/volname'.
288
 
 
289
 
=back
290
 
 
291
 
Other available options:
292
 
 
293
 
=over 4
294
 
 
295
 
=item B<device>
296
 
 
297
 
Disk device type. Value can be 'cdrom', 'disk', or 'floppy'. Default is
298
 
'disk'. If a 'cdrom' is specified, and no install method is chosen, the
299
 
cdrom is used as the install media.
300
 
 
301
 
=item B<bus>
302
 
 
303
 
Disk bus type. Value can be 'ide', 'scsi', 'usb', 'virtio' or 'xen'.  The
304
 
default is hypervisor dependent since not all hypervisors support all bus
305
 
types.
306
 
 
307
 
=item B<perms>
308
 
 
309
 
Disk permissions. Value can be 'rw' (Read/Write), 'ro' (Readonly),
310
 
or 'sh' (Shared Read/Write). Default is 'rw'
311
 
 
312
 
=item B<size>
313
 
 
314
 
size (in GB) to use if creating new storage
315
 
 
316
 
=item B<sparse>
317
 
 
318
 
whether to skip fully allocating newly created storage. Value is 'true' or
319
 
'false'. Default is 'true' (do not fully allocate).
320
 
 
321
 
The initial time taken to fully-allocate the guest virtual disk (spare=false)
322
 
will be usually by balanced by faster install times inside the guest. Thus
323
 
use of this option is recommended to ensure consistently high performance
324
 
and to avoid I/O errors in the guest should the host filesystem fill up.
325
 
 
326
 
=item B<cache>
327
 
 
328
 
The cache mode to be used. The host pagecache provides cache memory.
329
 
The cache value can be 'none', 'writethrough', or 'writeback'.
330
 
'writethrough' provides read caching. 'writeback' provides
331
 
read and write caching.
332
 
 
333
 
=item B<format>
334
 
 
335
 
Image format to be used if creating managed storage. For file volumes, this
336
 
can be 'raw', 'qcow2', 'vmdk', etc. See format types in
337
 
L<http://libvirt.org/storage.html> for possible values.
338
 
 
339
 
=back
340
 
 
341
 
See the examples section for some uses. This option deprecates C<--file>,
342
 
C<--file-size>, and C<--nonsparse>.
343
 
 
344
 
=item --nodisks
345
 
 
346
 
Request a virtual machine without any local disk storage, typically used for
347
 
running 'Live CD' images or installing to network storage (iSCSI or NFS root).
348
 
 
349
 
=item -f DISKFILE, --file=DISKFILE
350
 
 
351
 
This option is deprecated in favor of C<--disk path=DISKFILE>.
352
 
 
353
 
=item -s DISKSIZE, --file-size=DISKSIZE
354
 
 
355
 
This option is deprecated in favor of C<--disk ...,size=DISKSIZE,...>
356
 
 
357
 
=item --nonsparse
358
 
 
359
 
This option is deprecated in favor of C<--disk ...,sparse=false,...>
360
 
 
361
 
=back
362
 
 
363
 
 
364
 
 
365
 
 
366
 
 
367
 
=head2 Networking Configuration
368
 
 
369
 
=over 2
370
 
 
371
 
=item -w NETWORK, --network=NETWORK,opt1=val1,opt2=val2
372
 
 
373
 
Connect the guest to the host network. The value for C<NETWORK> can take
374
 
one of 3 formats:
375
 
 
376
 
=over 4
377
 
 
378
 
=item bridge=BRIDGE
379
 
 
380
 
Connect to a bridge device in the host called C<BRIDGE>. Use this option if
381
 
the host has static networking config & the guest requires full outbound
382
 
and inbound connectivity  to/from the LAN. Also use this if live migration
383
 
will be used with this guest.
384
 
 
385
 
=item network=NAME
386
 
 
387
 
Connect to a virtual network in the host called C<NAME>. Virtual networks
388
 
can be listed, created, deleted using the C<virsh> command line tool. In
389
 
an unmodified install of C<libvirt> there is usually a virtual network
390
 
with a name of C<default>. Use a virtual network if the host has dynamic
391
 
networking (eg NetworkManager), or using wireless. The guest will be 
392
 
NATed to the LAN by whichever connection is active.
393
 
 
394
 
=item user
395
 
 
396
 
Connect to the LAN using SLIRP. Only use this if running a QEMU guest as
397
 
an unprivileged user. This provides a very limited form of NAT.
398
 
 
399
 
=back
400
 
 
401
 
If this option is omitted a single NIC will be created in the guest. If
402
 
there is a bridge device in the host with a physical interface enslaved,
403
 
that will be used for connectivity. Failing that, the virtual network
404
 
called C<default> will be used. This option can be specified multiple
405
 
times to setup more than one NIC.
406
 
 
407
 
Other available options are:
408
 
 
409
 
=over 4
410
 
 
411
 
=item B<model>
412
 
 
413
 
Network device model as seen by the guest. Value can be any nic model supported
414
 
by the hypervisor, e.g.: 'e1000', 'rtl8139', 'virtio', ...
415
 
 
416
 
=item B<mac>
417
 
 
418
 
Fixed MAC address for the guest; If this parameter is omitted, or the value
419
 
C<RANDOM> is specified a suitable address will be randomly generated. For
420
 
Xen virtual machines it is required that the first 3 pairs in the MAC address
421
 
be the sequence '00:16:3e', while for QEMU or KVM virtual machines it must
422
 
be '52:54:00'.
423
 
 
424
 
=back
425
 
 
426
 
=item --nonetworks
427
 
 
428
 
Request a virtual machine without any network interfaces.
429
 
 
430
 
=item -b BRIDGE, --bridge=BRIDGE
431
 
 
432
 
This parameter is deprecated in favour of
433
 
C<--network bridge=bridge_name>.
434
 
 
435
 
=item -m MAC, --mac=MAC
436
 
 
437
 
This parameter is deprecated in favour of C<--network NETWORK,mac=12:34...>
438
 
 
439
 
=back
440
 
 
441
 
 
442
 
 
443
 
 
444
 
 
445
 
=head2 Graphics Configuration
446
 
 
447
 
If no graphics option is specified, C<virt-install> will default to --vnc
448
 
if the DISPLAY environment variable is set, otherwise --nographics is used.
449
 
 
450
 
=over 2
451
 
 
452
 
=item  --vnc
453
 
 
454
 
Setup a virtual console in the guest and export it as a VNC server in
455
 
the host. Unless the C<--vncport> parameter is also provided, the VNC
456
 
server will run on the first free port number at 5900 or above. The
457
 
actual VNC display allocated can be obtained using the C<vncdisplay>
458
 
command to C<virsh> (or L<virt-viewer(1)> can be used which handles this
459
 
detail for the use).
460
 
 
461
 
=item  --vncport=VNCPORT
462
 
 
463
 
Request a permanent, statically assigned port number for the guest VNC
464
 
console. Use of this option is discouraged as other guests may automatically
465
 
choose to run on this port causing a clash.
466
 
 
467
 
=item --vnclisten=VNCLISTEN
468
 
 
469
 
Address to listen on for VNC connections. Default is typically 127.0.0.1
470
 
(localhost only), but some hypervisors allow changing this globally (for
471
 
example, the qemu driver default can be changed in /etc/libvirt/qemu.conf).
472
 
Use 0.0.0.0 to allow access from other machines.
473
 
 
474
 
=item  -k KEYMAP, --keymap=KEYMAP
475
 
 
476
 
Request that the virtual VNC console be configured to run with a specific
477
 
keyboard layout. If the special value 'local' is specified, virt-install
478
 
will attempt to configure to use the same keymap as the local system. A value
479
 
of 'none' specifically defers to the hypervisor. Default behavior is
480
 
hypervisor specific, but typically is the same as 'local'.
481
 
 
482
 
=item  --sdl
483
 
 
484
 
Setup a virtual console in the guest and display an SDL window in the
485
 
host to render the output. If the SDL window is closed the guest may
486
 
be unconditionally terminated.
487
 
 
488
 
=item  --nographics
489
 
 
490
 
No graphical console will be allocated for the guest. Fully virtualized guests
491
 
(Xen FV or QEmu/KVM) will need to have a text console configured on the first
492
 
serial port in the guest (this can be done via the --extra-args option). Xen
493
 
PV will set this up automatically. The command 'virsh console NAME' can be
494
 
used to connect to the serial device.
495
 
 
496
 
=item  --noautoconsole
497
 
 
498
 
Don't automatically try to connect to the guest console. The default behaviour
499
 
is to launch a VNC client to display the graphical console, or to run the
500
 
C<virsh> C<console> command to display the text console. Use of this parameter
501
 
will disable this behaviour.
502
 
 
503
 
=back
504
 
 
505
 
 
506
 
 
507
 
 
508
 
=head2 Virtualization Type options
509
 
 
510
 
Options to override the default virtualization type choices.
511
 
 
512
 
=over 2
513
 
 
514
 
=item  -v, --hvm
515
 
 
516
 
Request the use of full virtualization, if both para & full virtualization are
517
 
available on the host. This parameter may not be available if connecting to a
518
 
Xen hypervisor on a machine without hardware virtualization support. This
519
 
parameter is implied if connecting to a QEMU based hypervisor.
520
 
 
521
 
=item  -p, --paravirt
522
 
 
523
 
This guest should be a paravirtualized guest. If the host supports both
524
 
para & full virtualization, and neither this parameter nor the C<--hvm>
525
 
are specified, this will be assumed.
526
 
 
527
 
=item --virt-type
528
 
 
529
 
The hypervisor to install on. Example choices are kvm, qemu, xen, or kqemu.
530
 
Availabile options are listed via 'virsh capabilities' in the <domain> tags.
531
 
 
532
 
=item  --accelerate
533
 
 
534
 
Prefer KVM or KQEMU (in that order) if installing a QEMU guest. This behavior
535
 
is now the default, and this option is deprecated. To install a plain QEMU
536
 
guest, use '--virt-type qemu'
537
 
 
538
 
=item  --noapic
539
 
 
540
 
Override the OS type / variant to disables the APIC setting for fully
541
 
virtualized guest.
542
 
 
543
 
=item  --noacpi
544
 
 
545
 
Override the OS type / variant to disables the ACPI setting for fully
546
 
virtualized guest.
547
 
 
548
 
=back
549
 
 
550
 
 
551
 
 
552
 
 
553
 
 
554
 
=head2 Device Options
555
 
 
556
 
=over 2
557
 
 
558
 
=item --host-device=HOSTDEV
559
 
 
560
 
Attach a physical host device to the guest. Some example values for HOSTDEV:
561
 
 
562
 
=over 2
563
 
 
564
 
=item B<--host-device pci_0000_00_1b_0>
565
 
 
566
 
A node device name via libvirt, as shown by 'virsh nodedev-list'
567
 
 
568
 
=item B<--host-device 001.003>
569
 
 
570
 
USB by bus, device (via lsusb).
571
 
 
572
 
=item B<--host-device 0x1234:0x5678>
573
 
 
574
 
USB by vendor, product (via lsusb).
575
 
 
576
 
=item B<--host-device 1f.01.02>
577
 
 
578
 
PCI device (via lspci).
579
 
 
580
 
=back
581
 
 
582
 
=item --soundhw MODEL
583
 
 
584
 
Attach a virtual audio device to the guest. MODEL specifies the emulated
585
 
sound card model. Possible values are ac97, es1370, sb16, pcspk, or default.
586
 
'default' willl be AC97 if the hypervisor supports it, otherwise it will be
587
 
ES1370.
588
 
 
589
 
This deprecates the old boolean --sound model (which still works the same
590
 
as a single '--soundhw default')
591
 
 
592
 
=item --watchdog MODEL[,action=ACTION]
593
 
 
594
 
Attach a virtual hardware watchdog device to the guest. This requires a
595
 
daemon and device driver in the guest. The watchdog fires a signal when
596
 
the virtual machine appears to hung. ACTION specifies what libvirt will do
597
 
when the watchdog fires. Values are
598
 
 
599
 
=over 4
600
 
 
601
 
=item B<reset>
602
 
 
603
 
Forcefully reset the guest (the default)
604
 
 
605
 
=item B<poweroff>
606
 
 
607
 
Forcefully power off the guest
608
 
 
609
 
=item B<pause>
610
 
 
611
 
Pause the guest
612
 
 
613
 
=item B<none>
614
 
 
615
 
Do nothing
616
 
 
617
 
=item B<shutdown>
618
 
 
619
 
Gracefully shutdown the guest (not recommended, since a hung guest probably
620
 
won't respond to a graceful shutdown)
621
 
 
622
 
=back
623
 
 
624
 
MODEL is the emulated device model: either i6300esb (the default) or ib700.
625
 
Some examples:
626
 
 
627
 
Use the recommended settings:
628
 
 
629
 
--watchdog default
630
 
 
631
 
Use the i6300esb with the 'poweroff' action
632
 
 
633
 
--watchdog i6300esb,action=poweroff
634
 
 
635
 
=item --parallel=CHAROPTS
636
 
 
637
 
=item --serial=CHAROPTS
638
 
 
639
 
Specifies a serial device to attach to the guest, with various options. The
640
 
general format of a serial string is
641
 
 
642
 
    --serial type,opt1=val1,opt2=val2,...
643
 
 
644
 
--serial and --parallel devices share all the same options, unless otherwise
645
 
noted. Some of the types of character device redirection are:
646
 
 
647
 
=over 4
648
 
 
649
 
=item B<--serial pty>
650
 
 
651
 
Pseudo TTY. The allocated pty will be listed in the running guests XML
652
 
description.
653
 
 
654
 
=item B<--serial dev,path=HOSTPATH>
655
 
 
656
 
Host device. For serial devices, this could be /dev/ttyS0. For parallel
657
 
devices, this could be /dev/parport0.
658
 
 
659
 
=item B<--serial file,path=FILENAME>
660
 
 
661
 
Write output to FILENAME.
662
 
 
663
 
=item B<--serial pipe,path=PIPEPATH>
664
 
 
665
 
Named pipe (see pipe(7))
666
 
 
667
 
=item B<--serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL>
668
 
 
669
 
TCP net console. MODE is either 'bind' (wait for connections on HOST:PORT)
670
 
or 'connect' (send output to HOST:PORT), default is 'connect'. HOST defaults
671
 
to '127.0.0.1', but PORT is required. PROTOCOL can be either 'raw' or 'telnet'
672
 
(default 'raw'). If 'telnet', the port acts like a telnet server or client.
673
 
Some examples:
674
 
 
675
 
Connect to localhost, port 1234:
676
 
 
677
 
--serial tcp,host=:1234
678
 
 
679
 
Wait for connections on any address, port 4567:
680
 
 
681
 
--serial tcp,host=0.0.0.0:4567,mode=bind
682
 
 
683
 
Wait for telnet connection on localhost, port 2222. The user could then
684
 
connect interactively to this console via 'telnet localhost 2222':
685
 
 
686
 
--serial tcp,host=:2222,mode=bind,protocol=telnet
687
 
 
688
 
=item B<--serial udp,host=CONNECT_HOST:PORT,bind_port=BIND_HOST:BIND_PORT>
689
 
 
690
 
UDP net console. HOST:PORT is the destination to send output to (default
691
 
HOST is '127.0.0.1', PORT is required. BIND_HOST:PORT is the optional local
692
 
address to bind to (default BIND_HOST is 127.0.0.1, but is only set if
693
 
BIND_PORT is specified.) Some examples:
694
 
 
695
 
Send output to default syslog port (may need to edit /etc/rsyslog.conf
696
 
accordingly):
697
 
 
698
 
--serial udp,host=:514
699
 
 
700
 
Send output to remote host 192.168.10.20, port 4444 (this output can be
701
 
read on the remote host using 'nc -u -l 4444':
702
 
 
703
 
--serial udp,host=192.168.10.20:4444
704
 
 
705
 
=item B<--serial unix,path=UNIXPATH,mode=MODE>
706
 
 
707
 
Unix socket (see unix(7). MODE has similar behavior and defaults as 'tcp'.
708
 
 
709
 
=back
710
 
 
711
 
=item --video=VIDEO
712
 
 
713
 
Specify what video device model will be attached to the guest. Valid values
714
 
for VIDEO are hypervisor specific, but some options for recent kvm are
715
 
cirrus, vga, or vmvga (vmware).
716
 
 
717
 
=back
718
 
 
719
 
 
720
 
 
721
 
 
722
 
 
723
 
=head2 Miscellaneous Options
724
 
 
725
 
=over 2
726
 
 
727
 
=item --autostart
728
 
 
729
 
Set the autostart flag for a domain. This causes the domain to be started
730
 
on host boot up.
731
 
 
732
 
=item --noreboot
733
 
 
734
 
Prevent the domain from automatically rebooting after the install has
735
 
completed.
736
 
 
737
 
=item --wait=WAIT
738
 
 
739
 
Amount of time to wait (in minutes) for a VM to complete its install.
740
 
Without this option, virt-install will wait for the console to close (not
741
 
neccessarily indicating the guest has shutdown), or in the case of
742
 
--noautoconsole, simply kick off the install and exit. Any negative
743
 
value will make virt-install wait indefinitely, a value of 0 triggers the
744
 
same results as noautoconsole. If the time limit is exceeded, virt-install
745
 
simply exits, leaving the virtual machine in its current state.
746
 
 
747
 
=item --force
748
 
 
749
 
Prevent interactive prompts. If the intended prompt was a yes/no prompt, always
750
 
say yes. For any other prompts, the application will exit.
751
 
 
752
 
=item --prompt
753
 
 
754
 
Specifically enable prompting for required information. Default prompting
755
 
is off (as of virtinst 0.400.0)
756
 
 
757
 
=item --check-cpu
758
 
 
759
 
Check that the number virtual cpus requested does not exceed physical CPUs and
760
 
warn if they do.
761
 
 
762
 
=item  -d, --debug
763
 
 
764
 
Print debugging information to the terminal when running the install process.
765
 
The debugging information is also stored in C<$HOME/.virtinst/virt-install.log>
766
 
even if this parameter is omitted.
767
 
 
768
 
=back
769
 
 
770
 
=head1 EXAMPLES
771
 
 
772
 
Install a KVM guest (assuming proper host support), creating a new
773
 
storage file, virtual networking, booting from the host CDROM, using
774
 
VNC server/viewer.
775
 
 
776
 
  # virt-install \
777
 
       --connect qemu:///system \
778
 
       --name demo \
779
 
       --ram 500 \
780
 
       --disk path=/var/lib/libvirt/images/demo.img,size=5 \
781
 
       --network network=default,model=virtio \
782
 
       --vnc \
783
 
       --cdrom /dev/cdrom
784
 
 
785
 
Install a Fedora 9 plain QEMU guest, using LVM partition, virtual networking,
786
 
booting from PXE, using VNC server/viewer
787
 
 
788
 
  # virt-install \
789
 
       --connect qemu:///system \
790
 
       --name demo \
791
 
       --ram 500 \
792
 
       --disk path=/dev/HostVG/DemoVM \
793
 
       --network network=default \
794
 
       --virt-type qemu
795
 
       --vnc \
796
 
       --os-variant fedora9
797
 
 
798
 
Install a guest with a real partition, with the default QEMU hypervisor for
799
 
a different architecture using SDL graphics, using a remote kernel and initrd
800
 
pair:
801
 
 
802
 
  # virt-install \
803
 
       --connect qemu:///system \
804
 
       --name demo \
805
 
       --ram 500 \
806
 
       --disk path=/dev/hdc \
807
 
       --network bridge=eth1 \
808
 
       --arch ppc64 \
809
 
       --sdl \
810
 
       --location http://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/
811
 
 
812
 
Run a Live CD image under Xen fullyvirt, in diskless environment
813
 
 
814
 
  # virt-install \
815
 
       --hvm \
816
 
       --name demo \
817
 
       --ram 500 \
818
 
       --nodisks \
819
 
       --livecd \
820
 
       --vnc \
821
 
       --cdrom /root/fedora7live.iso
822
 
 
823
 
Install a paravirtualized Xen guest, 500 MB of RAM, a 5 GB of disk, and
824
 
Fedora Core 6 from a web server, in text-only mode, with old style --file
825
 
options:
826
 
 
827
 
  # virt-install \
828
 
       --paravirt \
829
 
       --name demo \
830
 
       --ram 500 \
831
 
       --file /var/lib/xen/images/demo.img \
832
 
       --file-size 6 \
833
 
       --nographics \
834
 
       --location http://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/
835
 
 
836
 
Create a guest from an existing disk image 'mydisk.img' using defaults for
837
 
the rest of the options.
838
 
 
839
 
  # virt-install \
840
 
       --name demo
841
 
       --ram 512
842
 
       --disk /home/user/VMs/mydisk.img
843
 
       --import
844
 
 
845
 
=head1 AUTHORS
846
 
 
847
 
Written by Daniel P. Berrange, Hugh Brock, Jeremy Katz, Cole Robinson and a
848
 
team of many other contributors. See the AUTHORS file in the source
849
 
distribution for the complete list of credits.
850
 
 
851
 
=head1 BUGS
852
 
 
853
 
Please see http://virt-manager.org/page/BugReporting
854
 
 
855
 
=head1 COPYRIGHT
856
 
 
857
 
Copyright (C) 2006-2009 Red Hat, Inc, and various contributors.
858
 
This is free software. You may redistribute copies of it under the terms of
859
 
the GNU General Public License C<http://www.gnu.org/licenses/gpl.html>. There
860
 
is NO WARRANTY, to the extent permitted by law.
861
 
 
862
 
=head1 SEE ALSO
863
 
 
864
 
C<virsh(1)>, C<virt-clone(1)>, C<virt-manager(1)>, the project website C<http://virt-manager.org>
865
 
 
866
 
=cut
867