1VIRT-INSTALL(1)             Virtual Machine Manager            VIRT-INSTALL(1)
2
3
4

NAME

6       virt-install - provision new virtual machines
7

SYNOPSIS

9       virt-install [OPTION]...
10

DESCRIPTION

12       virt-install is a command line tool for creating new KVM, Xen, or Linux
13       container guests using the "libvirt" hypervisor management library.
14       See the EXAMPLES section at the end of this document to quickly get
15       started.
16
17       virt-install tool supports graphical installations using (for example)
18       VNC or SPICE, as well as text mode installs over serial console. The
19       guest can be configured to use one or more virtual disks, network
20       interfaces, audio devices, physical USB or PCI devices, among others.
21
22       The installation media can be local ISO or CDROM media, or a distro
23       install tree hosted remotely over HTTP, FTP, or in a local directory.
24       In the install tree case "virt-install" will fetch the minimal files
25       necessary to kick off the installation process, allowing the guest to
26       fetch the rest of the OS distribution as needed. PXE booting, and
27       importing an existing disk image (thus skipping the install phase) are
28       also supported.
29
30       Given suitable command line arguments, "virt-install" is capable of
31       running completely unattended, with the guest 'kickstarting' itself
32       too. This allows for easy automation of guest installs.
33
34       Many arguments have sub options, specified like opt1=foo,opt2=bar, etc.
35       Try --option=? to see a complete list of sub options associated with
36       that argument, example: virt-install --disk=?
37
38       Most options are not required. Minimum requirements are --name,
39       --memory, guest storage (--disk or --filesystem), and an install
40       option.
41

CONNECTING TO LIBVIRT

43       --connect URI
44           Connect to a non-default hypervisor. If this isn't specified,
45           libvirt will try and choose the most suitable default.
46
47           Some valid options here are:
48
49           qemu:///system
50               For creating KVM and QEMU guests to be run by the system
51               libvirtd instance.  This is the default mode that virt-manager
52               uses, and what most KVM users want.
53
54           qemu:///session
55               For creating KVM and QEMU guests for libvirtd running as the
56               regular user.
57
58           xen:///
59               For connecting to Xen.
60
61           lxc:///
62               For creating linux containers
63

GENERAL OPTIONS

65       General configuration parameters that apply to all types of guest
66       installs.
67
68       -n NAME
69       --name NAME
70           Name of the new guest virtual machine instance. This must be unique
71           amongst all guests known to the hypervisor on the connection,
72           including those not currently active. To re-define an existing
73           guest, use the virsh(1) tool to shut it down ('virsh shutdown') &
74           delete ('virsh undefine') it prior to running "virt-install".
75
76       --memory OPTIONS
77           Memory to allocate for the guest, in MiB. This deprecates the
78           -r/--ram option.  Sub options are available, like 'maxmemory',
79           'hugepages', 'hotplugmemorymax' and 'hotplugmemoryslots'.  The
80           memory parameter is mapped to <currentMemory> element, the
81           'maxmemory' sub-option is mapped to <memory> element and
82           'hotplugmemorymax' and 'hotplugmemoryslots' are mapped to
83           <maxMemory> element.
84
85           To configure memory modules which can be hotunplugged see --memdev
86           description.
87
88           Use --memory=? to see a list of all available sub options. Complete
89           details at
90           <https://libvirt.org/formatdomain.html#elementsMemoryAllocation>
91
92       --memorybacking OPTIONS
93           This option will influence how virtual memory pages are backed by
94           host pages.
95
96           Use --memorybacking=? to see a list of all available sub options.
97           Complete details at
98           <https://libvirt.org/formatdomain.html#elementsMemoryBacking>
99
100       --arch ARCH
101           Request a non-native CPU architecture for the guest virtual
102           machine.  If omitted, the host CPU architecture will be used in the
103           guest.
104
105       --machine MACHINE
106           The machine type to emulate. This will typically not need to be
107           specified for Xen or KVM, but is useful for choosing machine types
108           of more exotic architectures.
109
110       --metadata OPT=VAL,[...]
111           Specify metadata values for the guest. Possible options include
112           name, uuid, title, and description. This option deprecates
113           -u/--uuid and --description.
114
115           Use --metadata=? to see a list of all available sub options.
116           Complete details at
117           <https://libvirt.org/formatdomain.html#elementsMetadata>
118
119       --events OPT=VAL,[...]
120           Specify events values for the guest. Possible options include
121           on_poweroff, on_reboot, and on_crash.
122
123           Use --events=? to see a list of all available sub options. Complete
124           details at <https://libvirt.org/formatdomain.html#elementsEvents>
125
126       --resource OPT=VAL,[...]
127           Specify resource partitioning for the guest.
128
129           Use --resource=? to see a list of all available sub options.
130           Complete details at
131           <https://libvirt.org/formatdomain.html#resPartition>
132
133       --sysinfo OPT=VAL,[...]
134           Configure sysinfo/SMBIOS values exposed to the guest OS. '--sysinfo
135           host' can be used to expose the host's SMBIOS info to the VM,
136           otherwise values can be manually specified.
137
138           Use --sysinfo=? to see a list of all available sub options.
139           Complete details at
140           <https://libvirt.org/formatdomain.html#elementsSysinfo>
141
142       --qemu-commandline ARGS
143           Pass options directly to the qemu emulator. Only works for the
144           libvirt qemu driver. The option can take a string of arguments, for
145           example:
146
147             --qemu-commandline="-display gtk,gl=on"
148
149           Environment variables are specified with 'env', for example:
150
151             --qemu-commandline=env=DISPLAY=:0.1
152
153           Complete details about the libvirt feature:
154           <https://libvirt.org/drvqemu.html#qemucommand>
155
156       --vcpus OPTIONS
157           Number of virtual cpus to configure for the guest. If 'maxvcpus' is
158           specified, the guest will be able to hotplug up to MAX vcpus while
159           the guest is running, but will startup with VCPUS.
160
161           CPU topology can additionally be specified with sockets, cores, and
162           threads.  If values are omitted, the rest will be autofilled
163           preferring sockets over cores over threads.
164
165           'cpuset' sets which physical cpus the guest can use. "CPUSET" is a
166           comma separated list of numbers, which can also be specified in
167           ranges or cpus to exclude. Example:
168
169               0,2,3,5     : Use processors 0,2,3 and 5
170               1-5,^3,8    : Use processors 1,2,4,5 and 8
171
172           If the value 'auto' is passed, virt-install attempts to
173           automatically determine an optimal cpu pinning using NUMA data, if
174           available.
175
176           Use --vcpus=? to see a list of all available sub options. Complete
177           details at
178           <https://libvirt.org/formatdomain.html#elementsCPUAllocation>
179
180       --numatune OPTIONS
181           Tune NUMA policy for the domain process. Example invocations
182
183               --numatune 1,2,3,4-7
184               --numatune 1-3,5,mode=preferred
185
186           Specifies the numa nodes to allocate memory from. This has the same
187           syntax as "--vcpus cpuset=" option. mode can be one of
188           'interleave', 'preferred', or 'strict' (the default). See 'man 8
189           numactl' for information about each mode.
190
191           Use --numatune=? to see a list of all available sub options.
192           Complete details at
193           <https://libvirt.org/formatdomain.html#elementsNUMATuning>
194
195       --memtune OPTIONS
196           Tune memory policy for the domain process. Example invocations
197
198               --memtune 1000
199               --memtune hard_limit=100,soft_limit=60,swap_hard_limit=150,min_guarantee=80
200
201           Use --memtune=? to see a list of all available sub options.
202           Complete details at
203           <https://libvirt.org/formatdomain.html#elementsMemoryTuning>
204
205       --blkiotune OPTIONS
206           Tune blkio policy for the domain process. Example invocations
207
208               --blkiotune 100
209               --blkiotune weight=100,device_path=/dev/sdc,device_weight=200
210
211           Use --blkiotune=? to see a list of all available sub options.
212           Complete details at
213           <https://libvirt.org/formatdomain.html#elementsBlockTuning>
214
215       --cpu MODEL[,+feature][,-feature][,match=MATCH][,vendor=VENDOR],...
216           Configure the CPU model and CPU features exposed to the guest. The
217           only required value is MODEL, which is a valid CPU model as known
218           to libvirt.
219
220           Libvirt's feature policy values force, require, optional, disable,
221           or forbid, or with the shorthand '+feature' and '-feature', which
222           equal 'force=feature' and 'disable=feature' respectively
223
224           Some examples:
225
226           --cpu core2duo,+x2apic,disable=vmx
227               Expose the core2duo CPU model, force enable x2apic, but do not
228               expose vmx
229
230           --cpu host
231               Expose the host CPUs configuration to the guest. This enables
232               the guest to take advantage of many of the host CPUs features
233               (better performance), but may cause issues if migrating the
234               guest to a host without an identical CPU.
235
236           --cpu host-model-only
237               Expose the nearest host CPU model configuration to the guest.
238               It is the best CPU which can be used for a guest on any of the
239               hosts.
240
241           --cpu
242           cell0.memory=1234,cell0.cpus=0-3,cell1.memory=5678,cell1.cpus=4-7
243               Example of specifying two NUMA cells. This will generate XML
244               like:
245
246                 <cpu>
247                   <numa>
248                     <cell cpus="0-3" memory="1234"/>
249                     <cell cpus="4-7" memory="5678"/>
250                   </numa>
251                 </cpu>
252
253           --cpu host-passthrough,cache.mode=passthrough
254               Example of passing through the host cpu's cache information.
255
256           Use --cpu=? to see a list of all available sub options. Complete
257           details at <https://libvirt.org/formatdomain.html#elementsCPU>
258
259       --cputune OPTIONS
260           Tune CPU parameters for the guest.
261
262           Configure which of the host's physical CPUs the domain VCPU will be
263           pinned to. Example invocation
264
265               --cputune vcpupin0.vcpu=0,vcpupin0.cpuset=0-3,vcpupin1.vcpu=1,vcpupin1.cpuset=4-7
266
267           Use --cputune=? to see a list of all available sub options.
268           Complete details at
269           <https://libvirt.org/formatdomain.html#elementsCPUTuning>
270
271       --security type=TYPE[,label=LABEL][,relabel=yes|no]
272           Configure domain security driver settings. Type can be either
273           'static' or 'dynamic'. 'static' configuration requires a security
274           LABEL. Specifying LABEL without TYPE implies static configuration.
275
276           To have libvirt automatically apply your static label, you must
277           specify relabel=yes. Otherwise disk images must be manually labeled
278           by the admin, including images that virt-install is asked to
279           create.
280
281           Use --security=? to see a list of all available sub options.
282           Complete details at
283           <https://libvirt.org/formatdomain.html#seclabel>
284
285       --features FEAT=on|off,...
286           Set elements in the guests <features> XML on or off. Examples
287           include acpi, apic, eoi, privnet, and hyperv features. Some
288           examples:
289
290           --features eoi=on
291               Enable APIC PV EOI
292
293           --features hyperv_vapic=on,hyperv_spinlocks=off
294               Enable hypver VAPIC, but disable spinlocks
295
296           --features kvm_hidden=on
297               Allow the KVM hypervisor signature to be hidden from the guest
298
299           --features pvspinlock=on
300               Notify the guest that the host supports paravirtual spinlocks
301               for example by exposing the pvticketlocks mechanism.
302
303           --features gic_version=2
304               This is relevant only for ARM architectures. Possible values
305               are "host" or version number.
306
307           --features smm=on
308               This enables System Management Mode of hypervisor. Some UEFI
309               firmwares may require this feature to be present. (QEMU
310               supports SMM only with q35 machine type.)
311
312           Use --features=? to see a list of all available sub options.
313           Complete details at
314           <https://libvirt.org/formatdomain.html#elementsFeatures>
315
316       --clock offset=OFFSET,TIMER_OPT=VAL,...
317           Configure the guest's <clock> XML. Some supported options:
318
319           --clock offset=OFFSET
320               Set the clock offset, ex. 'utc' or 'localtime'
321
322           --clock TIMER_present=no
323               Disable a boolean timer. TIMER here might be hpet, kvmclock,
324               etc.
325
326           --clock TIMER_tickpolicy=VAL
327               Set a timer's tickpolicy value. TIMER here might be rtc, pit,
328               etc. VAL might be catchup, delay, etc. Refer to the libvirt
329               docs for all values.
330
331           Use --clock=? to see a list of all available sub options. Complete
332           details at <https://libvirt.org/formatdomain.html#elementsTime>
333
334       --pm OPTIONS
335           Configure guest power management features. Example suboptions
336           include suspend_to_mem=on|off and suspend_to_disk=on|off
337
338           Use --pm=? to see a list of all available sub options. Complete
339           details at
340           <https://libvirt.org/formatdomain.html#elementsPowerManagement>
341

INSTALLATION OPTIONS

343       -c OPTIONS
344       --cdrom OPTIONS
345           ISO file or CDROM device to use for VM install media. After
346           install, the the virtual CDROM device will remain attached to the
347           VM, but with the ISO or host path media ejected.
348
349       -l LOCATION
350       --location OPTIONS
351           Distribution tree installation source. virt-install can recognize
352           certain distribution trees and fetches a bootable kernel/initrd
353           pair to launch the install.
354
355           --location allows things like --extra-args for kernel arguments,
356           and using --initrd-inject. If you want to use those options with
357           CDROM media, you can pass the ISO to --location as well.
358
359           The "LOCATION" can take one of the following forms:
360
361           https://host/path
362               An HTTP server location containing an installable distribution
363               image.
364
365           ftp://host/path
366               An FTP server location containing an installable distribution
367               image.
368
369           ISO Probe the ISO and extract files using 'isoinfo'
370
371           DIRECTORY
372               Path to a local directory containing an installable
373               distribution image. Note that the directory will not be
374               accessible by the guest after initial boot, so the OS installer
375               will need another way to access the rest of the install media.
376
377           Some distro specific url samples:
378
379           Fedora/Red Hat Based
380               https://download.fedoraproject.org/pub/fedora/linux/releases/29/Server/x86_64/os
381
382           Debian
383               https://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/
384
385           Ubuntu
386               https://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/
387
388           Suse
389               https://download.opensuse.org/pub/opensuse/distribution/leap/42.3/repo/oss/
390
391           Mandriva
392               ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2009.0/i586/
393
394           Mageia
395               ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/1
396
397           Additionally, --location can take 'kernel' and 'initrd' sub
398           options. These paths relative to the specified location URL/ISO
399           that allow selecting specific files for kernel/initrd within the
400           install tree. This can be useful if virt-install/ libosinfo doesn't
401           know where to find the kernel in the specified --location.
402
403           For example, if you have an ISO that libosinfo doesn't know about
404           called my-unknown.iso, with a kernel at 'kernel/fookernel' and
405           initrd at 'kernel/fooinitrd', you can make this work with:
406
407             --location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd
408
409       --pxe
410           Use the PXE boot protocol to load the initial ramdisk and kernel
411           for starting the guest installation process.
412
413       --import
414           Skip the OS installation process, and build a guest around an
415           existing disk image. The device used for booting is the first
416           device specified via "--disk" or "--filesystem".
417
418       --livecd
419           Specify that the installation media is a live CD and thus the guest
420           needs to be configured to boot off the CDROM device permanently. It
421           may be desirable to also use the "--disk none" flag in combination.
422
423       -x EXTRA
424       --extra-args OPTIONS
425           Additional kernel command line arguments to pass to the installer
426           when performing a guest install from "--location". One common usage
427           is specifying an anaconda kickstart file for automated installs,
428           such as --extra-args "ks=https://myserver/my.ks"
429
430       --initrd-inject PATH
431           Add PATH to the root of the initrd fetched with "--location". This
432           can be used to run an automated install without requiring a network
433           hosted kickstart file:
434
435           --initrd-inject=/path/to/my.ks --extra-args "ks=file:/my.ks"
436
437       --boot BOOTOPTS
438           Optionally specify the post-install VM boot configuration. This
439           option allows specifying a boot device order, permanently booting
440           off kernel/initrd with option kernel arguments, and enabling a BIOS
441           boot menu (requires libvirt 0.8.3 or later)
442
443           --boot can be specified in addition to other install options (such
444           as --location, --cdrom, etc.) or can be specified on its own. In
445           the latter case, behavior is similar to the --import install
446           option: there is no 'install' phase, the guest is just created and
447           launched as specified.
448
449           Some examples:
450
451           --boot cdrom,fd,hd,network,menu=on
452               Set the boot device priority as first cdrom, first floppy,
453               first harddisk, network PXE boot. Additionally enable BIOS boot
454               menu prompt.
455
456           --boot kernel=KERNEL,initrd=INITRD,kernel_args="console=/dev/ttyS0"
457               Have guest permanently boot off a local kernel/initrd pair,
458               with the specified kernel options.
459
460           --boot kernel=KERNEL,initrd=INITRD,dtb=DTB
461               Have guest permanently boot off a local kernel/initrd pair with
462               an external device tree binary. DTB can be required for some
463               non-x86 configurations like ARM or PPC
464
465           --boot loader=BIOSPATH
466               Use BIOSPATH as the virtual machine BIOS.
467
468           --boot menu=on,useserial=on
469               Enable the bios boot menu, and enable sending bios text output
470               over serial console.
471
472           --boot init=INITPATH
473               Path to a binary that the container guest will init. If a root
474               "--filesystem" has been specified, virt-install will default to
475               /sbin/init, otherwise will default to /bin/sh.
476
477           --boot uefi
478               Configure the VM to boot from UEFI. In order for virt-install
479               to know the correct UEFI parameters, libvirt needs to be
480               advertising known UEFI binaries via domcapabilities XML, so
481               this will likely only work if using properly configured distro
482               packages.
483
484           --boot
485           loader=/.../OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/.../OVMF_VARS.fd,loader_secure=no
486               Specify that the virtual machine use the custom OVMF binary as
487               boot firmware, mapped as a virtual flash chip. In addition,
488               request that libvirt instantiate the VM-specific UEFI varstore
489               from the custom "/.../OVMF_VARS.fd" varstore template. This is
490               the recommended UEFI setup, and should be used if --boot uefi
491               doesn't know about your UEFI binaries. If your UEFI firmware
492               supports Secure boot feature you can enable it via
493               loader_secure.
494
495           Use --boot=? to see a list of all available sub options. Complete
496           details at <https://libvirt.org/formatdomain.html#elementsOS>
497
498       --idmap OPTIONS
499           If the guest configuration declares a UID or GID mapping, the
500           'user' namespace will be enabled to apply these.  A suitably
501           configured UID/GID mapping is a pre-requisite to make containers
502           secure, in the absence of sVirt confinement.
503
504           --idmap can be specified to enable user namespace for LXC
505           containers
506
507           Example:
508               --idmap
509           uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10
510
511           Use --idmap=? to see a list of all available sub options. Complete
512           details at
513           <https://libvirt.org/formatdomain.html#elementsOSContainer>
514

GUEST OS OPTIONS

516       --os-variant OS_VARIANT
517           Optimize the guest configuration for a specific operating system
518           (ex.  'fedora29', 'rhel7', 'win10'). While not required, specifying
519           this options is HIGHLY RECOMMENDED, as it can greatly increase
520           performance by specifying virtio among other guest tweaks.
521
522           By default, virt-install will attempt to auto detect this value
523           from the install media (currently only supported for URL installs).
524           Autodetection can be disabled with the special value 'none'.
525           Autodetection can be forced with the special value 'auto'.
526
527           Use the command "osinfo-query os" to get the list of the accepted
528           OS variants.
529

STORAGE OPTIONS

531       --disk OPTIONS
532           Specifies media to use as storage for the guest, with various
533           options. The general format of a disk string is
534
535               --disk opt1=val1,opt2=val2,...
536
537           The simplest invocation to create a new 10G disk image and
538           associated disk device:
539
540               --disk size=10
541
542           virt-install will generate a path name, and place it in the default
543           image location for the hypervisor. To specify media, the command
544           can either be:
545
546               --disk /some/storage/path[,opt1=val1]...
547
548           or explicitly specify one of the following arguments:
549
550           path
551               A path to some storage media to use, existing or not. Existing
552               media can be a file or block device.
553
554               Specifying a non-existent path implies attempting to create the
555               new storage, and will require specifying a 'size' value. Even
556               for remote hosts, virt-install will try to use libvirt storage
557               APIs to automatically create the given path.
558
559               If the hypervisor supports it, path can also be a network URL,
560               like https://example.com/some-disk.img . For network paths,
561               they hypervisor will directly access the storage, nothing is
562               downloaded locally.
563
564           pool
565               An existing libvirt storage pool name to create new storage on.
566               Requires specifying a 'size' value.
567
568           vol An existing libvirt storage volume to use. This is specified as
569               'poolname/volname'.
570
571           Other available options:
572
573           device
574               Disk device type. Value can be 'cdrom', 'disk', 'lun' or
575               'floppy'. Default is 'disk'. If a 'cdrom' is specified, and no
576               install method is chosen, the cdrom is used as the install
577               media.
578
579           boot_order
580               Guest installation with multiple disks will need this parameter
581               to boot correctly after being installed. A boot_order parameter
582               will take values 1,2,3,... Devices with lower value has higher
583               priority.
584
585           bus Disk bus type. Value can be 'ide', 'sata', 'scsi', 'usb',
586               'virtio' or 'xen'.  The default is hypervisor dependent since
587               not all hypervisors support all bus types.
588
589           removable
590               Sets the removable flag (/sys/block/$dev/removable on Linux).
591               Only used with QEMU and bus=usb. Value can be 'on' or 'off'.
592
593           readonly
594               Set drive as readonly (takes 'on' or 'off')
595
596           shareable
597               Set drive as shareable (takes 'on' or 'off')
598
599           size
600               size (in GiB) to use if creating new storage
601
602           sparse
603               whether to skip fully allocating newly created storage. Value
604               is 'yes' or 'no'. Default is 'yes' (do not fully allocate)
605               unless it isn't supported by the underlying storage type.
606
607               The initial time taken to fully-allocate the guest virtual disk
608               (sparse=no) will be usually balanced by faster install times
609               inside the guest. Thus use of this option is recommended to
610               ensure consistently high performance and to avoid I/O errors in
611               the guest should the host filesystem fill up.
612
613           backing_store
614               Path to a disk to use as the backing store for the newly
615               created image.
616
617           backing_format
618               Disk image format of backing_store
619
620           cache
621               The cache mode to be used. The host pagecache provides cache
622               memory.  The cache value can be 'none', 'writethrough',
623               'directsync', 'unsafe' or 'writeback'.  'writethrough' provides
624               read caching. 'writeback' provides read and write caching.
625               'directsync' bypasses the host page cache. 'unsafe' may cache
626               all content and ignore flush requests from the guest.
627
628           discard
629               Whether discard (also known as "trim" or "unmap") requests are
630               ignored or passed to the filesystem. The value can be either
631               "unmap" (allow the discard request to be passed) or "ignore"
632               (ignore the discard request). Since 1.0.6 (QEMU and KVM only)
633
634           format
635               Disk image format. For file volumes, this can be 'raw',
636               'qcow2', 'vmdk', etc. See format types in
637               <https://libvirt.org/storage.html> for possible values. This is
638               often mapped to the driver_type value as well.
639
640               If not specified when creating file images, this will default
641               to 'qcow2'.
642
643               If creating storage, this will be the format of the new image.
644               If using an existing image, this overrides libvirt's format
645               auto-detection.
646
647           driver_name
648               Driver name the hypervisor should use when accessing the
649               specified storage. Typically does not need to be set by the
650               user.
651
652           driver_type
653               Driver format/type the hypervisor should use when accessing the
654               specified storage. Typically does not need to be set by the
655               user.
656
657           io  Disk IO backend. Can be either "threads" or "native".
658
659           error_policy
660               How guest should react if a write error is encountered. Can be
661               one of "stop", "ignore", or "enospace"
662
663           serial
664               Serial number of the emulated disk device. This is used in
665               linux guests to set /dev/disk/by-id symlinks. An example serial
666               number might be: WD-WMAP9A966149
667
668           startup_policy
669               It defines what to do with the disk if the source file is not
670               accessible.  See possible values in
671               <https://www.libvirt.org/formatdomain.html#elementsDisks>,
672               "startupPolicy" attribute of the <disk> element
673
674           snapshot_policy
675               Defines default behavior of the disk during disk snapshots.
676               See possible values in
677               <https://www.libvirt.org/formatdomain.html#elementsDisks>,
678               "snapshot" attribute of the <disk> element.
679
680           See the examples section for some uses. This option deprecates
681           -f/--file, -s/--file-size, --nonsparse, and --nodisks.
682
683           Use --disk=? to see a list of all available sub options. Complete
684           details at <https://libvirt.org/formatdomain.html#elementsDisks>
685
686       --filesystem
687           Specifies a directory on the host to export to the guest. The most
688           simple invocation is:
689
690               --filesystem /source/on/host,/target/point/in/guest
691
692           Which will work for recent QEMU and linux guest OS or LXC
693           containers. For QEMU, the target point is just a mounting hint in
694           sysfs, so will not be automatically mounted.
695
696           The following explicit options can be specified:
697
698           type
699               The type or the source directory. Valid values are 'mount' (the
700               default) or 'template' for OpenVZ templates.
701
702           mode
703               The access mode for the source directory from the guest OS.
704               Only used with QEMU and type=mount. Valid modes are
705               'passthrough' (the default), 'mapped', or 'squash'. See libvirt
706               domain XML documentation for more info.
707
708           source
709               The directory on the host to share.
710
711           target
712               The mount location to use in the guest.
713
714           Use --filesystem=? to see a list of all available sub options.
715           Complete details at
716           <https://libvirt.org/formatdomain.html#elementsFilesystems>
717

NETWORKING OPTIONS

719       -w OPTIONS
720       --network OPTIONS
721           Connect the guest to the host network. The value for "NETWORK" can
722           take one of 4 formats:
723
724           bridge=BRIDGE
725               Connect to a bridge device in the host called "BRIDGE". Use
726               this option if the host has static networking config & the
727               guest requires full outbound and inbound connectivity  to/from
728               the LAN. Also use this if live migration will be used with this
729               guest.
730
731           network=NAME
732               Connect to a virtual network in the host called "NAME". Virtual
733               networks can be listed, created, deleted using the "virsh"
734               command line tool. In an unmodified install of "libvirt" there
735               is usually a virtual network with a name of "default". Use a
736               virtual network if the host has dynamic networking (eg
737               NetworkManager), or using wireless. The guest will be NATed to
738               the LAN by whichever connection is active.
739
740           type=direct,source=IFACE[,source_mode=MODE]
741               Direct connect to host interface IFACE using macvtap.
742
743           user
744               Connect to the LAN using SLIRP. Only use this if running a QEMU
745               guest as an unprivileged user. This provides a very limited
746               form of NAT.
747
748           none
749               Tell virt-install not to add any default network interface.
750
751           If this option is omitted a single NIC will be created in the
752           guest. If there is a bridge device in the host with a physical
753           interface enslaved, that will be used for connectivity. Failing
754           that, the virtual network called "default" will be used. This
755           option can be specified multiple times to setup more than one NIC.
756
757           Other available options are:
758
759           model
760               Network device model as seen by the guest. Value can be any nic
761               model supported by the hypervisor, e.g.: 'e1000', 'rtl8139',
762               'virtio', ...
763
764           mac Fixed MAC address for the guest; If this parameter is omitted,
765               or the value "RANDOM" is specified a suitable address will be
766               randomly generated. For Xen virtual machines it is required
767               that the first 3 pairs in the MAC address be the sequence
768               '00:16:3e', while for QEMU or KVM virtual machines it must be
769               '52:54:00'.
770
771           filterref
772               Controlling firewall and network filtering in libvirt. Value
773               can be any nwfilter defined by the "virsh" 'nwfilter'
774               subcommands. Available filters can be listed by running 'virsh
775               nwfilter-list', e.g.: 'clean-traffic', 'no-mac-spoofing', ...
776
777           virtualport_type
778               The type of virtual port profile, one the following values
779
780               "802.Qbg"
781                   The following additional parameters are accepted
782
783                   virtualport_managerid
784                       The VSI Manager ID identifies the database containing
785                       the VSI type and instance definitions. This is an
786                       integer value and the value 0 is reserved.
787
788                   virtualport_typeid
789                       The VSI Type ID identifies a VSI type characterizing
790                       the network access. VSI types are typically managed by
791                       network administrator.  This is an integer value.
792
793                   virtualport_typeidversion
794                       The VSI Type Version allows multiple versions of a VSI
795                       Type. This is an integer value.
796
797                   virtualport_instanceid
798                       The VSI Instance ID Identifier is generated when a VSI
799                       instance (i.e. a virtual interface of a virtual
800                       machine) is created. This is a globally unique
801                       identifier.
802
803               "802.Qbh"
804                   The following additional parameters are accepted
805
806                   virtualport_profileid
807                       The profile ID contains the name of the port profile
808                       that is to be applied to this interface. This name is
809                       resolved by the port profile database into the network
810                       parameters from the port profile, and those network
811                       parameters will be applied to this interface.
812
813               "openvswitch"
814                   The following additional parameters are accepted
815
816                   virtualport_profileid
817                       The OpenVSwitch port profile for the interface
818
819                   virtualport_interfaceid
820                       A UUID to uniquely identify the interface. If omitted
821                       one will be generated automatically
822
823               "midonet"
824                   The following additional parameters are accepted
825
826                   virtualport_interfaceid
827                       A UUID identifying the port in the network to which the
828                       interface will be bound
829
830           Use --network=? to see a list of all available sub options.
831           Complete details at
832           <https://libvirt.org/formatdomain.html#elementsNICS>
833
834           This option deprecates -m/--mac, -b/--bridge, and --nonetworks
835

GRAPHICS OPTIONS

837       If no graphics option is specified, "virt-install" will try to select
838       the appropriate graphics if the DISPLAY environment variable is set,
839       otherwise '--graphics none' is used.
840
841       --graphics TYPE,opt1=arg1,opt2=arg2,...
842           Specifies the graphical display configuration. This does not
843           configure any virtual hardware, just how the guest's graphical
844           display can be accessed.  Typically the user does not need to
845           specify this option, virt-install will try and choose a useful
846           default, and launch a suitable connection.
847
848           General format of a graphical string is
849
850               --graphics TYPE,opt1=arg1,opt2=arg2,...
851
852           For example:
853
854               --graphics vnc,password=foobar
855
856           The supported options are:
857
858           type
859               The display type. This is one of:
860
861               vnc
862
863               Setup a virtual console in the guest and export it as a VNC
864               server in the host. Unless the "port" parameter is also
865               provided, the VNC server will run on the first free port number
866               at 5900 or above. The actual VNC display allocated can be
867               obtained using the "vncdisplay" command to "virsh" (or
868               virt-viewer(1) can be used which handles this detail for the
869               use).
870
871               spice
872
873               Export the guest's console using the Spice protocol. Spice
874               allows advanced features like audio and USB device streaming,
875               as well as improved graphical performance.
876
877               Using spice graphic type will work as if those arguments were
878               given:
879
880                   --video qxl --channel spicevmc
881
882               none
883
884               No graphical console will be allocated for the guest. Guests
885               will likely need to have a text console configured on the first
886               serial port in the guest (this can be done via the --extra-args
887               option). The command 'virsh console NAME' can be used to
888               connect to the serial device.
889
890           port
891               Request a permanent, statically assigned port number for the
892               guest console. This is used by 'vnc' and 'spice'
893
894           tlsport
895               Specify the spice tlsport.
896
897           listen
898               Address to listen on for VNC/Spice connections. Default is
899               typically 127.0.0.1 (localhost only), but some hypervisors
900               allow changing this globally (for example, the qemu driver
901               default can be changed in /etc/libvirt/qemu.conf).  Use 0.0.0.0
902               to allow access from other machines.
903
904               Use 'none' to specify that the display server should not listen
905               on any port. The display server can be accessed only locally
906               through libvirt unix socket (virt-viewer with --attach for
907               instance).
908
909               Use 'socket' to have the VM listen on a libvirt generated unix
910               socket path on the host filesystem.
911
912               This is used by 'vnc' and 'spice'
913
914           keymap
915               Request that the virtual console be configured to run with a
916               specific keyboard layout. If the special value 'local' is
917               specified, virt-install will attempt to configure to use the
918               same keymap as the local system. A value of 'none' specifically
919               defers to the hypervisor. Default behavior is hypervisor
920               specific, but typically is the same as 'local'. This is used by
921               'vnc' and 'spice'.
922
923           password
924               Request a console password, required at connection time.
925               Beware, this info may end up in virt-install log files, so
926               don't use an important password. This is used by 'vnc' and
927               'spice'
928
929           gl  Whether to use OpenGl accelerated rendering. Value is 'yes' or
930               'no'. This is used by 'spice'.
931
932           rendernode
933               DRM render node path to use. This is used when 'gl' is enabled.
934
935           Use --graphics=? to see a list of all available sub options.
936           Complete details at
937           <https://libvirt.org/formatdomain.html#elementsGraphics>
938
939           This deprecates the following options: --vnc, --vncport,
940           --vnclisten, -k/--keymap, --sdl, --nographics
941
942       --noautoconsole
943           Don't automatically try to connect to the guest console. The
944           default behaviour is to launch virt-viewer(1) to display the
945           graphical console, or to run the "virsh" "console" command to
946           display the text console. Use of this parameter will disable this
947           behaviour.
948

VIRTUALIZATION OPTIONS

950       Options to override the default virtualization type choices.
951
952       -v
953       --hvm
954           Request the use of full virtualization, if both para & full
955           virtualization are available on the host. This parameter may not be
956           available if connecting to a Xen hypervisor on a machine without
957           hardware virtualization support. This parameter is implied if
958           connecting to a QEMU based hypervisor.
959
960       -p
961       --paravirt
962           This guest should be a paravirtualized guest. If the host supports
963           both para & full virtualization, and neither this parameter nor the
964           "--hvm" are specified, this will be assumed.
965
966       --container
967           This guest should be a container type guest. This option is only
968           required if the hypervisor supports other guest types as well (so
969           for example this option is the default behavior for LXC and OpenVZ,
970           but is provided for completeness).
971
972       --virt-type
973           The hypervisor to install on. Example choices are kvm, qemu, or
974           xen.  Available options are listed via 'virsh capabilities' in the
975           <domain> tags.
976
977           This deprecates the --accelerate option, which is now the default
978           behavior. To install a plain QEMU guest, use '--virt-type qemu'
979

DEVICE OPTIONS

981       All devices have a set of address.* options for configuring the
982       particulars of the device's address on its parent controller or bus.
983       See "https://libvirt.org/formatdomain.html#elementsAddress" for
984       details.
985
986       --controller OPTIONS
987           Attach a controller device to the guest. TYPE is one of: ide, fdc,
988           scsi, sata, virtio-serial, or usb.
989
990           Controller also supports the special values usb2 and usb3 to
991           specify which version of the USB controller should be used (version
992           2 or 3).
993
994           model
995               Controller model.  These may vary according to the hypervisor
996               and its version.  Most commonly used models are e.g. auto,
997               virtio-scsi for the scsi controller, ehci or none for the usb
998               controller.  For full list and further details on
999               controllers/models, see
1000               "https://libvirt.org/formatdomain.html#elementsControllers".
1001
1002           address
1003               Shorthand for setting a manual PCI address from an lscpi style
1004               string.  The preferred method for setting this is using the
1005               address.* parameters.
1006
1007           index
1008               A decimal integer describing in which order the bus controller
1009               is encountered, and to reference the controller bus.
1010
1011           master
1012               Applicable to USB companion controllers, to define the master
1013               bus startport.
1014
1015           Examples:
1016
1017           --controller usb,model=ich9-ehci1,address=0:0:4.0,index=0
1018               Adds a ICH9 EHCI1 USB controller on PCI address 0:0:4.0
1019
1020           --controller usb,model=ich9-uhci2,address=0:0:4.7,index=0,master=2
1021               Adds a ICH9 UHCI2 USB companion controller for the previous
1022               master controller, ports start from port number 2.
1023
1024               The parameter multifunction='on' will be added automatically to
1025               the proper device (if needed).  This applies to all PCI
1026               devices.
1027
1028           Use --controller=? to see a list of all available sub options.
1029           Complete details at
1030           <https://libvirt.org/formatdomain.html#elementsControllers>
1031
1032       --input OPTIONS
1033           Attach an input device to the guest. Example input device types are
1034           mouse, tablet, or keyboard.
1035
1036           Use --input=? to see a list of all available sub options. Complete
1037           details at <https://libvirt.org/formatdomain.html#elementsInput>
1038
1039       --hostdev OPTIONS
1040       --host-device OPTIONS
1041           Attach a physical host device to the guest. Some example values for
1042           HOSTDEV:
1043
1044           --hostdev pci_0000_00_1b_0
1045               A node device name via libvirt, as shown by 'virsh
1046               nodedev-list'
1047
1048           --hostdev 001.003
1049               USB by bus, device (via lsusb).
1050
1051           --hostdev 0x1234:0x5678
1052               USB by vendor, product (via lsusb).
1053
1054           --hostdev 1f.01.02
1055               PCI device (via lspci).
1056
1057           --hostdev wlan0,type=net
1058               Network device (in LXC container).
1059
1060           --hostdev /dev/net/tun,type=misc
1061               Character device (in LXC container).
1062
1063           --hostdev /dev/sdf,type=storage
1064               Block device (in LXC container).
1065
1066           Use --hostdev=? to see a list of all available sub options.
1067           Complete details at
1068           <https://libvirt.org/formatdomain.html#elementsHostDev>
1069
1070       --sound MODEL
1071           Attach a virtual audio device to the guest. MODEL specifies the
1072           emulated sound card model. Possible values are ich6, ich9, ac97,
1073           es1370, sb16, pcspk, or default. 'default' will try to pick the
1074           best model that the specified OS supports.
1075
1076           This deprecates the old --soundhw option.
1077
1078           Use --sound=? to see a list of all available sub options. Complete
1079           details at <https://libvirt.org/formatdomain.html#elementsSound>
1080
1081       --watchdog MODEL[,action=ACTION]
1082           Attach a virtual hardware watchdog device to the guest. This
1083           requires a daemon and device driver in the guest. The watchdog
1084           fires a signal when the virtual machine appears to hung. ACTION
1085           specifies what libvirt will do when the watchdog fires. Values are
1086
1087           reset
1088               Forcefully reset the guest (the default)
1089
1090           poweroff
1091               Forcefully power off the guest
1092
1093           pause
1094               Pause the guest
1095
1096           none
1097               Do nothing
1098
1099           shutdown
1100               Gracefully shutdown the guest (not recommended, since a hung
1101               guest probably won't respond to a graceful shutdown)
1102
1103           MODEL is the emulated device model: either i6300esb (the default)
1104           or ib700.  Some examples:
1105
1106           Use the recommended settings:
1107
1108           --watchdog default
1109
1110           Use the i6300esb with the 'poweroff' action
1111
1112           --watchdog i6300esb,action=poweroff
1113
1114           Use --watchdog=? to see a list of all available sub options.
1115           Complete details at
1116           <https://libvirt.org/formatdomain.html#elementsWatchdog>
1117
1118       --parallel OPTIONS
1119       --serial OPTIONS
1120           Specifies a serial device to attach to the guest, with various
1121           options. The general format of a serial string is
1122
1123               --serial type,opt1=val1,opt2=val2,...
1124
1125           --serial and --parallel devices share all the same options, unless
1126           otherwise noted. Some of the types of character device redirection
1127           are:
1128
1129           --serial pty
1130               Pseudo TTY. The allocated pty will be listed in the running
1131               guests XML description.
1132
1133           --serial dev,path=HOSTPATH
1134               Host device. For serial devices, this could be /dev/ttyS0. For
1135               parallel devices, this could be /dev/parport0.
1136
1137           --serial file,path=FILENAME
1138               Write output to FILENAME.
1139
1140           --serial pipe,path=PIPEPATH
1141               Named pipe (see pipe(7))
1142
1143           --serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL
1144               TCP net console. MODE is either 'bind' (wait for connections on
1145               HOST:PORT) or 'connect' (send output to HOST:PORT), default is
1146               'bind'. HOST defaults to '127.0.0.1', but PORT is required.
1147               PROTOCOL can be either 'raw' or 'telnet' (default 'raw'). If
1148               'telnet', the port acts like a telnet server or client.  Some
1149               examples:
1150
1151               Wait for connections on any address, port 4567:
1152
1153               --serial tcp,host=0.0.0.0:4567
1154
1155               Connect to localhost, port 1234:
1156
1157               --serial tcp,host=:1234,mode=connect
1158
1159               Wait for telnet connection on localhost, port 2222. The user
1160               could then connect interactively to this console via 'telnet
1161               localhost 2222':
1162
1163               --serial tcp,host=:2222,mode=bind,protocol=telnet
1164
1165           --serial udp,host=CONNECT_HOST:PORT,bind_host=BIND_HOST:BIND_PORT
1166               UDP net console. HOST:PORT is the destination to send output to
1167               (default HOST is '127.0.0.1', PORT is required).
1168               BIND_HOST:BIND_PORT is the optional local address to bind to
1169               (default BIND_HOST is 127.0.0.1, but is only set if BIND_PORT
1170               is specified). Some examples:
1171
1172               Send output to default syslog port (may need to edit
1173               /etc/rsyslog.conf accordingly):
1174
1175               --serial udp,host=:514
1176
1177               Send output to remote host 192.168.10.20, port 4444 (this
1178               output can be read on the remote host using 'nc -u -l 4444'):
1179
1180               --serial udp,host=192.168.10.20:4444
1181
1182           --serial unix,path=UNIXPATH,mode=MODE
1183               Unix socket, see unix(7). MODE has similar behavior and
1184               defaults as --serial tcp,mode=MODE
1185
1186           Use --serial=? or --parallel=? to see a list of all available sub
1187           options. Complete details at
1188           <https://libvirt.org/formatdomain.html#elementsCharSerial> and
1189           <https://libvirt.org/formatdomain.html#elementsCharParallel>
1190
1191       --channel
1192           Specifies a communication channel device to connect the guest and
1193           host machine. This option uses the same options as --serial and
1194           --parallel for specifying the host/source end of the channel. Extra
1195           'target' options are used to specify how the guest machine sees the
1196           channel.
1197
1198           Some of the types of character device redirection are:
1199
1200           --channel SOURCE,target_type=guestfwd,target_address=HOST:PORT
1201               Communication channel using QEMU usermode networking stack. The
1202               guest can connect to the channel using the specified HOST:PORT
1203               combination.
1204
1205           --channel SOURCE,target_type=virtio[,name=NAME]
1206               Communication channel using virtio serial (requires 2.6.34 or
1207               later host and guest). Each instance of a virtio --channel line
1208               is exposed in the guest as /dev/vport0p1, /dev/vport0p2, etc.
1209               NAME is optional metadata, and can be any string, such as
1210               org.linux-kvm.virtioport1.  If specified, this will be exposed
1211               in the guest at /sys/class/virtio-ports/vport0p1/NAME
1212
1213           --channel spicevmc,target_type=virtio[,name=NAME]
1214               Communication channel for QEMU spice agent, using virtio serial
1215               (requires 2.6.34 or later host and guest). NAME is optional
1216               metadata, and can be any string, such as the default
1217               com.redhat.spice.0 that specifies how the guest will see the
1218               channel.
1219
1220           Use --channel=? to see a list of all available sub options.
1221           Complete details at
1222           <https://libvirt.org/formatdomain.html#elementsCharChannel>
1223
1224       --console
1225           Connect a text console between the guest and host. Certain guest
1226           and hypervisor combinations can automatically set up a getty in the
1227           guest, so an out of the box text login can be provided
1228           (target_type=xen for xen paravirt guests, and possibly
1229           target_type=virtio in the future).
1230
1231           Example:
1232
1233           --console pty,target_type=virtio
1234               Connect a virtio console to the guest, redirected to a PTY on
1235               the host.  For supported guests, this exposes /dev/hvc0 in the
1236               guest. See https://fedoraproject.org/wiki/Features/VirtioSerial
1237               for more info. virtio console requires libvirt 0.8.3 or later.
1238
1239           Use --console=? to see a list of all available sub options.
1240           Complete details at
1241           <https://libvirt.org/formatdomain.html#elementsCharConsole>
1242
1243       --video OPTIONS
1244           Specify what video device model will be attached to the guest.
1245           Valid values for VIDEO are hypervisor specific, but some options
1246           for recent kvm are cirrus, vga, qxl, virtio, or vmvga (vmware).
1247
1248           Use --video=? to see a list of all available sub options. Complete
1249           details at <https://libvirt.org/formatdomain.html#elementsVideo>
1250
1251       --smartcard MODE[,OPTIONS]
1252           Configure a virtual smartcard device.
1253
1254           Mode is one of host, host-certificates, or passthrough. Additional
1255           options are:
1256
1257           type
1258               Character device type to connect to on the host. This is only
1259               applicable for passthrough mode.
1260
1261           An example invocation:
1262
1263           --smartcard passthrough,type=spicevmc
1264               Use the smartcard channel of a SPICE graphics device to pass
1265               smartcard info to the guest
1266
1267           Use --smartcard=? to see a list of all available sub options.
1268           Complete details at
1269           <https://libvirt.org/formatdomain.html#elementsSmartcard>
1270
1271       --redirdev BUS[,OPTIONS]
1272           Add a redirected device.
1273
1274           type
1275               The redirection type, currently supported is tcp or spicevmc.
1276
1277           server
1278               The TCP server connection details, of the form 'server:port'.
1279
1280           Examples of invocation:
1281
1282           --redirdev usb,type=tcp,server=localhost:4000
1283               Add a USB redirected device provided by the TCP server on
1284               'localhost' port 4000.
1285
1286           --redirdev usb,type=spicevmc
1287               Add a USB device redirected via a dedicated Spice channel.
1288
1289           Use --redirdev=? to see a list of all available sub options.
1290           Complete details at
1291           <https://libvirt.org/formatdomain.html#elementsRedir>
1292
1293       --memballoon MODEL
1294           Attach a virtual memory balloon device to the guest. If the
1295           memballoon device needs to be explicitly disabled, MODEL='none' is
1296           used.
1297
1298           MODEL is the type of memballoon device provided. The value can be
1299           'virtio', 'xen' or 'none'.  Some examples:
1300
1301           Use the recommended settings:
1302
1303           --memballoon virtio
1304
1305           Do not use memballoon device:
1306
1307           --memballoon none
1308
1309           Use --memballoon=? to see a list of all available sub options.
1310           Complete details at
1311           <https://libvirt.org/formatdomain.html#elementsMemBalloon>
1312
1313       --tpm TYPE[,OPTIONS]
1314           Configure a virtual TPM device.
1315
1316           Type must be passthrough. Additional options are:
1317
1318           model
1319               The device model to present to the guest operating system.
1320               Model must be tpm-tis.
1321
1322           An example invocation:
1323
1324           --tpm passthrough,model=tpm-tis
1325               Make the host's TPM accessible to a single guest.
1326
1327           --tpm /dev/tpm
1328               Convenience option for passing through the hosts TPM.
1329
1330           Use --tpm=? to see a list of all available sub options. Complete
1331           details at <https://libvirt.org/formatdomain.html#elementsTpm>
1332
1333       --rng TYPE[,OPTIONS]
1334           Configure a virtual RNG device.
1335
1336           Type can be random or egd.
1337
1338           If the specified type is random then these values must be
1339           specified:
1340
1341           backend_device
1342               The device to use as a source of entropy.
1343
1344           Whereas, when the type is egd, these values must be provided:
1345
1346           backend_host
1347               Specify the host of the Entropy Gathering Daemon to connect to.
1348
1349           backend_service
1350               Specify the port of the Entropy Gathering Daemon to connect to.
1351
1352           backend_type
1353               Specify the type of the connection: tcp or udp.
1354
1355           backend_mode
1356               Specify the mode of the connection.  It is either 'bind' (wait
1357               for connections on HOST:PORT) or 'connect' (send output to
1358               HOST:PORT).
1359
1360           backend_connect_host
1361               Specify the remote host to connect to when the specified
1362               backend_type is udp and backend_mode is bind.
1363
1364           backend_connect_service
1365               Specify the remote service to connect to when the specified
1366               backend_type is udp and backend_mode is bind.
1367
1368           An example invocation:
1369
1370           --rng
1371           egd,backend_host=localhost,backend_service=8000,backend_type=tcp
1372               Connect to localhost to the TCP port 8000 to get entropy data.
1373
1374           --rng /dev/random
1375               Use the /dev/random device to get entropy data, this form
1376               implicitly uses the "random" model.
1377
1378               Use --rng=? to see a list of all available sub options.
1379               Complete details at
1380               <https://libvirt.org/formatdomain.html#elementsRng>
1381
1382       --panic MODEL[,OPTS]
1383           Attach a panic notifier device to the guest. For the recommended
1384           settings, use:
1385
1386           --panic default
1387
1388           Use --panic=? to see a list of all available sub options. Complete
1389           details at <https://libvirt.org/formatdomain.html#elementsPanic>
1390
1391       --memdev OPTS
1392           Add a memory module to a guest which can be hotunplugged. To add a
1393           memdev you need to configure hotplugmemory and NUMA for a guest.
1394
1395           Use --memdev=? to see a list of all available sub options. Complete
1396           details at <https://libvirt.org/formatdomain.html#elementsMemory>.
1397

MISCELLANEOUS OPTIONS

1399       -h
1400       --help
1401           Show the help message and exit
1402
1403       --version
1404           Show program's version number and exit
1405
1406       --autostart
1407           Set the autostart flag for a domain. This causes the domain to be
1408           started on host boot up.
1409
1410       --transient
1411           Use --import or --boot and --transient if you want a transient
1412           libvirt VM.  These VMs exist only until the domain is shut down or
1413           the host server is restarted.  Libvirt forgets the XML
1414           configuration of the VM after either of these events.  Note that
1415           the VM's disks will not be deleted.  See:
1416           <https://wiki.libvirt.org/page/VM_lifecycle#Transient_guest_domains_vs_Persistent_guest_domains>
1417
1418       --destroy-on-exit
1419           When the VM console window is exited, destroy (force poweroff) the
1420           VM.  If you combine this with --transient, this makes the virt-
1421           install command work similar to qemu, where the VM is shutdown when
1422           the console window is closed by the user.
1423
1424       --print-xml [STEP]
1425           Print the generated XML of the guest, instead of defining it. By
1426           default this WILL do storage creation (can be disabled with
1427           --dry-run). This option implies --quiet.
1428
1429           If the VM install has multiple phases, by default this will print
1430           all generated XML. If you want to print a particular step, use
1431           --print-xml 2 (for the second phase XML).
1432
1433       --noreboot
1434           Prevent the domain from automatically rebooting after the install
1435           has completed.
1436
1437       --wait WAIT
1438           Amount of time to wait (in minutes) for a VM to complete its
1439           install.  Without this option, virt-install will wait for the
1440           console to close (not necessarily indicating the guest has
1441           shutdown), or in the case of --noautoconsole, simply kick off the
1442           install and exit. Any negative value will make virt-install wait
1443           indefinitely, a value of 0 triggers the same results as
1444           noautoconsole. If the time limit is exceeded, virt-install simply
1445           exits, leaving the virtual machine in its current state.
1446
1447       --dry-run
1448           Proceed through the guest creation process, but do NOT create
1449           storage devices, change host device configuration, or actually
1450           teach libvirt about the guest.  virt-install may still fetch
1451           install media, since this is required to properly detect the OS to
1452           install.
1453
1454       --check
1455           Enable or disable some validation checks. Some examples are warning
1456           about using a disk that's already assigned to another VM (--check
1457           path_in_use=on|off), or warning about potentially running out of
1458           space during disk allocation (--check disk_size=on|off). Most
1459           checks are performed by default.
1460
1461       -q
1462       --quiet
1463           Only print fatal error messages.
1464
1465       -d
1466       --debug
1467           Print debugging information to the terminal when running the
1468           install process.  The debugging information is also stored in
1469           "~/.cache/virt-manager/virt-install.log" even if this parameter is
1470           omitted.
1471

EXAMPLES

1473       Install a Fedora 29 KVM guest with virtio accelerated disk/network,
1474       creating a new 10GiB qcow2 file, installing from media in the hosts
1475       CDROM drive. This will use Spice graphics by default, and launch
1476       autolaunch a graphical client.
1477
1478         # virt-install \
1479              --connect qemu:///system \
1480              --virt-type kvm \
1481              --name demo \
1482              --memory 500 \
1483              --disk size=10 \
1484              --cdrom /dev/cdrom \
1485              --os-variant fedora29
1486
1487       Install a Fedora 9 plain QEMU guest, using LVM partition, virtual
1488       networking, booting from PXE, using VNC server/viewer, with virtio-scsi
1489       disk
1490
1491         # virt-install \
1492              --connect qemu:///system \
1493              --name demo \
1494              --memory 500 \
1495              --disk path=/dev/HostVG/DemoVM,bus=scsi \
1496              --controller virtio-scsi \
1497              --network network=default \
1498              --virt-type qemu \
1499              --graphics vnc \
1500              --os-variant fedora9
1501
1502       Run a Live CD image under Xen fullyvirt, in diskless environment
1503
1504         # virt-install \
1505              --hvm \
1506              --name demo \
1507              --memory 500 \
1508              --disk none \
1509              --livecd \
1510              --graphics vnc \
1511              --cdrom /root/fedora7live.iso
1512
1513       Run /usr/bin/httpd in a linux container guest (LXC). Resource usage is
1514       capped at 512 MiB of ram and 2 host cpus:
1515
1516         # virt-install \
1517               --connect lxc:/// \
1518               --name httpd_guest \
1519               --memory 512 \
1520               --vcpus 2 \
1521               --init /usr/bin/httpd
1522
1523       Start a linux container guest(LXC) with a private root filesystem,
1524       using /bin/sh as init.  Container's root will be under host dir
1525       /home/LXC.  The host dir "/home/test" will be mounted at "/mnt" dir
1526       inside container:
1527
1528         # virt-install \
1529               --connect lxc:/// \
1530               --name container \
1531               --memory 128 \
1532               --filesystem /home/LXC,/ \
1533               --filesystem /home/test,/mnt \
1534               --init /bin/sh
1535
1536       Install a paravirtualized Xen guest, 500 MiB of RAM, a 5 GiB of disk,
1537       and Fedora Core 6 from a web server, in text-only mode, with old style
1538       --file options:
1539
1540         # virt-install \
1541              --paravirt \
1542              --name demo \
1543              --memory 500 \
1544              --disk /var/lib/xen/images/demo.img,size=6 \
1545              --graphics none \
1546              --location https://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/
1547
1548       Create a guest from an existing disk image 'mydisk.img' using defaults
1549       for the rest of the options.
1550
1551         # virt-install \
1552              --name demo \
1553              --memory 512 \
1554              --disk /home/user/VMs/mydisk.img \
1555              --import
1556
1557       Start serial QEMU ARM VM, which requires specifying a manual kernel.
1558
1559         # virt-install \
1560              --name armtest \
1561              --memory 1024 \
1562              --arch armv7l --machine vexpress-a9 \
1563              --disk /home/user/VMs/myarmdisk.img \
1564              --boot kernel=/tmp/my-arm-kernel,initrd=/tmp/my-arm-initrd,dtb=/tmp/my-arm-dtb,kernel_args="console=ttyAMA0 rw root=/dev/mmcblk0p3" \
1565              --graphics none
1566

BUGS

1568       Please see https://virt-manager.org/page/BugReporting
1569
1571       Copyright (C) Red Hat, Inc, and various contributors.  This is free
1572       software. You may redistribute copies of it under the terms of the GNU
1573       General Public License "https://www.gnu.org/licenses/gpl.html". There
1574       is NO WARRANTY, to the extent permitted by law.
1575

SEE ALSO

1577       virsh(1), "virt-clone(1)", "virt-manager(1)", the project website
1578       "https://virt-manager.org"
1579
1580
1581
15822.1.0                             2019-04-04                   VIRT-INSTALL(1)
Impressum