.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "VIRT-INSTALL 1" .TH VIRT-INSTALL 1 "2015-03-25" "1.0.1" "Virtual Machine Manager" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" virt\-install \- provision new virtual machines .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBvirt-install\fR [\s-1OPTION\s0]... .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBvirt-install\fR is a command line tool for creating new \s-1KVM,\s0 Xen, or Linux container guests using the \f(CW\*(C`libvirt\*(C'\fR hypervisor management library. See the \s-1EXAMPLES\s0 section at the end of this document to quickly get started. .PP \&\fBvirt-install\fR tool supports graphical installations using (for example) \&\s-1VNC\s0 or \s-1SPICE,\s0 as well as text mode installs over serial console. The guest can be configured to use one or more virtual disks, network interfaces, audio devices, physical \s-1USB\s0 or \s-1PCI\s0 devices, among others. .PP The installation media can be held locally or remotely on \s-1NFS, HTTP, FTP\s0 servers. In the latter case \f(CW\*(C`virt\-install\*(C'\fR will fetch the minimal files necessary to kick off the installation process, allowing the guest to fetch the rest of the \s-1OS\s0 distribution as needed. \s-1PXE\s0 booting, and importing an existing disk image (thus skipping the install phase) are also supported. .PP Given suitable command line arguments, \f(CW\*(C`virt\-install\*(C'\fR is capable of running completely unattended, with the guest 'kickstarting' itself too. This allows for easy automation of guest installs. .PP Many arguments have sub options, specified like opt1=foo,opt2=bar, etc. Try \&\-\-option=? to see a complete list of sub options associated with that argument, example: virt-install \-\-disk=? .SH "OPTIONS" .IX Header "OPTIONS" Most options are not required. Minimum requirements are \-\-name, \-\-memory, guest storage (\-\-disk, \-\-filesystem or \-\-nodisks), and an install option. .IP "\-h, \-\-help" 2 .IX Item "-h, --help" Show the help message and exit .IP "\-\-version" 2 .IX Item "--version" Show program's version number and exit .IP "\-\-connect=URI" 2 .IX Item "--connect=URI" Connect to a non-default hypervisor. If this isn't specified, libvirt will try and choose the most suitable default. .Sp Some valid options here are: .RS 2 .IP "qemu:///system" 4 .IX Item "qemu:///system" For creating \s-1KVM\s0 and \s-1QEMU\s0 guests to be run by the system libvirtd instance. This is the default mode that virt-manager uses, and what most \s-1KVM\s0 users want. .IP "qemu:///session" 4 .IX Item "qemu:///session" For creating \s-1KVM\s0 and \s-1QEMU\s0 guests for libvirtd running as the regular user. .IP "xen:///" 4 .IX Item "xen:///" For connecting to Xen. .IP "lxc:///" 4 .IX Item "lxc:///" For creating linux containers .RE .RS 2 .RE .SS "General Options" .IX Subsection "General Options" General configuration parameters that apply to all types of guest installs. .IP "\-n \s-1NAME,\s0 \-\-name=NAME" 2 .IX Item "-n NAME, --name=NAME" Name of the new guest virtual machine instance. This must be unique amongst all guests known to the hypervisor on the connection, including those not currently active. To re-define an existing guest, use the \f(CWvirsh(1)\fR tool to shut it down ('virsh shutdown') & delete ('virsh undefine') it prior to running \f(CW\*(C`virt\-install\*(C'\fR. .IP "\-\-memory=MEM[,OPT1=VAL][...]" 2 .IX Item "--memory=MEM[,OPT1=VAL][...]" Memory to allocate for the guest, in megabytes. Sub options are available, like 'maxmemory' and 'hugepages'. This deprecates the \-r/\-\-ram option. .Sp Use \-\-memory=? to see a list of all available sub options. Complete details at .IP "\-\-memorybacking OPT1=yes|no[,OPT2=yes|no][...]" 2 .IX Item "--memorybacking OPT1=yes|no[,OPT2=yes|no][...]" This option will influence how virtual memory pages are backed by host pages. .Sp Use \-\-memorybacking=? to see a list of all available sub options. Complete details at .IP "\-\-arch=ARCH" 2 .IX Item "--arch=ARCH" Request a non-native \s-1CPU\s0 architecture for the guest virtual machine. If omitted, the host \s-1CPU\s0 architecture will be used in the guest. .IP "\-\-machine=MACHINE" 2 .IX Item "--machine=MACHINE" The machine type to emulate. This will typically not need to be specified for Xen or \s-1KVM,\s0 but is useful for choosing machine types of more exotic architectures. .IP "\-\-metadata OPT=VAL,[...]" 2 .IX Item "--metadata OPT=VAL,[...]" Specify metadata values for the guest. Possible options include name, uuid, title, and description. This option deprecates \-u/\-\-uuid and \-\-description. .Sp Use \-\-metadata=? to see a list of all available sub options. Complete details at .IP "\-\-vcpus=VCPUS[,maxvcpus=MAX][,sockets=#][,cores=#][,threads=#][,cpuset=CPUSET]" 2 .IX Item "--vcpus=VCPUS[,maxvcpus=MAX][,sockets=#][,cores=#][,threads=#][,cpuset=CPUSET]" Number of virtual cpus to configure for the guest. If 'maxvcpus' is specified, the guest will be able to hotplug up to \s-1MAX\s0 vcpus while the guest is running, but will startup with \s-1VCPUS.\s0 .Sp \&\s-1CPU\s0 topology can additionally be specified with sockets, cores, and threads. If values are omitted, the rest will be autofilled preferring sockets over cores over threads. .Sp \&'cpuset' sets which physical cpus the guest can use. \f(CW\*(C`CPUSET\*(C'\fR is a comma separated list of numbers, which can also be specified in ranges or cpus to exclude. Example: .Sp .Vb 2 \& 0,2,3,5 : Use processors 0,2,3 and 5 \& 1\-5,^3,8 : Use processors 1,2,4,5 and 8 .Ve .Sp If the value 'auto' is passed, virt-install attempts to automatically determine an optimal cpu pinning using \s-1NUMA\s0 data, if available. .Sp Use \-\-vcpus=? to see a list of all available sub options. Complete details at .IP "\-\-numatune=NODESET,[mode=MODE]" 2 .IX Item "--numatune=NODESET,[mode=MODE]" Tune \s-1NUMA\s0 policy for the domain process. Example invocations .Sp .Vb 2 \& \-\-numatune 1,2,3,4\-7 \& \-\-numatune 1\-3,5,mode=preferred .Ve .Sp Specifies the numa nodes to allocate memory from. This has the same syntax as \f(CW\*(C`\-\-cpuset\*(C'\fR option. mode can be one of 'interleave', 'preferred', or \&'strict' (the default). See 'man 8 numactl' for information about each mode. .Sp Use \-\-numatune=? to see a list of all available sub options. Complete details at .IP "\-\-memtune=SOFT_LIMIT,[hard_limit=HARD_LIMIT,swap_hard_limit=SW_HARD_LIMIT,min_guarantee=MIN_GUARANTEE]" 2 .IX Item "--memtune=SOFT_LIMIT,[hard_limit=HARD_LIMIT,swap_hard_limit=SW_HARD_LIMIT,min_guarantee=MIN_GUARANTEE]" Tune memory policy for the domain process. Example invocations .Sp .Vb 2 \& \-\-memtune 1000 \& \-\-memtune hard_limit=100,soft_limit=60,swap_hard_limit=150,min_guarantee=80 .Ve .Sp Use \-\-memtune=? to see a list of all available sub options. Complete details at .IP "\-\-blkiotune=WEIGHT,[device_path=DEVICE_PATH,device_weight=DEVICE_WEIGHT]" 2 .IX Item "--blkiotune=WEIGHT,[device_path=DEVICE_PATH,device_weight=DEVICE_WEIGHT]" Tune blkio policy for the domain process. Example invocations .Sp .Vb 2 \& \-\-blkiotune 100 \& \-\-blkiotune weight=100,device_path=/dev/sdc,device_weight=200 .Ve .Sp Use \-\-blkiotune=? to see a list of all available sub options. Complete details at .IP "\-\-cpu MODEL[,+feature][,\-feature][,match=MATCH][,vendor=VENDOR]" 2 .IX Item "--cpu MODEL[,+feature][,-feature][,match=MATCH][,vendor=VENDOR]" Configure the \s-1CPU\s0 model and \s-1CPU\s0 features exposed to the guest. The only required value is \s-1MODEL,\s0 which is a valid \s-1CPU\s0 model as known to libvirt. .Sp Libvirt's feature policy values force, require, optional, disable, or forbid, or with the shorthand '+feature' and '\-feature', which equal 'force=feature' and 'disable=feature' respectively .Sp Some examples: .RS 2 .IP "\fB\-\-cpu core2duo,+x2apic,disable=vmx\fR" 2 .IX Item "--cpu core2duo,+x2apic,disable=vmx" Expose the core2duo \s-1CPU\s0 model, force enable x2apic, but do not expose vmx .IP "\fB\-\-cpu host\fR" 2 .IX Item "--cpu host" Expose the host CPUs configuration to the guest. This enables the guest to take advantage of many of the host CPUs features (better performance), but may cause issues if migrating the guest to a host without an identical \s-1CPU.\s0 .IP "\fB\-\-cpu host-model-only\fR" 2 .IX Item "--cpu host-model-only" Expose the nearest host \s-1CPU\s0 model configuration to the guest. It is the best \s-1CPU\s0 which can be used for a guest on any of the hosts. .RE .RS 2 .Sp Use \-\-cpu=? to see a list of all available sub options. Complete details at .RE .IP "\-\-security type=TYPE[,label=LABEL][,relabel=yes|no]" 2 .IX Item "--security type=TYPE[,label=LABEL][,relabel=yes|no]" Configure domain security driver settings. Type can be either 'static' or \&'dynamic'. 'static' configuration requires a security \s-1LABEL.\s0 Specifying \&\s-1LABEL\s0 without \s-1TYPE\s0 implies static configuration. .Sp To have libvirt automatically apply your static label, you must specify relabel=yes. Otherwise disk images must be manually labeled by the admin, including images that virt-install is asked to create. .Sp Use \-\-security=? to see a list of all available sub options. Complete details at .IP "\-\-features FEAT=on|off,..." 2 .IX Item "--features FEAT=on|off,..." Set elements in the guests \s-1XML\s0 on or off. Examples include acpi, apic, eoi, privnet, and hyperv features. Some examples: .RS 2 .IP "\fB\-\-features eoi=on\fR" 2 .IX Item "--features eoi=on" Enable \s-1APIC PV EOI\s0 .IP "\fB\-\-features hyperv_vapic=on,hyperv_spinlocks=off\fR" 2 .IX Item "--features hyperv_vapic=on,hyperv_spinlocks=off" Enable hypver \s-1VAPIC,\s0 but disable spinlocks .RE .RS 2 .Sp Use \-\-features=? to see a list of all available sub options. Complete details at .RE .IP "\-\-clock offset=OFFSET,TIMER_OPT=VAL,..." 2 .IX Item "--clock offset=OFFSET,TIMER_OPT=VAL,..." Configure the guest's \s-1XML.\s0 Some supported options: .RS 2 .IP "\fB\-\-clock offset=OFFSET\fR" 2 .IX Item "--clock offset=OFFSET" Set the clock offset, ex. 'utc' or 'localtime' .IP "\fB\-\-clock TIMER_present=no\fR" 2 .IX Item "--clock TIMER_present=no" Disable a boolean timer. \s-1TIMER\s0 here might be hpet, kvmclock, etc. .IP "\fB\-\-clock TIMER_tickpolicy=VAL\fR" 2 .IX Item "--clock TIMER_tickpolicy=VAL" Set a timer's tickpolicy value. \s-1TIMER\s0 here might be rtc, pit, etc. \s-1VAL\s0 might be catchup, delay, etc. Refer to the libvirt docs for all values. .RE .RS 2 .Sp Use \-\-clock=? to see a list of all available sub options. Complete details at .RE .IP "\-\-pm=PMOPTS" 2 .IX Item "--pm=PMOPTS" Configure guest power management features. Example suboptions include suspend_to_ram=on|off and suspend_to_disk=on|off .Sp Use \-\-pm=? to see a list of all available sub options. Complete details at .SS "Installation Method options" .IX Subsection "Installation Method options" .IP "\-\-cdrom=CDROM" 2 .IX Item "--cdrom=CDROM" File or device use as a virtual CD-ROM device for fully virtualized guests. It can be path to an \s-1ISO\s0 image, or to a \s-1CDROM\s0 device. It can also be a \s-1URL\s0 from which to fetch/access a minimal boot \s-1ISO\s0 image. The URLs take the same format as described for the \f(CW\*(C`\-\-location\*(C'\fR argument. If a cdrom has been specified via the \f(CW\*(C`\-\-disk\*(C'\fR option, and neither \f(CW\*(C`\-\-cdrom\*(C'\fR nor any other install option is specified, the \f(CW\*(C`\-\-disk\*(C'\fR cdrom is used as the install media. .IP "\-l \s-1LOCATION,\s0 \-\-location=LOCATION" 2 .IX Item "-l LOCATION, --location=LOCATION" Distribution tree installation source. virt-install can recognize certain distribution trees and fetches a bootable kernel/initrd pair to launch the install. .Sp With libvirt 0.9.4 or later, network \s-1URL\s0 installs work for remote connections. virt-install will download kernel/initrd to the local machine, and then upload the media to the remote host. This option requires the \s-1URL\s0 to be accessible by both the local and remote host. .Sp \&\-\-location allows things like \-\-extra\-args for kernel arguments, and using \-\-initrd\-inject. If you want to use those options with \s-1CDROM\s0 media, you have a few options: .Sp * Run virt-install as root and do \-\-location \s-1ISO\s0 .Sp * Mount the \s-1ISO\s0 at a local directory, and do \-\-location \s-1DIRECTORY\s0 .Sp * Mount the \s-1ISO\s0 at a local directory, export that directory over local http, and do \-\-location http://localhost/DIRECTORY .Sp The \f(CW\*(C`LOCATION\*(C'\fR can take one of the following forms: .RS 2 .IP "http://host/path" 4 .IX Item "http://host/path" An \s-1HTTP\s0 server location containing an installable distribution image. .IP "ftp://host/path" 4 .IX Item "ftp://host/path" An \s-1FTP\s0 server location containing an installable distribution image. .IP "nfs:host:/path or nfs://host/path" 4 .IX Item "nfs:host:/path or nfs://host/path" An \s-1NFS\s0 server location containing an installable distribution image. This requires running virt-install as root. .IP "\s-1DIRECTORY\s0" 4 .IX Item "DIRECTORY" Path to a local directory containing an installable distribution image. Note that the directory will not be accessible by the guest after initial boot, so the \s-1OS\s0 installer will need another way to access the rest of the install media. .IP "\s-1ISO\s0" 4 .IX Item "ISO" Mount the \s-1ISO\s0 and probe the directory. This requires running virt-install as root, and has the same \s-1VM\s0 access caveat as \s-1DIRECTORY.\s0 .RE .RS 2 .Sp Some distro specific url samples: .IP "Fedora/Red Hat Based" 4 .IX Item "Fedora/Red Hat Based" http://download.fedoraproject.org/pub/fedora/linux/releases/18/Fedora/x86_64/os .IP "Debian/Ubuntu" 4 .IX Item "Debian/Ubuntu" http://ftp.us.debian.org/debian/dists/stable/main/installer\-amd64/ .IP "Suse" 4 .IX Item "Suse" http://download.opensuse.org/distribution/11.0/repo/oss/ .IP "Mandriva" 4 .IX Item "Mandriva" ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2009.0/i586/ .IP "Mageia" 4 .IX Item "Mageia" ftp://distrib\-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/1 .RE .RS 2 .RE .IP "\-\-pxe" 2 .IX Item "--pxe" Use the \s-1PXE\s0 boot protocol to load the initial ramdisk and kernel for starting the guest installation process. .IP "\-\-import" 2 .IX Item "--import" Skip the \s-1OS\s0 installation process, and build a guest around an existing disk image. The device used for booting is the first device specified via \&\f(CW\*(C`\-\-disk\*(C'\fR or \f(CW\*(C`\-\-filesystem\*(C'\fR. .IP "\-\-livecd" 2 .IX Item "--livecd" Specify that the installation media is a live \s-1CD\s0 and thus the guest needs to be configured to boot off the \s-1CDROM\s0 device permanently. It may be desirable to also use the \f(CW\*(C`\-\-nodisks\*(C'\fR flag in combination. .IP "\-x \s-1EXTRA,\s0 \-\-extra\-args=EXTRA" 2 .IX Item "-x EXTRA, --extra-args=EXTRA" Additional kernel command line arguments to pass to the installer when performing a guest install from \f(CW\*(C`\-\-location\*(C'\fR. One common usage is specifying an anaconda kickstart file for automated installs, such as \&\-\-extra\-args \*(L"ks=http://myserver/my.ks\*(R" .IP "\-\-initrd\-inject=PATH" 2 .IX Item "--initrd-inject=PATH" Add \s-1PATH\s0 to the root of the initrd fetched with \f(CW\*(C`\-\-location\*(C'\fR. This can be used to run an automated install without requiring a network hosted kickstart file: .Sp \&\-\-initrd\-inject=/path/to/my.ks \-\-extra\-args \*(L"ks=file:/my.ks\*(R" .IP "\-\-os\-variant=OS_VARIANT" 2 .IX Item "--os-variant=OS_VARIANT" Optimize the guest configuration for a specific operating system (ex. \&'fedora18', 'rhel7', 'winxp'). While not requires, specifying this options is \s-1HIGHLY RECOMMENDED,\s0 as it can greatly increase performance by specifying virtio among other guest tweaks. .Sp By default, virt-install will attempt to auto detect this value from the install media (currently only supported for \s-1URL\s0 installs). Autodetection can be disabled with the special value 'none'. .Sp If the special value 'list' is passed, virt-install will print the full list of variant values and exit. The printed format is not a stable interface, \s-1DO NOT PARSE IT.\s0 .Sp Use '\-\-os\-variant list' to see the full \s-1OS\s0 list .IP "\-\-boot=BOOTOPTS" 2 .IX Item "--boot=BOOTOPTS" Optionally specify the post-install \s-1VM\s0 boot configuration. This option allows specifying a boot device order, permanently booting off kernel/initrd with option kernel arguments, and enabling a \s-1BIOS\s0 boot menu (requires libvirt 0.8.3 or later) .Sp \&\-\-boot can be specified in addition to other install options (such as \-\-location, \-\-cdrom, etc.) or can be specified on its own. In the latter case, behavior is similar to the \-\-import install option: there is no 'install' phase, the guest is just created and launched as specified. .Sp Some examples: .RS 2 .IP "\fB\-\-boot cdrom,fd,hd,network,menu=on\fR" 2 .IX Item "--boot cdrom,fd,hd,network,menu=on" Set the boot device priority as first cdrom, first floppy, first harddisk, network \s-1PXE\s0 boot. Additionally enable \s-1BIOS\s0 boot menu prompt. .ie n .IP "\fB\-\-boot kernel=KERNEL,initrd=INITRD,kernel_args=""console=/dev/ttyS0""\fR" 2 .el .IP "\fB\-\-boot kernel=KERNEL,initrd=INITRD,kernel_args=``console=/dev/ttyS0''\fR" 2 .IX Item "--boot kernel=KERNEL,initrd=INITRD,kernel_args=console=/dev/ttyS0" Have guest permanently boot off a local kernel/initrd pair, with the specified kernel options. .IP "\fB\-\-boot kernel=KERNEL,initrd=INITRD,dtb=DTB\fR" 2 .IX Item "--boot kernel=KERNEL,initrd=INITRD,dtb=DTB" Have guest permanently boot off a local kernel/initrd pair with an external device tree binary. \s-1DTB\s0 can be required for some non\-x86 configurations like \s-1ARM\s0 or \s-1PPC\s0 .IP "\fB\-\-boot loader=BIOSPATH\fR" 2 .IX Item "--boot loader=BIOSPATH" Use \s-1BIOSPATH\s0 as the virtual machine \s-1BIOS.\s0 Only valid for fully virtualized guests. .IP "\fB\-\-boot menu=on,useserial=on\fR" 2 .IX Item "--boot menu=on,useserial=on" Enable the bios boot menu, and enable sending bios text output over serial console. .IP "\fB\-\-boot init=INITPATH\fR" 2 .IX Item "--boot init=INITPATH" Path to a binary that the container guest will init. If a root \f(CW\*(C`\-\-filesystem\*(C'\fR has been specified, virt-install will default to /sbin/init, otherwise will default to /bin/sh. .RE .RS 2 .Sp Use \-\-boot=? to see a list of all available sub options. Complete details at .RE .IP "\-\-idmap=IDMAPOPTS" 2 .IX Item "--idmap=IDMAPOPTS" If the guest configuration declares a \s-1UID\s0 or \s-1GID\s0 mapping, the 'user' namespace will be enabled to apply these. A suitably configured \s-1UID/GID\s0 mapping is a pre-requisite to make containers secure, in the absence of sVirt confinement. .Sp \&\-\-idmap can be specified to enable user namespace for \s-1LXC\s0 containers .Sp Example: \-\-idmap uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10 .Sp Use \-\-idmap=? to see a list of all available sub options. Complete details at .SS "Storage Configuration" .IX Subsection "Storage Configuration" .IP "\-\-disk=DISKOPTS" 2 .IX Item "--disk=DISKOPTS" Specifies media to use as storage for the guest, with various options. The general format of a disk string is .Sp .Vb 1 \& \-\-disk opt1=val1,opt2=val2,... .Ve .Sp The simplest invocation to create a new 10G disk image and associated disk device: .Sp .Vb 1 \& \-\-disk size=10 .Ve .Sp virt-install will generate a path name, and place it in the default image location for the hypervisor. To specify media, the command can either be: .Sp .Vb 1 \& \-\-disk /some/storage/path[,opt1=val1]... .Ve .Sp or explicitly specify one of the following arguments: .RS 2 .IP "\fBpath\fR" 4 .IX Item "path" A path to some storage media to use, existing or not. Existing media can be a file or block device. .Sp Specifying a non-existent path implies attempting to create the new storage, and will require specifying a 'size' value. Even for remote hosts, virt-install will try to use libvirt storage APIs to automatically create the given path. .IP "\fBpool\fR" 4 .IX Item "pool" An existing libvirt storage pool name to create new storage on. Requires specifying a 'size' value. .IP "\fBvol\fR" 4 .IX Item "vol" An existing libvirt storage volume to use. This is specified as \&'poolname/volname'. .RE .RS 2 .Sp Other available options: .IP "\fBdevice\fR" 4 .IX Item "device" Disk device type. Value can be 'cdrom', 'disk', or 'floppy'. Default is \&'disk'. If a 'cdrom' is specified, and no install method is chosen, the cdrom is used as the install media. .IP "\fBbus\fR" 4 .IX Item "bus" Disk bus type. Value can be 'ide', 'sata', 'scsi', 'usb', 'virtio' or 'xen'. The default is hypervisor dependent since not all hypervisors support all bus types. .IP "\fBremovable\fR" 4 .IX Item "removable" Sets the removable flag (/sys/block/$dev/removable on Linux). Only used with \s-1QEMU\s0 and bus=usb. Value can be 'on' or 'off'. .IP "\fBreadonly\fR" 4 .IX Item "readonly" Set drive as readonly (takes 'on' or 'off') .IP "\fBshareable\fR" 4 .IX Item "shareable" Set drive as shareable (takes 'on' or 'off') .IP "\fBsize\fR" 4 .IX Item "size" size (in \s-1GB\s0) to use if creating new storage .IP "\fBsparse\fR" 4 .IX Item "sparse" whether to skip fully allocating newly created storage. Value is 'true' or \&'false'. Default is 'true' (do not fully allocate) unless it isn't supported by the underlying storage type. .Sp The initial time taken to fully-allocate the guest virtual disk (sparse=false) will be usually balanced by faster install times inside the guest. Thus use of this option is recommended to ensure consistently high performance and to avoid I/O errors in the guest should the host filesystem fill up. .IP "\fBbacking_store\fR" 4 .IX Item "backing_store" Path to a disk to use as the backing store for the newly created image. .IP "\fBcache\fR" 4 .IX Item "cache" The cache mode to be used. The host pagecache provides cache memory. The cache value can be 'none', 'writethrough', or 'writeback'. \&'writethrough' provides read caching. 'writeback' provides read and write caching. .IP "\fBformat\fR" 4 .IX Item "format" Disk image format. For file volumes, this can be 'raw', 'qcow2', 'vmdk', etc. See format types in for possible values. This is often mapped to the \fBdriver_type\fR value as well. .Sp If not specified when creating file images, this will default to 'qcow2'. .Sp If creating storage, this will be the format of the new image. If using an existing image, this overrides libvirt's format auto-detection. .IP "\fBdriver_name\fR" 4 .IX Item "driver_name" Driver name the hypervisor should use when accessing the specified storage. Typically does not need to be set by the user. .IP "\fBdriver_type\fR" 4 .IX Item "driver_type" Driver format/type the hypervisor should use when accessing the specified storage. Typically does not need to be set by the user. .IP "\fBio\fR" 4 .IX Item "io" Disk \s-1IO\s0 backend. Can be either \*(L"threads\*(R" or \*(L"native\*(R". .IP "\fBerror_policy\fR" 4 .IX Item "error_policy" How guest should react if a write error is encountered. Can be one of \&\*(L"stop\*(R", \*(L"ignore\*(R", or \*(L"enospace\*(R" .IP "\fBserial\fR" 4 .IX Item "serial" Serial number of the emulated disk device. This is used in linux guests to set /dev/disk/by\-id symlinks. An example serial number might be: \&\s-1WD\-WMAP9A966149\s0 .IP "\fBstartup_policy\fR" 4 .IX Item "startup_policy" It defines what to do with the disk if the source file is not accessible. See possible values in .RE .RS 2 .Sp See the examples section for some uses. This option deprecates \-f/\-\-file, \&\-s/\-\-file\-size, and \-\-nonsparse. .Sp Use \-\-disk=? to see a list of all available sub options. Complete details at .RE .IP "\-\-filesystem" 2 .IX Item "--filesystem" Specifies a directory on the host to export to the guest. The most simple invocation is: .Sp .Vb 1 \& \-\-filesystem /source/on/host,/target/point/in/guest .Ve .Sp Which will work for recent \s-1QEMU\s0 and linux guest \s-1OS\s0 or \s-1LXC\s0 containers. For \&\s-1QEMU,\s0 the target point is just a mounting hint in sysfs, so will not be automatically mounted. .Sp The following explicit options can be specified: .RS 2 .IP "\fBtype\fR" 4 .IX Item "type" The type or the source directory. Valid values are 'mount' (the default) or \&'template' for OpenVZ templates. .IP "\fBmode\fR" 4 .IX Item "mode" The access mode for the source directory from the guest \s-1OS.\s0 Only used with \&\s-1QEMU\s0 and type=mount. Valid modes are 'passthrough' (the default), 'mapped', or 'squash'. See libvirt domain \s-1XML\s0 documentation for more info. .IP "\fBsource\fR" 4 .IX Item "source" The directory on the host to share. .IP "\fBtarget\fR" 4 .IX Item "target" The mount location to use in the guest. .RE .RS 2 .Sp Use \-\-filesystem=? to see a list of all available sub options. Complete details at .RE .IP "\-\-nodisks" 2 .IX Item "--nodisks" Request a virtual machine without any local disk storage, typically used for running 'Live \s-1CD\s0' images or installing to network storage (iSCSI or \s-1NFS\s0 root). .SS "Networking Configuration" .IX Subsection "Networking Configuration" .IP "\-w \s-1NETWORK,\s0 \-\-network=NETWORK,opt1=val1,opt2=val2,..." 2 .IX Item "-w NETWORK, --network=NETWORK,opt1=val1,opt2=val2,..." Connect the guest to the host network. The value for \f(CW\*(C`NETWORK\*(C'\fR can take one of 4 formats: .RS 2 .IP "bridge=BRIDGE" 4 .IX Item "bridge=BRIDGE" Connect to a bridge device in the host called \f(CW\*(C`BRIDGE\*(C'\fR. Use this option if the host has static networking config & the guest requires full outbound and inbound connectivity to/from the \s-1LAN.\s0 Also use this if live migration will be used with this guest. .IP "network=NAME" 4 .IX Item "network=NAME" Connect to a virtual network in the host called \f(CW\*(C`NAME\*(C'\fR. Virtual networks can be listed, created, deleted using the \f(CW\*(C`virsh\*(C'\fR command line tool. In an unmodified install of \f(CW\*(C`libvirt\*(C'\fR there is usually a virtual network with a name of \f(CW\*(C`default\*(C'\fR. Use a virtual network if the host has dynamic networking (eg NetworkManager), or using wireless. The guest will be NATed to the \s-1LAN\s0 by whichever connection is active. .IP "type=direct,source=IFACE[,source_mode=MODE]" 4 .IX Item "type=direct,source=IFACE[,source_mode=MODE]" Direct connect to host interface \s-1IFACE\s0 using macvtap. .IP "user" 4 .IX Item "user" Connect to the \s-1LAN\s0 using \s-1SLIRP.\s0 Only use this if running a \s-1QEMU\s0 guest as an unprivileged user. This provides a very limited form of \s-1NAT.\s0 .RE .RS 2 .Sp If this option is omitted a single \s-1NIC\s0 will be created in the guest. If there is a bridge device in the host with a physical interface enslaved, that will be used for connectivity. Failing that, the virtual network called \f(CW\*(C`default\*(C'\fR will be used. This option can be specified multiple times to setup more than one \s-1NIC.\s0 .Sp Other available options are: .IP "\fBmodel\fR" 4 .IX Item "model" Network device model as seen by the guest. Value can be any nic model supported by the hypervisor, e.g.: 'e1000', 'rtl8139', 'virtio', ... .IP "\fBmac\fR" 4 .IX Item "mac" Fixed \s-1MAC\s0 address for the guest; If this parameter is omitted, or the value \&\f(CW\*(C`RANDOM\*(C'\fR is specified a suitable address will be randomly generated. For Xen virtual machines it is required that the first 3 pairs in the \s-1MAC\s0 address be the sequence '00:16:3e', while for \s-1QEMU\s0 or \s-1KVM\s0 virtual machines it must be '52:54:00'. .IP "\fBfilterref\fR" 4 .IX Item "filterref" Controlling firewall and network filtering in libvirt. Value can be any nwfilter defined by the \f(CW\*(C`virsh\*(C'\fR 'nwfilter' subcommands. Available filters can be listed by running 'virsh nwfilter\-list', e.g.: 'clean\-traffic', 'no\-mac\-spoofing', ... .RE .RS 2 .Sp Use \-\-network=? to see a list of all available sub options. Complete details at .Sp This option deprecates \-m/\-\-mac and \-b/\-\-bridge .RE .IP "\-\-nonetworks" 2 .IX Item "--nonetworks" Request a virtual machine without any network interfaces. .SS "Graphics Configuration" .IX Subsection "Graphics Configuration" If no graphics option is specified, \f(CW\*(C`virt\-install\*(C'\fR will try to select the appropriate graphics if the \s-1DISPLAY\s0 environment variable is set, otherwise '\-\-graphics none' is used. .IP "\-\-graphics \s-1TYPE\s0,opt1=arg1,opt2=arg2,..." 2 .IX Item "--graphics TYPE,opt1=arg1,opt2=arg2,..." Specifies the graphical display configuration. This does not configure any virtual hardware, just how the guest's graphical display can be accessed. Typically the user does not need to specify this option, virt-install will try and choose a useful default, and launch a suitable connection. .Sp General format of a graphical string is .Sp .Vb 1 \& \-\-graphics TYPE,opt1=arg1,opt2=arg2,... .Ve .Sp For example: .Sp .Vb 1 \& \-\-graphics vnc,password=foobar .Ve .Sp The supported options are: .RS 2 .IP "\fBtype\fR" 4 .IX Item "type" The display type. This is one of: .Sp vnc .Sp Setup a virtual console in the guest and export it as a \s-1VNC\s0 server in the host. Unless the \f(CW\*(C`port\*(C'\fR parameter is also provided, the \s-1VNC\s0 server will run on the first free port number at 5900 or above. The actual \s-1VNC\s0 display allocated can be obtained using the \f(CW\*(C`vncdisplay\*(C'\fR command to \f(CW\*(C`virsh\*(C'\fR (or \fIvirt\-viewer\fR\|(1) can be used which handles this detail for the use). .Sp spice .Sp Export the guest's console using the Spice protocol. Spice allows advanced features like audio and \s-1USB\s0 device streaming, as well as improved graphical performance. .Sp Using spice graphic type will work as if those arguments were given: .Sp .Vb 1 \& \-\-video qxl \-\-channel spicevmc .Ve .Sp none .Sp No graphical console will be allocated for the guest. Fully virtualized guests (Xen \s-1FV\s0 or QEmu/KVM) will need to have a text console configured on the first serial port in the guest (this can be done via the \-\-extra\-args option). Xen \&\s-1PV\s0 will set this up automatically. The command 'virsh console \s-1NAME\s0' can be used to connect to the serial device. .IP "\fBport\fR" 4 .IX Item "port" Request a permanent, statically assigned port number for the guest console. This is used by 'vnc' and 'spice' .IP "\fBtlsport\fR" 4 .IX Item "tlsport" Specify the spice tlsport. .IP "\fBlisten\fR" 4 .IX Item "listen" Address to listen on for VNC/Spice connections. Default is typically 127.0.0.1 (localhost only), but some hypervisors allow changing this globally (for example, the qemu driver default can be changed in /etc/libvirt/qemu.conf). Use 0.0.0.0 to allow access from other machines. This is use by 'vnc' and \&'spice' .IP "\fBkeymap\fR" 4 .IX Item "keymap" Request that the virtual \s-1VNC\s0 console be configured to run with a specific keyboard layout. If the special value 'local' is specified, virt-install will attempt to configure to use the same keymap as the local system. A value of 'none' specifically defers to the hypervisor. Default behavior is hypervisor specific, but typically is the same as 'local'. This is used by 'vnc' .IP "\fBpassword\fR" 4 .IX Item "password" Request a \s-1VNC\s0 password, required at connection time. Beware, this info may end up in virt-install log files, so don't use an important password. This is used by 'vnc' and 'spice' .RE .RS 2 .Sp Use \-\-graphics=? to see a list of all available sub options. Complete details at .Sp This deprecates the following options: \-\-vnc, \-\-vncport, \-\-vnclisten, \-k/\-\-keymap, \-\-sdl, \-\-nographics .RE .IP "\-\-noautoconsole" 2 .IX Item "--noautoconsole" Don't automatically try to connect to the guest console. The default behaviour is to launch \fIvirt\-viewer\fR\|(1) to display the graphical console, or to run the \&\f(CW\*(C`virsh\*(C'\fR \f(CW\*(C`console\*(C'\fR command to display the text console. Use of this parameter will disable this behaviour. .SS "Virtualization Type options" .IX Subsection "Virtualization Type options" Options to override the default virtualization type choices. .IP "\-v, \-\-hvm" 2 .IX Item "-v, --hvm" Request the use of full virtualization, if both para & full virtualization are available on the host. This parameter may not be available if connecting to a Xen hypervisor on a machine without hardware virtualization support. This parameter is implied if connecting to a \s-1QEMU\s0 based hypervisor. .IP "\-p, \-\-paravirt" 2 .IX Item "-p, --paravirt" This guest should be a paravirtualized guest. If the host supports both para & full virtualization, and neither this parameter nor the \f(CW\*(C`\-\-hvm\*(C'\fR are specified, this will be assumed. .IP "\-\-container" 2 .IX Item "--container" This guest should be a container type guest. This option is only required if the hypervisor supports other guest types as well (so for example this option is the default behavior for \s-1LXC\s0 and OpenVZ, but is provided for completeness). .IP "\-\-virt\-type" 2 .IX Item "--virt-type" The hypervisor to install on. Example choices are kvm, qemu, xen, or kqemu. Available options are listed via 'virsh capabilities' in the tags. .Sp This deprecates the \-\-accelerate option, which is now the default behavior. To install a plain \s-1QEMU\s0 guest, use '\-\-virt\-type qemu' .SS "Device Options" .IX Subsection "Device Options" .IP "\-\-controller=TYPE[,OPTS]" 2 .IX Item "--controller=TYPE[,OPTS]" Attach a controller device to the guest. \s-1TYPE\s0 is one of: \&\fBide\fR, \fBfdc\fR, \fBscsi\fR, \fBsata\fR, \fBvirtio-serial\fR, or \fBusb\fR. .Sp Controller also supports the special values \fBusb2\fR and \fBusb3\fR. .RS 2 .IP "\fBmodel\fR" 4 .IX Item "model" Controller model. These may vary according to the hypervisor and its version. Most commonly used models are e.g. \fBauto\fR, \fBvirtio-scsi\fR for the \fBscsi\fR controller, \fBehci\fR or \fBnone\fR for the \fBusb\fR controller. For full list and further details on controllers/models, see \f(CW\*(C`http://libvirt.org/formatdomain.html#elementsControllers\*(C'\fR. .IP "\fBaddress\fR" 4 .IX Item "address" Controller address, current \s-1PCI\s0 of form 'bus:domain:slot.function'. .IP "\fBindex\fR" 4 .IX Item "index" A decimal integer describing in which order the bus controller is encountered, and to reference the controller bus. .IP "\fBmaster\fR" 4 .IX Item "master" Applicable to \s-1USB\s0 companion controllers, to define the master bus startport. .RE .RS 2 .Sp Examples: .IP "\fB\-\-controller usb,model=ich9\-ehci1,address=0:0:4.0,index=0\fR" 4 .IX Item "--controller usb,model=ich9-ehci1,address=0:0:4.0,index=0" Adds a \s-1ICH9 EHCI1 USB\s0 controller on \s-1PCI\s0 address 0:0:4.0 .IP "\fB\-\-controller usb,model=ich9\-uhci2,address=0:0:4.7,index=0,master=2\fR" 4 .IX Item "--controller usb,model=ich9-uhci2,address=0:0:4.7,index=0,master=2" Adds a \s-1ICH9 UHCI2 USB\s0 companion controller for the previous master controller, ports start from port number 2. .Sp The parameter multifunction='on' will be added automatically to the proper device (if needed). This applies to all \s-1PCI\s0 devices. .RE .RS 2 .Sp Use \-\-controller=? to see a list of all available sub options. Complete details at .RE .IP "\-\-host\-device=HOSTDEV" 2 .IX Item "--host-device=HOSTDEV" Attach a physical host device to the guest. Some example values for \s-1HOSTDEV:\s0 .RS 2 .IP "\fB\-\-host\-device pci_0000_00_1b_0\fR" 2 .IX Item "--host-device pci_0000_00_1b_0" A node device name via libvirt, as shown by 'virsh nodedev\-list' .IP "\fB\-\-host\-device 001.003\fR" 2 .IX Item "--host-device 001.003" \&\s-1USB\s0 by bus, device (via lsusb). .IP "\fB\-\-host\-device 0x1234:0x5678\fR" 2 .IX Item "--host-device 0x1234:0x5678" \&\s-1USB\s0 by vendor, product (via lsusb). .IP "\fB\-\-host\-device 1f.01.02\fR" 2 .IX Item "--host-device 1f.01.02" \&\s-1PCI\s0 device (via lspci). .RE .RS 2 .Sp Use \-\-host\-device=? to see a list of all available sub options. Complete details at .RE .IP "\-\-sound \s-1MODEL\s0" 2 .IX Item "--sound MODEL" Attach a virtual audio device to the guest. \s-1MODEL\s0 specifies the emulated sound card model. Possible values are ich6, ac97, es1370, sb16, pcspk, or default. 'default' will try to pick the best model that the specified \&\s-1OS\s0 supports. .Sp This deprecates the old \-\-soundhw option. .Sp Use \-\-sound=? to see a list of all available sub options. Complete details at .IP "\-\-watchdog MODEL[,action=ACTION]" 2 .IX Item "--watchdog MODEL[,action=ACTION]" Attach a virtual hardware watchdog device to the guest. This requires a daemon and device driver in the guest. The watchdog fires a signal when the virtual machine appears to hung. \s-1ACTION\s0 specifies what libvirt will do when the watchdog fires. Values are .RS 2 .IP "\fBreset\fR" 4 .IX Item "reset" Forcefully reset the guest (the default) .IP "\fBpoweroff\fR" 4 .IX Item "poweroff" Forcefully power off the guest .IP "\fBpause\fR" 4 .IX Item "pause" Pause the guest .IP "\fBnone\fR" 4 .IX Item "none" Do nothing .IP "\fBshutdown\fR" 4 .IX Item "shutdown" Gracefully shutdown the guest (not recommended, since a hung guest probably won't respond to a graceful shutdown) .RE .RS 2 .Sp \&\s-1MODEL\s0 is the emulated device model: either i6300esb (the default) or ib700. Some examples: .Sp Use the recommended settings: .Sp \&\-\-watchdog default .Sp Use the i6300esb with the 'poweroff' action .Sp \&\-\-watchdog i6300esb,action=poweroff .Sp Use \-\-watchdog=? to see a list of all available sub options. Complete details at .RE .IP "\-\-parallel=CHAROPTS" 2 .IX Item "--parallel=CHAROPTS" .PD 0 .IP "\-\-serial=CHAROPTS" 2 .IX Item "--serial=CHAROPTS" .PD Specifies a serial device to attach to the guest, with various options. The general format of a serial string is .Sp .Vb 1 \& \-\-serial type,opt1=val1,opt2=val2,... .Ve .Sp \&\-\-serial and \-\-parallel devices share all the same options, unless otherwise noted. Some of the types of character device redirection are: .RS 2 .IP "\fB\-\-serial pty\fR" 4 .IX Item "--serial pty" Pseudo \s-1TTY.\s0 The allocated pty will be listed in the running guests \s-1XML\s0 description. .IP "\fB\-\-serial dev,path=HOSTPATH\fR" 4 .IX Item "--serial dev,path=HOSTPATH" Host device. For serial devices, this could be /dev/ttyS0. For parallel devices, this could be /dev/parport0. .IP "\fB\-\-serial file,path=FILENAME\fR" 4 .IX Item "--serial file,path=FILENAME" Write output to \s-1FILENAME.\s0 .IP "\fB\-\-serial pipe,path=PIPEPATH\fR" 4 .IX Item "--serial pipe,path=PIPEPATH" Named pipe (see \fIpipe\fR\|(7)) .IP "\fB\-\-serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL\fR" 4 .IX Item "--serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL" \&\s-1TCP\s0 net console. \s-1MODE\s0 is either 'bind' (wait for connections on \s-1HOST:PORT\s0) or 'connect' (send output to \s-1HOST:PORT\s0), default is 'bind'. \s-1HOST\s0 defaults to '127.0.0.1', but \s-1PORT\s0 is required. \s-1PROTOCOL\s0 can be either 'raw' or 'telnet' (default 'raw'). If 'telnet', the port acts like a telnet server or client. Some examples: .Sp Wait for connections on any address, port 4567: .Sp \&\-\-serial tcp,host=0.0.0.0:4567 .Sp Connect to localhost, port 1234: .Sp \&\-\-serial tcp,host=:1234,mode=connect .Sp Wait for telnet connection on localhost, port 2222. The user could then connect interactively to this console via 'telnet localhost 2222': .Sp \&\-\-serial tcp,host=:2222,mode=bind,protocol=telnet .IP "\fB\-\-serial udp,host=CONNECT_HOST:PORT,bind_host=BIND_HOST:BIND_PORT\fR" 4 .IX Item "--serial udp,host=CONNECT_HOST:PORT,bind_host=BIND_HOST:BIND_PORT" \&\s-1UDP\s0 net console. \s-1HOST:PORT\s0 is the destination to send output to (default \&\s-1HOST\s0 is '127.0.0.1', \s-1PORT\s0 is required). \s-1BIND_HOST:BIND_PORT\s0 is the optional local address to bind to (default \s-1BIND_HOST\s0 is 127.0.0.1, but is only set if \&\s-1BIND_PORT\s0 is specified). Some examples: .Sp Send output to default syslog port (may need to edit /etc/rsyslog.conf accordingly): .Sp \&\-\-serial udp,host=:514 .Sp Send output to remote host 192.168.10.20, port 4444 (this output can be read on the remote host using 'nc \-u \-l 4444'): .Sp \&\-\-serial udp,host=192.168.10.20:4444 .IP "\fB\-\-serial unix,path=UNIXPATH,mode=MODE\fR" 4 .IX Item "--serial unix,path=UNIXPATH,mode=MODE" Unix socket, see \fIunix\fR\|(7). \s-1MODE\s0 has similar behavior and defaults as \&\-\-serial tcp,mode=MODE .RE .RS 2 .Sp Use \-\-serial=? or \-\-parallel=? to see a list of all available sub options. Complete details at and .RE .IP "\-\-channel" 2 .IX Item "--channel" Specifies a communication channel device to connect the guest and host machine. This option uses the same options as \-\-serial and \-\-parallel for specifying the host/source end of the channel. Extra 'target' options are used to specify how the guest machine sees the channel. .Sp Some of the types of character device redirection are: .RS 2 .IP "\fB\-\-channel \s-1SOURCE\s0,target_type=guestfwd,target_address=HOST:PORT\fR" 4 .IX Item "--channel SOURCE,target_type=guestfwd,target_address=HOST:PORT" Communication channel using \s-1QEMU\s0 usermode networking stack. The guest can connect to the channel using the specified \s-1HOST:PORT\s0 combination. .IP "\fB\-\-channel \s-1SOURCE\s0,target_type=virtio[,name=NAME]\fR" 4 .IX Item "--channel SOURCE,target_type=virtio[,name=NAME]" Communication channel using virtio serial (requires 2.6.34 or later host and guest). Each instance of a virtio \-\-channel line is exposed in the guest as /dev/vport0p1, /dev/vport0p2, etc. \s-1NAME\s0 is optional metadata, and can be any string, such as org.linux\-kvm.virtioport1. If specified, this will be exposed in the guest at /sys/class/virtio\-ports/vport0p1/NAME .IP "\fB\-\-channel spicevmc,target_type=virtio[,name=NAME]\fR" 4 .IX Item "--channel spicevmc,target_type=virtio[,name=NAME]" Communication channel for \s-1QEMU\s0 spice agent, using virtio serial (requires 2.6.34 or later host and guest). \s-1NAME\s0 is optional metadata, and can be any string, such as the default com.redhat.spice.0 that specifies how the guest will see the channel. .RE .RS 2 .Sp Use \-\-channel=? to see a list of all available sub options. Complete details at .RE .IP "\-\-console" 2 .IX Item "--console" Connect a text console between the guest and host. Certain guest and hypervisor combinations can automatically set up a getty in the guest, so an out of the box text login can be provided (target_type=xen for xen paravirt guests, and possibly target_type=virtio in the future). .Sp Example: .RS 2 .IP "\fB\-\-console pty,target_type=virtio\fR" 4 .IX Item "--console pty,target_type=virtio" Connect a virtio console to the guest, redirected to a \s-1PTY\s0 on the host. For supported guests, this exposes /dev/hvc0 in the guest. See http://fedoraproject.org/wiki/Features/VirtioSerial for more info. virtio console requires libvirt 0.8.3 or later. .RE .RS 2 .Sp Use \-\-console=? to see a list of all available sub options. Complete details at .RE .IP "\-\-video=VIDEO" 2 .IX Item "--video=VIDEO" Specify what video device model will be attached to the guest. Valid values for \s-1VIDEO\s0 are hypervisor specific, but some options for recent kvm are cirrus, vga, qxl, or vmvga (vmware). .Sp Use \-\-video=? to see a list of all available sub options. Complete details at .IP "\-\-smartcard=MODE[,OPTS]" 2 .IX Item "--smartcard=MODE[,OPTS]" Configure a virtual smartcard device. .Sp Mode is one of \fBhost\fR, \fBhost-certificates\fR, or \fBpassthrough\fR. Additional options are: .RS 2 .IP "\fBtype\fR" 4 .IX Item "type" Character device type to connect to on the host. This is only applicable for \fBpassthrough\fR mode. .RE .RS 2 .Sp An example invocation: .IP "\fB\-\-smartcard passthrough,type=spicevmc\fR" 4 .IX Item "--smartcard passthrough,type=spicevmc" Use the smartcard channel of a \s-1SPICE\s0 graphics device to pass smartcard info to the guest .RE .RS 2 .Sp Use \-\-smartcard=? to see a list of all available sub options. Complete details at .RE .IP "\-\-redirdev=BUS[,OPTS]" 2 .IX Item "--redirdev=BUS[,OPTS]" Add a redirected device. .RS 2 .IP "\fBtype\fR" 4 .IX Item "type" The redirection type, currently supported is \fBtcp\fR or \fBspicevmc\fR. .IP "\fBserver\fR" 4 .IX Item "server" The \s-1TCP\s0 server connection details, of the form 'server:port'. .RE .RS 2 .Sp Examples of invocation: .IP "\fB\-\-redirdev usb,type=tcp,server=localhost:4000\fR" 4 .IX Item "--redirdev usb,type=tcp,server=localhost:4000" Add a \s-1USB\s0 redirected device provided by the \s-1TCP\s0 server on 'localhost' port 4000. .IP "\fB\-\-redirdev usb,type=spicevmc\fR" 4 .IX Item "--redirdev usb,type=spicevmc" Add a \s-1USB\s0 device redirected via a dedicated Spice channel. .RE .RS 2 .Sp Use \-\-redirdev=? to see a list of all available sub options. Complete details at .RE .IP "\-\-memballoon \s-1MODEL\s0" 2 .IX Item "--memballoon MODEL" Attach a virtual memory balloon device to the guest. If the memballoon device needs to be explicitly disabled, MODEL='none' is used. .Sp \&\s-1MODEL\s0 is the type of memballoon device provided. The value can be 'virtio', \&'xen' or 'none'. Some examples: .Sp Use the recommended settings: .Sp \&\-\-memballoon virtio .Sp Do not use memballoon device: .Sp \&\-\-memballoon none .Sp Use \-\-memballoon=? to see a list of all available sub options. Complete details at .IP "\-\-tpm=TYPE[,OPTS]" 2 .IX Item "--tpm=TYPE[,OPTS]" Configure a virtual \s-1TPM\s0 device. .Sp Type must be \fBpassthrough\fR. Additional options are: .RS 2 .IP "\fBmodel\fR" 4 .IX Item "model" The device model to present to the guest operating system. Model must be \fBtpm-tis\fR. .RE .RS 2 .Sp An example invocation: .IP "\fB\-\-tpm passthrough,model=tpm\-tis\fR" 4 .IX Item "--tpm passthrough,model=tpm-tis" Make the host's \s-1TPM\s0 accessible to a single guest. .IP "\fB\-\-tpm /dev/tpm\fR" 4 .IX Item "--tpm /dev/tpm" Convenience option for passing through the hosts \s-1TPM.\s0 .RE .RS 2 .Sp Use \-\-tpm=? to see a list of all available sub options. Complete details at .RE .IP "\-\-rng=TYPE[,OPTS]" 2 .IX Item "--rng=TYPE[,OPTS]" Configure a virtual \s-1RNG\s0 device. .Sp Type can be \fBrandom\fR or \fBegd\fR. .Sp If the specified type is \fBrandom\fR then these values must be specified: .RS 2 .IP "\fBbackend_device\fR" 4 .IX Item "backend_device" The device to use as a source of entropy. .RE .RS 2 .Sp Whereas, when the type is \fBegd\fR, these values must be provided: .IP "\fBbackend_host\fR" 4 .IX Item "backend_host" Specify the host of the Entropy Gathering Daemon to connect to. .IP "\fBbackend_service\fR" 4 .IX Item "backend_service" Specify the port of the Entropy Gathering Daemon to connect to. .IP "\fBbackend_type\fR" 4 .IX Item "backend_type" Specify the type of the connection: \fBtcp\fR or \fBudp\fR. .IP "\fBbackend_mode\fR" 4 .IX Item "backend_mode" Specify the mode of the connection. It is either 'bind' (wait for connections on \s-1HOST:PORT\s0) or 'connect' (send output to \s-1HOST:PORT\s0). .IP "\fBbackend_connect_host\fR" 4 .IX Item "backend_connect_host" Specify the remote host to connect to when the specified backend_type is \fBudp\fR and backend_mode is \fBbind\fR. .IP "\fBbackend_connect_service\fR" 4 .IX Item "backend_connect_service" Specify the remote service to connect to when the specified backend_type is \&\fBudp\fR and backend_mode is \fBbind\fR. .RE .RS 2 .Sp An example invocation: .IP "\fB\-\-rng egd,backend_host=localhost,backend_service=8000,backend_type=tcp\fR" 4 .IX Item "--rng egd,backend_host=localhost,backend_service=8000,backend_type=tcp" Connect to localhost to the \s-1TCP\s0 port 8000 to get entropy data. .IP "\fB\-\-rng /dev/random\fR" 4 .IX Item "--rng /dev/random" Use the /dev/random device to get entropy data, this form implicitly uses the \&\*(L"random\*(R" model. .Sp Use \-\-rng=? to see a list of all available sub options. Complete details at .RE .RS 2 .RE .IP "\-\-panic \s-1OPTS\s0" 2 .IX Item "--panic OPTS" Attach a panic notifier device to the guest. For the recommended settings, use: .Sp \&\-\-panic default .Sp Use \-\-panic=? to see a list of all available sub options. Complete details at .SS "Miscellaneous Options" .IX Subsection "Miscellaneous Options" .IP "\-\-autostart" 2 .IX Item "--autostart" Set the autostart flag for a domain. This causes the domain to be started on host boot up. .IP "\-\-print\-xml" 2 .IX Item "--print-xml" If the requested guest has no install phase (\-\-import, \-\-boot), print the generated \s-1XML\s0 instead of defining the guest. By default this \s-1WILL\s0 do storage creation (can be disabled with \-\-dry\-run). .Sp If the guest has an install phase, you will need to use \-\-print\-step to specify exactly what \s-1XML\s0 output you want. This option implies \-\-quiet. .IP "\-\-print\-step" 2 .IX Item "--print-step" Acts similarly to \-\-print\-xml, except requires specifying which install step to print \s-1XML\s0 for. Possible values are 1, 2, 3, or all. Stage 1 is typically booting from the install media, and stage 2 is typically the final guest config booting off harddisk. Stage 3 is only relevant for windows installs, which by default have a second install stage. This option implies \-\-quiet. .IP "\-\-noreboot" 2 .IX Item "--noreboot" Prevent the domain from automatically rebooting after the install has completed. .IP "\-\-wait=WAIT" 2 .IX Item "--wait=WAIT" Amount of time to wait (in minutes) for a \s-1VM\s0 to complete its install. Without this option, virt-install will wait for the console to close (not necessarily indicating the guest has shutdown), or in the case of \&\-\-noautoconsole, simply kick off the install and exit. Any negative value will make virt-install wait indefinitely, a value of 0 triggers the same results as noautoconsole. If the time limit is exceeded, virt-install simply exits, leaving the virtual machine in its current state. .IP "\-\-dry\-run" 2 .IX Item "--dry-run" Proceed through the guest creation process, but do \s-1NOT\s0 create storage devices, change host device configuration, or actually teach libvirt about the guest. virt-install may still fetch install media, since this is required to properly detect the \s-1OS\s0 to install. .IP "\-q, \-\-quiet" 2 .IX Item "-q, --quiet" Only print fatal error messages. .IP "\-d, \-\-debug" 2 .IX Item "-d, --debug" Print debugging information to the terminal when running the install process. The debugging information is also stored in \&\f(CW\*(C`~/.cache/virt\-manager/virt\-install.log\*(C'\fR even if this parameter is omitted. .SH "EXAMPLES" .IX Header "EXAMPLES" Install a Fedora 20 \s-1KVM\s0 guest with virtio accelerated disk/network, creating a new 10GB qcow2 file, installing from media in the hosts \&\s-1CDROM\s0 drive. This will use Spice graphics by default, and launch autolaunch a graphical client. .PP .Vb 8 \& # virt\-install \e \& \-\-connect qemu:///system \e \& \-\-virt\-type kvm \e \& \-\-name demo \e \& \-\-memory 500 \e \& \-\-disk size=10 \e \& \-\-cdrom /dev/cdrom \e \& \-\-os\-variant fedora13 .Ve .PP Install a Fedora 9 plain \s-1QEMU\s0 guest, using \s-1LVM\s0 partition, virtual networking, booting from \s-1PXE,\s0 using \s-1VNC\s0 server/viewer .PP .Vb 9 \& # virt\-install \e \& \-\-connect qemu:///system \e \& \-\-name demo \e \& \-\-memory 500 \e \& \-\-disk path=/dev/HostVG/DemoVM \e \& \-\-network network=default \e \& \-\-virt\-type qemu \& \-\-graphics vnc \e \& \-\-os\-variant fedora9 .Ve .PP Run a Live \s-1CD\s0 image under Xen fullyvirt, in diskless environment .PP .Vb 8 \& # virt\-install \e \& \-\-hvm \e \& \-\-name demo \e \& \-\-memory 500 \e \& \-\-nodisks \e \& \-\-livecd \e \& \-\-graphics vnc \e \& \-\-cdrom /root/fedora7live.iso .Ve .PP Run /usr/bin/httpd in a linux container guest (\s-1LXC\s0). Resource usage is capped at 512 \s-1MB\s0 of ram and 2 host cpus: .PP .Vb 6 \& # virt\-install \e \& \-\-connect lxc:/// \e \& \-\-name httpd_guest \e \& \-\-memory 512 \e \& \-\-vcpus 2 \e \& \-\-init /usr/bin/httpd .Ve .PP Start a linux container guest(\s-1LXC\s0) with a private root filesystem, using /bin/sh as init. Container's root will be under host dir /home/LXC. The host dir \*(L"/home/test\*(R" will be mounted at \&\*(L"/mnt\*(R" dir inside container: .PP .Vb 7 \& # virt\-install \e \& \-\-connect lxc:/// \e \& \-\-name container \e \& \-\-memory 128 \e \& \-\-filesystem /home/LXC,/ \e \& \-\-filesystem /home/test,/mnt \e \& \-\-init /bin/sh .Ve .PP Install a paravirtualized Xen guest, 500 \s-1MB\s0 of \s-1RAM,\s0 a 5 \s-1GB\s0 of disk, and Fedora Core 6 from a web server, in text-only mode, with old style \-\-file options: .PP .Vb 8 \& # virt\-install \e \& \-\-paravirt \e \& \-\-name demo \e \& \-\-memory 500 \e \& \-\-file /var/lib/xen/images/demo.img \e \& \-\-file\-size 6 \e \& \-\-graphics none \e \& \-\-location http://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/ .Ve .PP Create a guest from an existing disk image 'mydisk.img' using defaults for the rest of the options. .PP .Vb 5 \& # virt\-install \e \& \-\-name demo \e \& \-\-memory 512 \e \& \-\-disk /home/user/VMs/mydisk.img \e \& \-\-import .Ve .PP Start serial \s-1QEMU ARM VM,\s0 which requires specifying a manual kernel. .PP .Vb 7 \& # virt\-install \e \& \-\-name armtest \e \& \-\-memory 1024 \e \& \-\-arch armv7l \-\-machine vexpress\-a9 \e \& \-\-disk /home/user/VMs/myarmdisk.img \e \& \-\-boot kernel=/tmp/my\-arm\-kernel,initrd=/tmp/my\-arm\-initrd,dtb=/tmp/my\-arm\-dtb,kernel_args="console=ttyAMA0 rw root=/dev/mmcblk0p3" \e \& \-\-nographics .Ve .SH "BUGS" .IX Header "BUGS" Please see http://virt\-manager.org/page/BugReporting .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) Red Hat, Inc, and various contributors. This is free software. You may redistribute copies of it under the terms of the \s-1GNU\s0 General Public License \f(CW\*(C`http://www.gnu.org/licenses/gpl.html\*(C'\fR. There is \s-1NO WARRANTY,\s0 to the extent permitted by law. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\f(CWvirsh(1)\fR, \f(CW\*(C`virt\-clone(1)\*(C'\fR, \f(CW\*(C`virt\-manager(1)\*(C'\fR, the project website \f(CW\*(C`http://virt\-manager.org\*(C'\fR