132132.\" ========================================================================
133133.\"
134134.IX Title " VIRT-INSTALL 1"
135- .TH VIRT-INSTALL 1 "2010-04-26 " "" "Virtual Machine Install Tools"
135+ .TH VIRT-INSTALL 1 "2010-08-24 " "" "Virtual Machine Install Tools"
136136.\" For nroff, turn off justification. Always turn off hyphenation; it makes
137137.\" way too many mistakes in technical documents.
138138.if n .ad l
@@ -144,12 +144,14 @@ virt\-install \- provision new virtual machines
144144\& \fB virt-install \fR [\s- 1 OPTION\s 0 ]...
145145.SH "DESCRIPTION"
146146.IX Header " DESCRIPTION"
147- \& \fB virt-install \fR is a command line tool for provisioning new virtual machines
148- using the \f(CW \*( C` libvirt \*( C' \fR hypervisor management library. The tool supports both
149- text based & graphical installations, using serial console, \s- 1 SDL\s 0 graphics
150- or a \s- 1 VNC\s 0 client/server pair. The guest can be configured to use one or more
151- virtual disks, network interfaces, audio devices, and physical host devices
152- (\s- 1 USB\s 0 , \s- 1 PCI\s 0 ).
147+ \& \fB virt-install \fR is a command line tool for creating new \s- 1 KVM\s 0 or Xen virtual
148+ machines using the \f(CW \*( C` libvirt \*( C' \fR hypervisor management library. See the \s- 1 EXAMPLES\s 0
149+ section at the end of this document to quickly get started.
150+ .PP
151+ \& \fB virt-install \fR tool supports both text based & graphical installations,
152+ using \s- 1 VNC\s 0 or \s- 1 SDL\s 0 graphics, or a text serial console. The guest can be
153+ configured to use one or more virtual disks, network interfaces,
154+ audio devices, physical \s- 1 USB\s 0 or \s- 1 PCI\s 0 devices, among others.
153155.PP
154156The installation media can be held locally or remotely on \s- 1 NFS\s 0 , \s- 1 HTTP\s 0 , \s- 1 FTP\s 0
155157servers. In the latter case \f(CW \*( C` virt \- install \*( C' \fR will fetch the minimal files
@@ -301,7 +303,9 @@ may be desirable to also use the \f(CW\*(C`\-\-nodisks\*(C'\fR flag in combinati
301303.IP " \- x \s- 1 EXTRA\s 0 , \-\- extra\- args=EXTRA" 2
302304.IX Item " -x EXTRA, --extra-args=EXTRA"
303305Additional kernel command line arguments to pass to the installer when
304- performing a guest install from \f(CW \*( C` \-\- location \*( C' \fR .
306+ performing a guest install from \f(CW \*( C` \-\- location \*( C' \fR . One common usage is specifying
307+ an anaconda kickstart file for automated installs, such as
308+ \& \-\- extra\- args \*( L" ks=http://myserver/my.ks\*( R"
305309.IP " \-\- initrd\- inject=PATH" 2
306310.IX Item " --initrd-inject=PATH"
307311Add \s- 1 PATH\s 0 to the root of the initrd fetched with \f(CW \*( C` \-\- location \*( C' \fR . This can be
@@ -374,6 +378,9 @@ Fedora 12
374378.IP " fedora13" 4
375379.IX Item " fedora13"
376380Fedora 13
381+ .IP " fedora14" 4
382+ .IX Item " fedora14"
383+ Fedora 14
377384.IP " generic24" 4
378385.IX Item " generic24"
379386Generic 2.4.x kernel
@@ -431,6 +438,9 @@ Ubuntu 9.04 (Jaunty Jackalope)
431438.IP " ubuntukarmic" 4
432439.IX Item " ubuntukarmic"
433440Ubuntu 9.10 (Karmic Koala)
441+ .IP " ubuntulucid" 4
442+ .IX Item " ubuntulucid"
443+ Ubuntu 10.4 (Lucid Lynx)
434444.RE
435445.RS 4
436446.RE
@@ -481,13 +491,16 @@ Sun Solaris 9
481491.IP " freebsd6" 4
482492.IX Item " freebsd6"
483493.PD
484- Free \s - 1 BSD \s 0 6.x
494+ FreeBSD 6.x
485495.IP " freebsd7" 4
486496.IX Item " freebsd7"
487- Free \s- 1 BSD\s 0 7.x
497+ FreeBSD 7.x
498+ .IP " freebsd8" 4
499+ .IX Item " freebsd8"
500+ FreeBSD 8.x
488501.IP " openbsd4" 4
489502.IX Item " openbsd4"
490- Open \s - 1 BSD \s 0 4.x
503+ OpenBSD 4.x
491504.RE
492505.RS 4
493506.RE
@@ -526,6 +539,32 @@ No \s-1OS\s0 version specified (disables autodetect)
526539.RE
527540.RS 2
528541.RE
542+ .IP " \-\- boot=BOOTOPTS" 2
543+ .IX Item " --boot=BOOTOPTS"
544+ Optionally specify the post-install \s- 1 VM\s 0 boot configuration. This option allows
545+ specifying a boot device order, permanently booting off kernel/initrd with
546+ option kernel arguments, and enabling a \s- 1 BIOS\s 0 boot menu (requires libvirt
547+ 0.8.3 or later)
548+ .Sp
549+ \& \-\- boot can be specified in addition to other install options
550+ (such as \-\- location, \-\- cdrom, etc.) or can be specified on it's own. In
551+ the latter case, behavior is similar to the \-\- import install option: there
552+ is no 'install' phase, the guest is just created and launched as specified.
553+ .Sp
554+ Some examples:
555+ .RS 2
556+ .IP " \fB \-\- boot cdrom,fd,hd,network,menu=on \fR " 2
557+ .IX Item " --boot cdrom,fd,hd,network,menu=on"
558+ Set the boot device priority as first cdrom, first floppy, first harddisk,
559+ network \s- 1 PXE\s 0 boot. Additionally enable \s- 1 BIOS\s 0 boot menu prompt.
560+ .ie n .IP " \fB \-\- boot kernel=KERNEL,initrd=INITRD,kernel_args=""console=/dev/ttyS0"" \fR " 2
561+ .el .IP " \fB \-\- boot kernel=KERNEL,initrd=INITRD,kernel_args=``console=/dev/ttyS0'' \fR " 2
562+ .IX Item " --boot kernel=KERNEL,initrd=INITRD,kernel_args=console=/dev/ttyS0"
563+ Have guest permanently boot off a local kernel/initrd pair, with the
564+ specified kernel options.
565+ .RE
566+ .RS 2
567+ .RE
529568.Sh " Storage Configuration"
530569.IX Subsection " Storage Configuration"
531570.IP " \-\- disk=DISKOPTS" 2
@@ -604,7 +643,22 @@ read and write caching.
604643.IX Item " format"
605644Image format to be used if creating managed storage. For file volumes, this
606645can be 'raw', 'qcow2', 'vmdk', etc. See format types in
607- <http://libvirt.org/storage.html> for possible values.
646+ <http://libvirt.org/storage.html> for possible values. This is often
647+ mapped to the \fB driver_type \fR value as well.
648+ .Sp
649+ With libvirt 0.8.3 and later, this option should be specified if reusing
650+ and existing disk image, since libvirt does not autodetect storage format
651+ as it is a potential security issue. For example, if reusing and existing
652+ qcow2 image, you will want to specify format=qcow2, otherwise the hypervisor
653+ may not be able to read your disk image.
654+ .IP " \fB driver_name \fR " 4
655+ .IX Item " driver_name"
656+ Driver name the hypervisor should use when accessing the specified
657+ storage. Typically does not need to be set by the user.
658+ .IP " \fB driver_type \fR " 4
659+ .IX Item " driver_type"
660+ Driver format/type the hypervisor should use when accessing the specified
661+ storage. Typically does not need to be set by the user.
608662.RE
609663.RS 2
610664.Sp
@@ -901,6 +955,48 @@ Unix socket (see \fIunix\fR\|(7). \s-1MODE\s0 has similar behavior and defaults
901955.RE
902956.RS 2
903957.RE
958+ .IP " \-\- channel" 2
959+ .IX Item " --channel"
960+ Specifies a communication channel device to connect the guest and host
961+ machine. This option uses the same options as \-\- serial and \-\- parallel
962+ for specifying the host/source end of the channel. Extra 'target' options
963+ are used to specify how the guest machine sees the channel.
964+ .Sp
965+ Some of the types of character device redirection are:
966+ .RS 2
967+ .IP " \fB \-\- channel \s- 1 SOURCE\s 0 ,target_type=guestfwd,target_address=HOST:PORT\fR " 4
968+ .IX Item " --channel SOURCE,target_type=guestfwd,target_address=HOST:PORT"
969+ Communication channel using \s- 1 QEMU\s 0 usermode networking stack. The guest can
970+ connect to the channel using the specified \s- 1 HOST:PORT\s 0 combination.
971+ .IP " \fB \-\- channel \s- 1 SOURCE\s 0 ,target_type=virtio[,name=NAME]\fR " 4
972+ .IX Item " --channel SOURCE,target_type=virtio[,name=NAME]"
973+ Communication channel using virtio serial (requires 2.6.34 or later host and
974+ guest). Each instance of a virtio \-\- channel line is exposed in the
975+ guest as /dev/vport0p1, /dev/vport0p2, etc. \s- 1 NAME\s 0 is optional metadata, and
976+ can be any string, such as org.linux\- kvm.virtioport1.
977+ If specified, this will be exposed in the guest at
978+ /sys/class/virtio\- ports/vport0p1/NAME
979+ .RE
980+ .RS 2
981+ .RE
982+ .IP " \-\- console" 2
983+ .IX Item " --console"
984+ Connect a text console between the guest and host. Certain guest and
985+ hypervisor combinations can automatically set up a getty in the guest, so
986+ an out of the box text login can be provided (target_type=xen for xen
987+ paravirt guests, and possibly target_type=virtio in the future).
988+ .Sp
989+ Example:
990+ .RS 2
991+ .IP " \fB \-\- console pty,target_type=virtio \fR " 4
992+ .IX Item " --console pty,target_type=virtio"
993+ Connect a virtio console to the guest, redirected to a \s- 1 PTY\s 0 on the host.
994+ For supported guests, this exposes /dev/hvc0 in the guest. See
995+ http://fedoraproject.org/wiki/Features/VirtioSerial for more info. virtio
996+ console requires libvirt 0.8.3 or later.
997+ .RE
998+ .RS 2
999+ .RE
9041000.IP " \-\- video=VIDEO" 2
9051001.IX Item " --video=VIDEO"
9061002Specify what video device model will be attached to the guest. Valid values
@@ -944,19 +1040,20 @@ The debugging information is also stored in \f(CW\*(C`$HOME/.virtinst/virt\-inst
9441040even if this parameter is omitted.
9451041.SH "EXAMPLES"
9461042.IX Header " EXAMPLES"
947- Install a \s- 1 KVM\s 0 guest (assuming proper host support), creating a new
948- storage file, virtual networking, booting from the host \s - 1 CDROM \s 0 , using
949- \& \s- 1 VNC\s 0 server/ viewer.
1043+ Install a Fedora 13 \s- 1 KVM\s 0 guest with virtio accelerated disk/network,
1044+ creating a new 8GB storage file, installing from media in the hosts
1045+ \& \s- 1 CDROM \s 0 drive, auto launching a graphical \s - 1 VNC\s 0 viewer
9501046.PP
951- .Vb 8
1047+ .Vb 9
9521048\& # virt\- install \e
9531049\& \-\- connect qemu:///system \e
1050+ \& \-\- virt\- type kvm \e
9541051\& \-\- name demo \e
9551052\& \-\- ram 500 \e
956- \& \-\- disk path=/var/lib/libvirt/images/demo.img,size=5 \e
957- \& \-\- network network=default,model=virtio \e
1053+ \& \-\- disk path=/var/lib/libvirt/images/demo.img,size=8 \e
9581054\& \-\- vnc \e
959- \& \-\- cdrom /dev/cdrom
1055+ \& \-\- cdrom /dev/cdrom \e
1056+ \& \-\- os\- variant fedora13
9601057.Ve
9611058.PP
9621059Install a Fedora 9 plain \s- 1 QEMU\s 0 guest, using \s- 1 LVM\s 0 partition, virtual networking,
@@ -1028,6 +1125,18 @@ the rest of the options.
10281125\& \-\- disk /home/user/VMs/mydisk.img
10291126\& \-\- import
10301127.Ve
1128+ .PP
1129+ Test a custom kernel/initrd using an existing disk image, manually
1130+ specifying a serial device hooked to a \s- 1 PTY\s 0 on the host machine.
1131+ .PP
1132+ .Vb 6
1133+ \& # virt\- install \e
1134+ \& \-\- name mykernel
1135+ \& \-\- ram 512
1136+ \& \-\- disk /home/user/VMs/mydisk.img
1137+ \& \-\- boot kernel=/tmp/mykernel,initrd=/tmp/myinitrd,kernel_args="console=ttyS0"
1138+ \& \-\- serial pty
1139+ .Ve
10311140.SH "AUTHORS"
10321141.IX Header " AUTHORS"
10331142Written by Daniel P. Berrange, Hugh Brock, Jeremy Katz, Cole Robinson and a
0 commit comments