.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 >0, 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 "2020-04-22" "2.2.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 local \s-1ISO\s0 or \s-1CDROM\s0 media, or a distro install tree hosted remotely over \s-1HTTP, FTP,\s0 or in a local directory. In the install tree 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. This can be done manually, or more simply with the \-\-unattended option. .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=? .PP Most options are not required. If a suitable \-\-os\-variant value is specified or detected, all defaults will be filled in and reported in the terminal output. If an \-\-os\-variant is not specified. minimum required options, \-\-memory, guest storage (\-\-disk or \-\-filesystem), and an install method choice. .SH "CONNECTING TO LIBVIRT" .IX Header "CONNECTING TO LIBVIRT" .IP "\fB\-\-connect\fR \s-1URI\s0" 4 .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 4 .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 4 .RE .SH "GENERAL OPTIONS" .IX Header "GENERAL OPTIONS" General configuration parameters that apply to all types of guest installs. .IP "\fB\-n\fR \s-1NAME\s0" 4 .IX Item "-n NAME" .PD 0 .IP "\fB\-\-name\fR \s-1NAME\s0" 4 .IX Item "--name NAME" .PD 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 "\fB\-\-memory\fR \s-1OPTIONS\s0" 4 .IX Item "--memory OPTIONS" Memory to allocate for the guest, in MiB. This deprecates the \-r/\-\-ram option. Sub options are available, like 'memory', 'currentMemory', 'maxMemory' and 'maxMemory.slots', which all map to the identically named \s-1XML\s0 values. .Sp Back compat values 'memory' maps to the element, and maxmemory maps to the element. .Sp To configure memory modules which can be hotunplugged see \fB\-\-memdev\fR description. .Sp Use \-\-memory=? to see a list of all available sub options. Complete details at .IP "\fB\-\-memorybacking\fR \s-1OPTIONS\s0" 4 .IX Item "--memorybacking OPTIONS" 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 "\fB\-\-arch\fR \s-1ARCH\s0" 4 .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 "\fB\-\-machine\fR \s-1MACHINE\s0" 4 .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 "\fB\-\-metadata\fR OPT=VAL,[...]" 4 .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 "\fB\-\-events\fR OPT=VAL,[...]" 4 .IX Item "--events OPT=VAL,[...]" Specify events values for the guest. Possible options include on_poweroff, on_reboot, and on_crash. .Sp Use \-\-events=? to see a list of all available sub options. Complete details at .IP "\fB\-\-resource\fR OPT=VAL,[...]" 4 .IX Item "--resource OPT=VAL,[...]" Specify resource partitioning for the guest. .Sp Use \-\-resource=? to see a list of all available sub options. Complete details at .IP "\fB\-\-sysinfo\fR OPT=VAL,[...]" 4 .IX Item "--sysinfo OPT=VAL,[...]" Configure sysinfo/SMBIOS values exposed to the \s-1VM OS.\s0 .Sp Some examples: .RS 4 .IP "\fB\-\-sysinfo host\fR" 4 .IX Item "--sysinfo host" Special type that exposes the host's \s-1SMBIOS\s0 info into the \s-1VM.\s0 .IP "\fB\-\-sysinfo emulate\fR" 4 .IX Item "--sysinfo emulate" Sepcial type where hypervisor will generate \s-1SMBIOS\s0 info into the \s-1VM.\s0 .IP "\fB\-\-sysinfo bios.vendor=custom\fR or \fB\-\-sysinfo smbios,bios.vendor=custom\fR" 4 .IX Item "--sysinfo bios.vendor=custom or --sysinfo smbios,bios.vendor=custom" The default type is \fBsmbios\fR and allows users to specify \s-1SMBIOS\s0 info manually. .RE .RS 4 .Sp Use \-\-sysinfo=? to see a list of all available sub options. .Sp Complete details at and for \fBsmbios\fR \s-1XML\s0 element. .RE .IP "\fB\-\-qemu\-commandline\fR \s-1ARGS\s0" 4 .IX Item "--qemu-commandline ARGS" Pass options directly to the qemu emulator. Only works for the libvirt qemu driver. The option can take a string of arguments, for example: .Sp .Vb 1 \& \-\-qemu\-commandline="\-display gtk,gl=on" .Ve .Sp Environment variables are specified with 'env', for example: .Sp .Vb 1 \& \-\-qemu\-commandline=env=DISPLAY=:0.1 .Ve .Sp Complete details about the libvirt feature: .IP "\fB\-\-vcpus\fR \s-1OPTIONS\s0" 4 .IX Item "--vcpus OPTIONS" 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 "\fB\-\-numatune\fR \s-1OPTIONS\s0" 4 .IX Item "--numatune OPTIONS" Tune \s-1NUMA\s0 policy for the domain process. Example invocations .Sp .Vb 2 \& \-\-numatune 1,2,3,4\-7 \& \-\-numatune 1\-3,5,memory.mode=preferred .Ve .Sp Specifies the numa nodes to allocate memory from. This has the same syntax as \f(CW\*(C`\-\-vcpus 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 "\fB\-\-memtune\fR \s-1OPTIONS\s0" 4 .IX Item "--memtune OPTIONS" 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 "\fB\-\-blkiotune\fR \s-1OPTIONS\s0" 4 .IX Item "--blkiotune OPTIONS" 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 "\fB\-\-cpu\fR MODEL[,+feature][,\-feature][,match=MATCH][,vendor=VENDOR],..." 4 .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 If exact \s-1CPU\s0 model is specified virt-install will automatically copy \s-1CPU\s0 features available on the host to mitigate recent \s-1CPU\s0 speculative execution side channel and Microarchitectural Store Buffer Data security vulnerabilities. This however will have some impact on performance and will break migration to hosts without security patches. In order to control this behavior there is a \fBsecure\fR parameter. Possible values are \fIon\fR and \fIoff\fR, with \fIon\fR as the default. It is highly recommended to leave this enabled and ensure all virtualization hosts have fully up to date microcode, kernel & virtualization software installed. .Sp Some examples: .RS 4 .IP "\fB\-\-cpu core2duo,+x2apic,disable=vmx\fR" 4 .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" 4 .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" 4 .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. .IP "\fB\-\-cpu numa.cell0.memory=1234,numa.cell0.cpus=0\-3,numa.cell1.memory=5678,numa.cell1.cpus=4\-7\fR" 4 .IX Item "--cpu numa.cell0.memory=1234,numa.cell0.cpus=0-3,numa.cell1.memory=5678,numa.cell1.cpus=4-7" Example of specifying two \s-1NUMA\s0 cells. This will generate \s-1XML\s0 like: .Sp .Vb 6 \& \& \& \& \& \& .Ve .IP "\fB\-\-cpu host\-passthrough,cache.mode=passthrough\fR" 4 .IX Item "--cpu host-passthrough,cache.mode=passthrough" Example of passing through the host cpu's cache information. .RE .RS 4 .Sp Use \-\-cpu=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-cputune\fR \s-1OPTIONS\s0" 4 .IX Item "--cputune OPTIONS" Tune \s-1CPU\s0 parameters for the guest. .Sp Configure which of the host's physical CPUs the domain \s-1VCPU\s0 will be pinned to. Example invocation .Sp .Vb 1 \& \-\-cputune vcpupin0.vcpu=0,vcpupin0.cpuset=0\-3,vcpupin1.vcpu=1,vcpupin1.cpuset=4\-7 .Ve .Sp Use \-\-cputune=? to see a list of all available sub options. Complete details at .IP "\fB\-\-security\fR/\fB\-\-seclabel\fR type=TYPE[,label=LABEL][,relabel=yes|no],..." 4 .IX Item "--security/--seclabel type=TYPE[,label=LABEL][,relabel=yes|no],..." Configure domain seclabel domain 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 Use \-\-security=? to see a list of all available sub options. Complete details at .IP "\fB\-\-iothreads\fR \s-1OPTIONS\s0" 4 .IX Item "--iothreads OPTIONS" Specify domain and/or \s-1XML.\s0 For example, to configure 4, do: .Sp .Vb 1 \& \-\-iothreads 4 .Ve .Sp Use \-\-iothreads=? to see a list of all available sub options. Complete details at .IP "\fB\-\-features\fR FEAT=on|off,..." 4 .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 4 .IP "\fB\-\-features apic.eoi=on\fR" 4 .IX Item "--features apic.eoi=on" Enable \s-1APIC PV EOI\s0 .IP "\fB\-\-features hyperv.vapic.state=on,hyperv.spinlocks.state=off\fR" 4 .IX Item "--features hyperv.vapic.state=on,hyperv.spinlocks.state=off" Enable hypver \s-1VAPIC,\s0 but disable spinlocks .IP "\fB\-\-features kvm.hidden.state==on\fR" 4 .IX Item "--features kvm.hidden.state==on" Allow the \s-1KVM\s0 hypervisor signature to be hidden from the guest .IP "\fB\-\-features pvspinlock=on\fR" 4 .IX Item "--features pvspinlock=on" Notify the guest that the host supports paravirtual spinlocks for example by exposing the pvticketlocks mechanism. .IP "\fB\-\-features gic.version=2\fR" 4 .IX Item "--features gic.version=2" This is relevant only for \s-1ARM\s0 architectures. Possible values are \*(L"host\*(R" or version number. .IP "\fB\-\-features smm.state=on\fR" 4 .IX Item "--features smm.state=on" This enables System Management Mode of hypervisor. Some \s-1UEFI\s0 firmwares may require this feature to be present. (\s-1QEMU\s0 supports \s-1SMM\s0 only with q35 machine type.) .RE .RS 4 .Sp Use \-\-features=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-clock\fR offset=OFFSET,TIMER_OPT=VAL,..." 4 .IX Item "--clock offset=OFFSET,TIMER_OPT=VAL,..." Configure the guest's \s-1XML.\s0 Some supported options: .RS 4 .IP "\fB\-\-clock offset=OFFSET\fR" 4 .IX Item "--clock offset=OFFSET" Set the clock offset, ex. 'utc' or 'localtime' .IP "\fB\-\-clock TIMER_present=no\fR" 4 .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" 4 .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 4 .Sp Use \-\-clock=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-pm\fR \s-1OPTIONS\s0" 4 .IX Item "--pm OPTIONS" Configure guest power management features. Example: .Sp .Vb 1 \& \-\-pm suspend_to_memi.enabled=on,suspend_to_disk.enabled=off .Ve .Sp Use \-\-pm=? to see a list of all available sub options. Complete details at .IP "\fB\-\-launch\-security\fR TYPE[,OPTS]" 4 .IX Item "--launch-security TYPE[,OPTS]" Enable launch security for the guest, e.g. \s-1AMD SEV.\s0 .Sp Use \-\-launch\-security=? to see a list of all available sub options. Complete details at . Example invocations: # This will use a default policy 0x03 # No dhCert provided, so no data can be exchanged with the \s-1SEV\s0 firmware \-\-launchSecurity sev .Sp .Vb 2 \& # Explicit policy 0x01 \- disables debugging, allows guest key sharing \& \-\-launchSecurity sev,policy=0x01 \& \& # Provide the session blob obtained from the SEV firmware \& # Provide dhCert to open a secure communication channel with SEV firmware \& \-\-launchSecurity sev,session=BASE64SESSIONSTRING,dhCert=BASE64DHCERTSTRING .Ve .Sp \&\s-1SEV\s0 has further implications on usage of virtio devices, so refer to \s-1EXAMPLES\s0 section to see a full invocation of virt-install with \-\-launchSecurity. .SH "INSTALLATION OPTIONS" .IX Header "INSTALLATION OPTIONS" .IP "\fB\-c\fR, \fB\-\-cdrom\fR \s-1PATH\s0" 4 .IX Item "-c, --cdrom PATH" \&\s-1ISO\s0 file or \s-1CDROM\s0 device to use for \s-1VM\s0 install media. After install, the the virtual \s-1CDROM\s0 device will remain attached to the \s-1VM,\s0 but with the \s-1ISO\s0 or host path media ejected. .IP "\fB\-l\fR, \fB\-\-location\fR \s-1OPTIONS\s0" 4 .IX Item "-l, --location OPTIONS" Distribution tree installation source. virt-install can recognize certain distribution trees and fetches a bootable kernel/initrd pair to launch the install. .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 can pass the \s-1ISO\s0 to \-\-location as well which works for some, but not all, \s-1CDROM\s0 media. .Sp The \f(CW\*(C`LOCATION\*(C'\fR can take one of the following forms: .RS 4 .IP "https://host/path" 4 .IX Item "https://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 "\s-1ISO\s0" 4 .IX Item "ISO" Probe the \s-1ISO\s0 and extract files using 'isoinfo' .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. .RE .RS 4 .Sp Some distro specific url samples: .IP "Fedora/Red Hat Based" 4 .IX Item "Fedora/Red Hat Based" https://download.fedoraproject.org/pub/fedora/linux/releases/29/Server/x86_64/os .IP "Debian" 4 .IX Item "Debian" https://ftp.us.debian.org/debian/dists/stable/main/installer\-amd64/ .IP "Ubuntu" 4 .IX Item "Ubuntu" https://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer\-amd64/ .IP "Suse" 4 .IX Item "Suse" https://download.opensuse.org/pub/opensuse/distribution/leap/42.3/repo/oss/ .RE .RS 4 .Sp Additionally, \-\-location can take 'kernel' and 'initrd' sub options. These paths relative to the specified location \s-1URL/ISO\s0 that allow selecting specific files for kernel/initrd within the install tree. This can be useful if virt\-install/ libosinfo doesn't know where to find the kernel in the specified \-\-location. .Sp For example, if you have an \s-1ISO\s0 that libosinfo doesn't know about called my\-unknown.iso, with a kernel at 'kernel/fookernel' and initrd at \&'kernel/fooinitrd', you can make this work with: .Sp .Vb 1 \& \-\-location my\-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd .Ve .RE .IP "\fB\-\-pxe\fR" 4 .IX Item "--pxe" Install from \s-1PXE.\s0 This just tells the \s-1VM\s0 to boot off the network for the first boot. .IP "\fB\-\-import\fR" 4 .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 "\fB\-x\fR, \fB\-\-extra\-args\fR \s-1KERNELARGS\s0" 4 .IX Item "-x, --extra-args KERNELARGS" 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=https://myserver/my.ks\*(R" .IP "\fB\-\-initrd\-inject\fR \s-1PATH\s0" 4 .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 "\fB\-\-install\fR" 4 .IX Item "--install" This is a larger entry point for various types of install operations. The command has multiple subarguments, similar to \-\-disk and friends. This option is strictly for \s-1VM\s0 install operations, essentially configuring the first boot. .Sp The simplest usage to ex: install fedora29 is: .Sp .Vb 1 \& \-\-install fedora29 .Ve .Sp And virt-install will fetch a \-\-location \s-1URL\s0 from libosinfo, and populate defaults from there. .Sp Available suboptions: .RS 4 .IP "\fBos=\fR" 4 .IX Item "os=" This is os install option described above. The explicit way to specify that would be \fB\-\-install os=fedora29\fR. os= is the default option if none is specified .IP "\fBkernel=\fR, \fBinitrd=\fR" 4 .IX Item "kernel=, initrd=" Specify a kernel and initrd pair to use as install media. They are copied into a temporary location before booting the \s-1VM,\s0 so they can be combined with \-\-initrd\-inject and your source media will not be altered. Media will be uploaded to a remote connection if required. .Sp Example case using local filesystem paths: \-\-install kernel=/path/to/kernel,initrd=/path/to/initrd .Sp Example using network paths. Kernel/initrd will be downloaded locally first, then passed to the \s-1VM\s0 as local filesystem paths \-\-install kernel=https://127.0.0.1/tree/kernel,initrd=https://127.0.0.1/tree/initrd .Sp Note, these are just for install time booting. If you want to set the kernel used for permanent \s-1VM\s0 booting, use the \fB\-\-boot\fR option. .IP "\fBkernel_args=\fR, \fBkernel_args_overwrite=yes|no\fR" 4 .IX Item "kernel_args=, kernel_args_overwrite=yes|no" Specify install time kernel arguments (libvirt \s-1XML\s0). These can be combine with ex: kernel/initrd options, or \fB\-\-location\fR media. By default, kernel_args is just like \-\-extra\-args, and will _append_ to the arguments that virt-install will try to set by default for most \&\-\-location installs. If you want to override the virt-install default, additionally specify kernel_args_overwrite=yes .IP "\fBbootdev=\fR" 4 .IX Item "bootdev=" Specify the install bootdev (hd, cdrom, floppy, network) to boot off of for the install phase. This maps to libvirt \s-1XML.\s0 .Sp If you want to install off a cdrom or network, it's probably simpler and more backwards compatible to just use \fB\-\-cdrom\fR or \fB\-\-pxe\fR, but this options gives fine grained control over the install process if needed. .IP "\fBno_install=yes|no\fR" 4 .IX Item "no_install=yes|no" Tell virt-install that there isn't actually any install happening, and you just want to create the \s-1VM.\s0 \fB\-\-import\fR is just an alias for this, as is specifying \fB\-\-boot\fR without any other install options. The deprecated \fB\-\-live\fR option is the same as \&'\-\-cdrom \f(CW$ISO\fR \-\-install no_install=yes' .RE .RS 4 .RE .IP "\fB\-\-unattended\fR [\s-1OPTIONS\s0]" 4 .IX Item "--unattended [OPTIONS]" Perform an unattended install using libosinfo's install script support. This is essentially a database of auto install scripts for various distros: Red Hat kickstarts, Debian installer scripting, Windows unattended installs, and potentially others. The simplest invocation is to combine it with \-\-install like: .Sp .Vb 1 \& \-\-install fedora29 \-\-unattended .Ve .Sp A Windows install will look like .Sp .Vb 1 \& \-\-cdrom /path/to/my/windows.iso \-\-unattended .Ve .Sp Sub options are: .RS 4 .IP "\fBprofile=\fR" 4 .IX Item "profile=" Choose which libosinfo unattended profile to use. Most distros have a 'desktop' and a 'jeos' profile. virt-install will default to 'desktop' if this is unspecified. .IP "\fBadmin\-password\-file=\fR" 4 .IX Item "admin-password-file=" A file used to set the \s-1VM OS\s0 admin/root password from. This option can be used either as \*(L"admin\-password\-file=/path/to/password\-file\*(R" or as \&\*(L"admin\-password\-file=/dev/fd/n\*(R", being n the file descriptor of the password-file. Note that only the first line of the file will be considered, including any whitespace characters and excluding new-line. .IP "\fBuser\-password\-file=\fR" 4 .IX Item "user-password-file=" A file used to set the \s-1VM\s0 user password. This option can be used either as \&\*(L"user\-password\-file=/path/to/password\-file\*(R" or as \&\*(L"user\-password\-file=/dev/fd/n\*(R", being n the file descriptor of the password-file. The username is your current host username. Note that only the first line of the file will be considered, including any whitespace characters and excluding new-line. .IP "\fBproduct\-key=\fR" 4 .IX Item "product-key=" Set a Windows product key .RE .RS 4 .RE .IP "\fB\-\-boot\fR \s-1BOOTOPTS\s0" 4 .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 4 .IP "\fB\-\-boot cdrom,fd,hd,network\fR" 4 .IX Item "--boot cdrom,fd,hd,network" Set the boot device priority as first cdrom, first floppy, first harddisk, network \s-1PXE\s0 boot. .ie n .IP "\fB\-\-boot kernel=KERNEL,initrd=INITRD,kernel_args=""console=/dev/ttyS0""\fR" 4 .el .IP "\fB\-\-boot kernel=KERNEL,initrd=INITRD,kernel_args=``console=/dev/ttyS0''\fR" 4 .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" 4 .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" 4 .IX Item "--boot loader=BIOSPATH" Use \s-1BIOSPATH\s0 as the virtual machine \s-1BIOS.\s0 .IP "\fB\-\-boot bootmenu.enable=on,bios.useserial=on\fR" 4 .IX Item "--boot bootmenu.enable=on,bios.useserial=on" Enable the bios boot menu, and enable sending bios text output over serial console. .IP "\fB\-\-boot init=INITPATH\fR" 4 .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. .IP "\fB\-\-boot uefi\fR" 4 .IX Item "--boot uefi" Configure the \s-1VM\s0 to boot from \s-1UEFI.\s0 In order for virt-install to know the correct \s-1UEFI\s0 parameters, libvirt needs to be advertising known \s-1UEFI\s0 binaries via domcapabilities \s-1XML,\s0 so this will likely only work if using properly configured distro packages. .IP "\fB\-\-boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no\fR" 4 .IX Item "--boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no" Specify that the virtual machine use the custom \s-1OVMF\s0 binary as boot firmware, mapped as a virtual flash chip. In addition, request that libvirt instantiate the VM-specific \s-1UEFI\s0 varstore from the custom \*(L"/.../OVMF_VARS.fd\*(R" varstore template. This is the recommended \s-1UEFI\s0 setup, and should be used if \&\-\-boot uefi doesn't know about your \s-1UEFI\s0 binaries. If your \s-1UEFI\s0 firmware supports Secure boot feature you can enable it via loader_secure. .RE .RS 4 .Sp Use \-\-boot=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-idmap\fR \s-1OPTIONS\s0" 4 .IX Item "--idmap OPTIONS" 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. Example: .Sp .Vb 1 \& \-\-idmap uid.start=0,uid.target=1000,uid.count=10,gid.start=0,gid.target=1000,gid.count=10 .Ve .Sp Use \-\-idmap=? to see a list of all available sub options. Complete details at .SH "GUEST OS OPTIONS" .IX Header "GUEST OS OPTIONS" .IP "\fB\-\-os\-variant\fR \s-1OS_VARIANT\s0" 4 .IX Item "--os-variant OS_VARIANT" Optimize the guest configuration for a specific operating system (ex. \&'fedora29', 'rhel7', 'win10'). While not required, 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'. Autodetection can be forced with the special value 'auto'. .Sp Use the command \*(L"osinfo-query os\*(R" to get the list of the accepted \s-1OS\s0 variants. .SH "STORAGE OPTIONS" .IX Header "STORAGE OPTIONS" .IP "\fB\-\-disk\fR \s-1OPTIONS\s0" 4 .IX Item "--disk OPTIONS" 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 4 .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. .Sp If the hypervisor supports it, \fBpath\fR can also be a network \s-1URL,\s0 like https://example.com/some\-disk.img . For network paths, they hypervisor will directly access the storage, nothing is downloaded locally. .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 4 .Sp Options that apply to storage creation: .IP "\fBsize\fR" 4 .IX Item "size" size (in GiB) to use if creating new storage .IP "\fBsparse\fR" 4 .IX Item "sparse" whether to skip fully allocating newly created storage. Value is 'yes' or \&'no'. Default is 'yes' (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=no) 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 "\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 "\fBbacking_store\fR" 4 .IX Item "backing_store" Path to a disk to use as the backing store for the newly created image. .IP "\fBbacking_format\fR" 4 .IX Item "backing_format" Disk image format of \fBbacking_store\fR .RE .RS 4 .Sp Some example device configuration suboptions: .IP "\fBdevice\fR" 4 .IX Item "device" Disk device type. Example values are be 'cdrom', 'disk', 'lun' or 'floppy'. The default is 'disk'. .IP "\fBboot.order\fR" 4 .IX Item "boot.order" Guest installation with multiple disks will need this parameter to boot correctly after being installed. A boot.order parameter will take values 1,2,3,... Devices with lower value has higher priority. This option applies to other bootable device types as well. .IP "\fBtarget.bus\fR or \fBbus\fR" 4 .IX Item "target.bus or bus" Disk bus type. Example values are be 'ide', 'sata', 'scsi', 'usb', 'virtio' or 'xen'. The default is hypervisor dependent since not all hypervisors support all bus types. .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 "\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', 'directsync', 'unsafe' or 'writeback'. \&'writethrough' provides read caching. 'writeback' provides read and write caching. 'directsync' bypasses the host page cache. 'unsafe' may cache all content and ignore flush requests from the guest. .IP "\fBdriver.discard\fR" 4 .IX Item "driver.discard" Whether discard (also known as \*(L"trim\*(R" or \*(L"unmap\*(R") requests are ignored or passed to the filesystem. The value can be either \*(L"unmap\*(R" (allow the discard request to be passed) or \*(L"ignore\*(R" (ignore the discard request). Since 1.0.6 (\s-1QEMU\s0 and \s-1KVM\s0 only) .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 "\fBdriver.io\fR" 4 .IX Item "driver.io" Disk \s-1IO\s0 backend. Can be either \*(L"threads\*(R" or \*(L"native\*(R". .IP "\fBdriver.error_policy\fR" 4 .IX Item "driver.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 "\fBsource.startupPolicy\fR" 4 .IX Item "source.startupPolicy" It defines what to do with the disk if the source file is not accessible. See possible values in , \*(L"startupPolicy\*(R" attribute of the element .IP "\fBsnapshot\fR" 4 .IX Item "snapshot" Defines default behavior of the disk during disk snapshots. See possible values in , \&\*(L"snapshot\*(R" attribute of the element. .RE .RS 4 .Sp See the examples section for some uses. This option deprecates \-f/\-\-file, \&\-s/\-\-file\-size, \-\-nonsparse, and \-\-nodisks. .Sp Use \-\-disk=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-filesystem\fR" 4 .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 Some example suboptions: .RS 4 .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 "\fBaccessmode\fR or \fBmode\fR" 4 .IX Item "accessmode or 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 4 .Sp Use \-\-filesystem=? to see a list of all available sub options. Complete details at .RE .SH "NETWORKING OPTIONS" .IX Header "NETWORKING OPTIONS" .IP "\fB\-w\fR \s-1OPTIONS\s0" 4 .IX Item "-w OPTIONS" .PD 0 .IP "\fB\-\-network\fR \s-1OPTIONS\s0" 4 .IX Item "--network OPTIONS" .PD Connect the guest to the host network. The value for \f(CW\*(C`NETWORK\*(C'\fR can take one of 4 formats: .RS 4 .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 .IP "none" 4 .IX Item "none" Tell virt-install not to add any default network interface. .RE .RS 4 .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 Some example suboptions: .IP "\fBmodel.type\fR or \fBmodel\fR" 4 .IX Item "model.type or 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.address\fR or \fBmac\fR" 4 .IX Item "mac.address or 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.filter\fR" 4 .IX Item "filterref.filter" 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', ... .IP "\fBvirtualport.*\fR options" 4 .IX Item "virtualport.* options" Configure the device virtual port profile. This is used for 802.Qbg, 802.Qbh, midonet, and openvswitch config. Check for 'virtualport' references in the libvirt documentation: \f(CW\*(C`https://libvirt.org/formatdomain.html#elementsNICS\*(C'\fR .RE .RS 4 .Sp Use \-\-network=? to see a list of all available sub options. Complete details at .Sp This option deprecates \-m/\-\-mac, \-b/\-\-bridge, and \-\-nonetworks .RE .SH "GRAPHICS OPTIONS" .IX Header "GRAPHICS OPTIONS" 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 "\fB\-\-graphics\fR \s-1TYPE\s0,opt1=arg1,opt2=arg2,..." 4 .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 Some supported options are: .RS 4 .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 \fBvirt\-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. Guests will likely need to have a text console configured on the first serial port in the guest (this can be done via the \-\-extra\-args option). 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. .Sp Use 'none' to specify that the display server should not listen on any port. The display server can be accessed only locally through libvirt unix socket (virt-viewer with \-\-attach for instance). .Sp Use 'socket' to have the \s-1VM\s0 listen on a libvirt generated unix socket path on the host filesystem. .Sp This is used by 'vnc' and 'spice' .IP "\fBpassword\fR" 4 .IX Item "password" Request a console 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' .IP "\fBgl.enable\fR" 4 .IX Item "gl.enable" Whether to use OpenGL accelerated rendering. Value is 'yes' or 'no'. This is used by 'spice'. .IP "\fBgl.rendernode\fR" 4 .IX Item "gl.rendernode" \&\s-1DRM\s0 render node path to use. This is used when 'gl' is enabled. .RE .RS 4 .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 "\fB\-\-noautoconsole\fR" 4 .IX Item "--noautoconsole" Don't automatically try to connect to the guest console. The default behaviour is to launch \fBvirt\-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. .Sp Note, virt-install exits quickly when this option is specified. If your command requested a multistep install, like \-\-cdrom or \-\-location, after the install phase is complete the \s-1VM\s0 will be shutoff, regardless of whether a reboot was requested in the \s-1VM.\s0 If you want the \s-1VM\s0 to be rebooted, virt-install must remain running. You can use '\-\-wait' to keep virt-install alive even if \-\-noautoconsole is specified. .SH "VIRTUALIZATION OPTIONS" .IX Header "VIRTUALIZATION OPTIONS" Options to override the default virtualization type choices. .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-hvm\fR" 4 .IX Item "--hvm" .PD 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 "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-paravirt\fR" 4 .IX Item "--paravirt" .PD 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 "\fB\-\-container\fR" 4 .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 "\fB\-\-virt\-type\fR" 4 .IX Item "--virt-type" The hypervisor to install on. Example choices are kvm, qemu, or xen. 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' .SH "DEVICE OPTIONS" .IX Header "DEVICE OPTIONS" All devices have a set of \fBaddress.*\fR options for configuring the particulars of the device's address on its parent controller or bus. See \f(CW\*(C`https://libvirt.org/formatdomain.html#elementsAddress\*(C'\fR for details. .IP "\fB\-\-controller\fR \s-1OPTIONS\s0" 4 .IX Item "--controller OPTIONS" 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 to specify which version of the \s-1USB\s0 controller should be used (version 2 or 3). .Sp Some example suboptions: .RS 4 .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`https://libvirt.org/formatdomain.html#elementsControllers\*(C'\fR. .IP "\fBaddress\fR" 4 .IX Item "address" Shorthand for setting a manual \s-1PCI\s0 address from an lscpi style string. The preferred method for setting this is using the address.* parameters. .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. .RE .RS 4 .Sp Use \-\-controller=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-input\fR \s-1OPTIONS\s0" 4 .IX Item "--input OPTIONS" Attach an input device to the guest. Example input device types are mouse, tablet, or keyboard. .Sp Use \-\-input=? to see a list of all available sub options. Complete details at .IP "\fB\-\-hostdev\fR \s-1OPTIONS\s0" 4 .IX Item "--hostdev OPTIONS" .PD 0 .IP "\fB\-\-host\-device\fR \s-1OPTIONS\s0" 4 .IX Item "--host-device OPTIONS" .PD Attach a physical host device to the guest. Some example values for \s-1HOSTDEV:\s0 .RS 4 .IP "\fB\-\-hostdev pci_0000_00_1b_0\fR" 4 .IX Item "--hostdev pci_0000_00_1b_0" A node device name via libvirt, as shown by 'virsh nodedev\-list' .IP "\fB\-\-hostdev 001.003\fR" 4 .IX Item "--hostdev 001.003" \&\s-1USB\s0 by bus, device (via lsusb). .IP "\fB\-\-hostdev 0x1234:0x5678\fR" 4 .IX Item "--hostdev 0x1234:0x5678" \&\s-1USB\s0 by vendor, product (via lsusb). .IP "\fB\-\-hostdev 1f.01.02\fR" 4 .IX Item "--hostdev 1f.01.02" \&\s-1PCI\s0 device (via lspci). .IP "\fB\-\-hostdev wlan0,type=net\fR" 4 .IX Item "--hostdev wlan0,type=net" Network device (in \s-1LXC\s0 container). .IP "\fB\-\-hostdev /dev/net/tun,type=misc\fR" 4 .IX Item "--hostdev /dev/net/tun,type=misc" Character device (in \s-1LXC\s0 container). .IP "\fB\-\-hostdev /dev/sdf,type=storage\fR" 4 .IX Item "--hostdev /dev/sdf,type=storage" Block device (in \s-1LXC\s0 container). .RE .RS 4 .Sp Use \-\-hostdev=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-sound\fR \s-1MODEL\s0" 4 .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, ich9, 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 "\fB\-\-watchdog\fR MODEL[,action=ACTION]" 4 .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 4 .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 4 .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 "\fB\-\-parallel\fR \s-1OPTIONS\s0" 4 .IX Item "--parallel OPTIONS" .PD 0 .IP "\fB\-\-serial\fR \s-1OPTIONS\s0" 4 .IX Item "--serial OPTIONS" .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 4 .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 tcp,host=HOST:PORT,source.mode=MODE,protocol.type=PROTOCOL\fR" 4 .IX Item "--serial tcp,host=HOST:PORT,source.mode=MODE,protocol.type=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,source.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,source.mode=bind,source.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 \fBunix\fR\|(7). \s-1MODE\s0 has similar behavior and defaults as \&\-\-serial tcp,mode=MODE .RE .RS 4 .Sp Use \-\-serial=? or \-\-parallel=? to see a list of all available sub options. Complete details at and .RE .IP "\fB\-\-channel\fR" 4 .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 4 .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[,target.name=NAME]\fR" 4 .IX Item "--channel SOURCE,target.type=virtio[,target.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[,target.name=NAME]\fR" 4 .IX Item "--channel spicevmc,target.type=virtio[,target.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 4 .Sp Use \-\-channel=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-console\fR" 4 .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 4 .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 https://fedoraproject.org/wiki/Features/VirtioSerial for more info. virtio console requires libvirt 0.8.3 or later. .RE .RS 4 .Sp Use \-\-console=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-video\fR \s-1OPTIONS\s0" 4 .IX Item "--video OPTIONS" 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, virtio, or vmvga (vmware). .Sp Use \-\-video=? to see a list of all available sub options. Complete details at .IP "\fB\-\-smartcard\fR MODE[,OPTIONS]" 4 .IX Item "--smartcard MODE[,OPTIONS]" Configure a virtual smartcard device. .Sp Mode is one of \fBhost\fR, \fBhost-certificates\fR, or \fBpassthrough\fR. Additional options are: .RS 4 .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 4 .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 4 .Sp Use \-\-smartcard=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-redirdev\fR BUS[,OPTIONS]" 4 .IX Item "--redirdev BUS[,OPTIONS]" Add a redirected device. .RS 4 .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 4 .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 4 .Sp Use \-\-redirdev=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-memballoon\fR \s-1MODEL\s0" 4 .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 "\fB\-\-tpm\fR TYPE[,OPTIONS]" 4 .IX Item "--tpm TYPE[,OPTIONS]" Configure a virtual \s-1TPM\s0 device. .Sp Type must be \fBpassthrough\fR. Additional options are: .RS 4 .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 4 .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 4 .Sp Use \-\-tpm=? to see a list of all available sub options. Complete details at .RE .IP "\fB\-\-rng\fR TYPE[,OPTIONS]" 4 .IX Item "--rng TYPE[,OPTIONS]" 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 4 .IP "\fBbackend\fR" 4 .IX Item "backend" The device to use as a source of entropy. .RE .RS 4 .Sp Whereas, when the type is \fBegd\fR, these values must be provided: .IP "\fBbackend.source.host\fR" 4 .IX Item "backend.source.host" Specify the host of the Entropy Gathering Daemon to connect to. .IP "\fBbackend.source.service\fR" 4 .IX Item "backend.source.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.source.mode\fR" 4 .IX Item "backend.source.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 4 .Sp An example invocation: .IP "\fB\-\-rng egd,backend.source.host=localhost,backend.source.service=8000,backend.type=tcp\fR" 4 .IX Item "--rng egd,backend.source.host=localhost,backend.source.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 4 .RE .IP "\fB\-\-panic\fR MODEL[,OPTS]" 4 .IX Item "--panic MODEL[,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 .IP "\fB\-\-memdev\fR \s-1OPTS\s0" 4 .IX Item "--memdev OPTS" Add a memory module to a guest which can be hotunplugged. To add a memdev you need to configure hotplugmemory and \s-1NUMA\s0 for a guest. .Sp Use \-\-memdev=? to see a list of all available sub options. Complete details at . .IP "\fB\-\-vsock\fR \s-1OPTS\s0" 4 .IX Item "--vsock OPTS" Configure a vsock host/guest interface. A typical configuration would be .Sp .Vb 1 \& \-\-vsock cid.auto=yes .Ve .Sp Use \-\-vsock=? to see a list of all available sub options. Complete details at . .SH "MISCELLANEOUS OPTIONS" .IX Header "MISCELLANEOUS OPTIONS" .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Show the help message and exit .IP "\fB\-\-version\fR" 4 .IX Item "--version" Show program's version number and exit .IP "\fB\-\-autostart\fR" 4 .IX Item "--autostart" Set the autostart flag for a domain. This causes the domain to be started on host boot up. .IP "\fB\-\-transient\fR" 4 .IX Item "--transient" Use \-\-import or \-\-boot and \-\-transient if you want a transient libvirt \&\s-1VM.\s0 These VMs exist only until the domain is shut down or the host server is restarted. Libvirt forgets the \s-1XML\s0 configuration of the \s-1VM\s0 after either of these events. Note that the \s-1VM\s0's disks will not be deleted. See: .IP "\fB\-\-destroy\-on\-exit\fR" 4 .IX Item "--destroy-on-exit" When the \s-1VM\s0 console window is exited, destroy (force poweroff) the \s-1VM.\s0 If you combine this with \-\-transient, this makes the virt-install command work similar to qemu, where the \s-1VM\s0 is shutdown when the console window is closed by the user. .IP "\fB\-\-print\-xml\fR [\s-1STEP\s0]" 4 .IX Item "--print-xml [STEP]" Print the generated \s-1XML\s0 of the guest, instead of defining it. By default this \s-1WILL\s0 do storage creation (can be disabled with \-\-dry\-run). This option implies \-\-quiet. .Sp If the \s-1VM\s0 install has multiple phases, by default this will print all generated \s-1XML.\s0 If you want to print a particular step, use \-\-print\-xml 2 (for the second phase \s-1XML\s0). .IP "\fB\-\-noreboot\fR" 4 .IX Item "--noreboot" Prevent the domain from automatically rebooting after the install has completed. .IP "\fB\-\-wait\fR \s-1WAIT\s0" 4 .IX Item "--wait WAIT" Configure how virt-install will wait for the install to complete. 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. .Sp Bare '\-\-wait' or any negative value will make virt-install wait indefinitely. Any positive number is the number of minutes virt-install will wait. If the time limit is exceeded, virt-install simply exits, leaving the virtual machine in its current state. .IP "\fB\-\-dry\-run\fR" 4 .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 "\fB\-\-check\fR" 4 .IX Item "--check" Enable or disable some validation checks. Some examples are warning about using a disk that's already assigned to another \s-1VM\s0 (\-\-check path_in_use=on|off), or warning about potentially running out of space during disk allocation (\-\-check disk_size=on|off). Most checks are performed by default. .IP "\fB\-q\fR" 4 .IX Item "-q" .PD 0 .IP "\fB\-\-quiet\fR" 4 .IX Item "--quiet" .PD Only print fatal error messages. .IP "\fB\-d\fR" 4 .IX Item "-d" .PD 0 .IP "\fB\-\-debug\fR" 4 .IX Item "--debug" .PD 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" The simplest invocation to interactively install a Fedora 29 \s-1KVM VM\s0 with recommended defaults. \fBvirt\-viewer\fR\|(1) will be launched to graphically interact with the \s-1VM\s0 install .PP .Vb 1 \& # sudo virt\-install \-\-install fedora29 .Ve .PP Similar, but use libosinfo's unattended install support, which will perform the fedora29 install automatically without user intervention: .PP .Vb 1 \& # sudo virt\-install \-\-install fedora29 \-\-unattended .Ve .PP Install a Windows 10 \s-1VM,\s0 using 40GiB storage in the default location and 4096MiB of ram, and ensure we are connecting to the system libvirtd instance: .PP .Vb 7 \& # virt\-install \e \& \-\-connect qemu:///system \e \& \-\-name my\-win10\-vm \e \& \-\-memory 4096 \e \& \-\-disk size=40 \e \& \-\-os\-variant win10 \e \& \-\-cdrom /path/to/my/win10.iso .Ve .PP Install a CentOS 7 \s-1KVM\s0 from a \s-1URL,\s0 with recommended device defaults and default required storag,e but specifically request \s-1VNC\s0 graphics instead of the default \s-1SPICE,\s0 and request 8 virtual CPUs and 8192 MiB of memory: .PP .Vb 7 \& # virt\-install \e \& \-\-connect qemu:///system \e \& \-\-memory 8192 \e \& \-\-vcpus 8 \e \& \-\-graphics vnc \e \& \-\-os\-variant centos7.0 \e \& \-\-location http://mirror.centos.org/centos\-7/7/os/x86_64/ .Ve .PP Create a \s-1VM\s0 around an existing debian9 disk image: .PP .Vb 5 \& # virt\-install \e \& \-\-import \e \& \-\-memory 512 \e \& \-\-disk /home/user/VMs/my\-debian9.img \e \& \-\-os\-variant debian9 .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 \& \-\-graphics none .Ve .PP Start an \s-1SEV\s0 launch security \s-1VM\s0 with 4GB \s-1RAM,\s0 4GB+256MiB of hard_limit, with a couple of virtio devices: .PP Note: The \s-1IOMMU\s0 flag needs to be turned on with driver.iommu for virtio devices. Usage of \-\-memtune is currently required because of \s-1SEV\s0 limitations, refer to libvirt docs for a detailed explanation. .PP .Vb 10 \& # virt\-install \e \& \-\-name foo \e \& \-\-memory 4096 \e \& \-\-boot uefi \e \& \-\-machine q35 \e \& \-\-memtune hard_limit=4563402 \e \& \-\-disk size=15,target.bus=scsi \e \& \-\-import \e \& \-\-controller type=scsi,model=virtio\-scsi,driver.iommu=on \e \& \-\-controller type=virtio\-serial,driver.iommu=on \e \& \-\-network network=default,model=virtio,driver.iommu=on \e \& \-\-rng driver,iommu=on \e \& \-\-memballoon driver.iommu=on \e \& \-\-launchSecurity sev .Ve .SH "BUGS" .IX Header "BUGS" Please see .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`https://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`https://virt\-manager.org\*(C'\fR