1VIRT-INSTALL(1) Virtual Machine Manager VIRT-INSTALL(1)
2
3
4
6 virt-install - provision new virtual machines
7
9 virt-install [OPTION]...
10
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 held locally or remotely on NFS, HTTP,
23 FTP servers. In the latter case "virt-install" will fetch the minimal
24 files necessary to kick off the installation process, allowing the
25 guest to fetch the rest of the OS distribution as needed. PXE booting,
26 and importing an existing disk image (thus skipping the install phase)
27 are also supported.
28
29 Given suitable command line arguments, "virt-install" is capable of
30 running completely unattended, with the guest 'kickstarting' itself
31 too. This allows for easy automation of guest installs.
32
33 Many arguments have sub options, specified like opt1=foo,opt2=bar, etc.
34 Try --option=? to see a complete list of sub options associated with
35 that argument, example: virt-install --disk=?
36
37 Most options are not required. Minimum requirements are --name,
38 --memory, guest storage (--disk or --filesystem), and an install
39 option.
40
42 --connect URI
43 Connect to a non-default hypervisor. If this isn't specified,
44 libvirt will try and choose the most suitable default.
45
46 Some valid options here are:
47
48 qemu:///system
49 For creating KVM and QEMU guests to be run by the system
50 libvirtd instance. This is the default mode that virt-manager
51 uses, and what most KVM users want.
52
53 qemu:///session
54 For creating KVM and QEMU guests for libvirtd running as the
55 regular user.
56
57 xen:///
58 For connecting to Xen.
59
60 lxc:///
61 For creating linux containers
62
64 General configuration parameters that apply to all types of guest
65 installs.
66
67 -n NAME
68 --name NAME
69 Name of the new guest virtual machine instance. This must be unique
70 amongst all guests known to the hypervisor on the connection,
71 including those not currently active. To re-define an existing
72 guest, use the virsh(1) tool to shut it down ('virsh shutdown') &
73 delete ('virsh undefine') it prior to running "virt-install".
74
75 --memory OPTIONS
76 Memory to allocate for the guest, in MiB. This deprecates the
77 -r/--ram option. Sub options are available, like 'maxmemory',
78 'hugepages', 'hotplugmemorymax' and 'hotplugmemoryslots'. The
79 memory parameter is mapped to <currentMemory> element, the
80 'maxmemory' sub-option is mapped to <memory> element and
81 'hotplugmemorymax' and 'hotplugmemoryslots' are mapped to
82 <maxMemory> element.
83
84 To configure memory modules which can be hotunplugged see --memdev
85 description.
86
87 Use --memory=? to see a list of all available sub options. Complete
88 details at
89 <http://libvirt.org/formatdomain.html#elementsMemoryAllocation>
90
91 --memorybacking OPTIONS
92 This option will influence how virtual memory pages are backed by
93 host pages.
94
95 Use --memorybacking=? to see a list of all available sub options.
96 Complete details at
97 <http://libvirt.org/formatdomain.html#elementsMemoryBacking>
98
99 --arch ARCH
100 Request a non-native CPU architecture for the guest virtual
101 machine. If omitted, the host CPU architecture will be used in the
102 guest.
103
104 --machine MACHINE
105 The machine type to emulate. This will typically not need to be
106 specified for Xen or KVM, but is useful for choosing machine types
107 of more exotic architectures.
108
109 --metadata OPT=VAL,[...]
110 Specify metadata values for the guest. Possible options include
111 name, uuid, title, and description. This option deprecates
112 -u/--uuid and --description.
113
114 Use --metadata=? to see a list of all available sub options.
115 Complete details at
116 <http://libvirt.org/formatdomain.html#elementsMetadata>
117
118 --events OPT=VAL,[...]
119 Specify events values for the guest. Possible options include
120 on_poweroff, on_reboot, and on_crash.
121
122 Use --events=? to see a list of all available sub options. Complete
123 details at <http://libvirt.org/formatdomain.html#elementsEvents>
124
125 --resource OPT=VAL,[...]
126 Specify resource partitioning for the guest.
127
128 Use --resource=? to see a list of all available sub options.
129 Complete details at
130 <http://libvirt.org/formatdomain.html#resPartition>
131
132 --sysinfo OPT=VAL,[...]
133 Configure sysinfo/SMBIOS values exposed to the guest OS. '--sysinfo
134 host' can be used to expose the host's SMBIOS info to the VM,
135 otherwise values can be manually specified.
136
137 Use --sysinfo=? to see a list of all available sub options.
138 Complete details at
139 <http://libvirt.org/formatdomain.html#elementsSysinfo>
140
141 --qemu-commandline ARGS
142 Pass options directly to the qemu emulator. Only works for the
143 libvirt qemu driver. The option can take a string of arguments, for
144 example:
145
146 --qemu-commandline="-display gtk,gl=on"
147
148 Environment variables are specified with 'env', for example:
149
150 --qemu-commandline=env=DISPLAY=:0.1
151
152 Complete details about the libvirt feature:
153 <https://libvirt.org/drvqemu.html#qemucommand>
154
155 --vcpus OPTIONS
156 Number of virtual cpus to configure for the guest. If 'maxvcpus' is
157 specified, the guest will be able to hotplug up to MAX vcpus while
158 the guest is running, but will startup with VCPUS.
159
160 CPU topology can additionally be specified with sockets, cores, and
161 threads. If values are omitted, the rest will be autofilled
162 preferring sockets over cores over threads.
163
164 'cpuset' sets which physical cpus the guest can use. "CPUSET" is a
165 comma separated list of numbers, which can also be specified in
166 ranges or cpus to exclude. Example:
167
168 0,2,3,5 : Use processors 0,2,3 and 5
169 1-5,^3,8 : Use processors 1,2,4,5 and 8
170
171 If the value 'auto' is passed, virt-install attempts to
172 automatically determine an optimal cpu pinning using NUMA data, if
173 available.
174
175 Use --vcpus=? to see a list of all available sub options. Complete
176 details at
177 <http://libvirt.org/formatdomain.html#elementsCPUAllocation>
178
179 --numatune OPTIONS
180 Tune NUMA policy for the domain process. Example invocations
181
182 --numatune 1,2,3,4-7
183 --numatune 1-3,5,mode=preferred
184
185 Specifies the numa nodes to allocate memory from. This has the same
186 syntax as "--vcpus cpuset=" option. mode can be one of
187 'interleave', 'preferred', or 'strict' (the default). See 'man 8
188 numactl' for information about each mode.
189
190 Use --numatune=? to see a list of all available sub options.
191 Complete details at
192 <http://libvirt.org/formatdomain.html#elementsNUMATuning>
193
194 --memtune OPTIONS
195 Tune memory policy for the domain process. Example invocations
196
197 --memtune 1000
198 --memtune hard_limit=100,soft_limit=60,swap_hard_limit=150,min_guarantee=80
199
200 Use --memtune=? to see a list of all available sub options.
201 Complete details at
202 <http://libvirt.org/formatdomain.html#elementsMemoryTuning>
203
204 --blkiotune OPTIONS
205 Tune blkio policy for the domain process. Example invocations
206
207 --blkiotune 100
208 --blkiotune weight=100,device_path=/dev/sdc,device_weight=200
209
210 Use --blkiotune=? to see a list of all available sub options.
211 Complete details at
212 <http://libvirt.org/formatdomain.html#elementsBlockTuning>
213
214 --cpu MODEL[,+feature][,-feature][,match=MATCH][,vendor=VENDOR],...
215 Configure the CPU model and CPU features exposed to the guest. The
216 only required value is MODEL, which is a valid CPU model as known
217 to libvirt.
218
219 Libvirt's feature policy values force, require, optional, disable,
220 or forbid, or with the shorthand '+feature' and '-feature', which
221 equal 'force=feature' and 'disable=feature' respectively
222
223 Some examples:
224
225 --cpu core2duo,+x2apic,disable=vmx
226 Expose the core2duo CPU model, force enable x2apic, but do not
227 expose vmx
228
229 --cpu host
230 Expose the host CPUs configuration to the guest. This enables
231 the guest to take advantage of many of the host CPUs features
232 (better performance), but may cause issues if migrating the
233 guest to a host without an identical CPU.
234
235 --cpu host-model-only
236 Expose the nearest host CPU model configuration to the guest.
237 It is the best CPU which can be used for a guest on any of the
238 hosts.
239
240 --cpu
241 cell0.memory=1234,cell0.cpus=0-3,cell1.memory=5678,cell1.cpus=4-7
242 Example of specifying two NUMA cells. This will generate XML
243 like:
244
245 <cpu>
246 <numa>
247 <cell cpus="0-3" memory="1234"/>
248 <cell cpus="4-7" memory="5678"/>
249 </numa>
250 </cpu>
251
252 --cpu host-passthrough,cache.mode=passthrough
253 Example of passing through the host cpu's cache information.
254
255 Use --cpu=? to see a list of all available sub options. Complete
256 details at <http://libvirt.org/formatdomain.html#elementsCPU>
257
258 --cputune OPTIONS
259 Tune CPU parameters for the guest.
260
261 Configure which of the host's physical CPUs the domain VCPU will be
262 pinned to. Example invocation
263
264 --cputune vpcupin0.vcpu=0,vpcupin0.cpuset=0-3,vpcupin1.vcpu=1,vpcupin1.cpuset=4-7
265
266 Use --cputune=? to see a list of all available sub options.
267 Complete details at
268 <http://libvirt.org/formatdomain.html#elementsCPUTuning>
269
270 --security type=TYPE[,label=LABEL][,relabel=yes|no]
271 Configure domain security driver settings. Type can be either
272 'static' or 'dynamic'. 'static' configuration requires a security
273 LABEL. Specifying LABEL without TYPE implies static configuration.
274
275 To have libvirt automatically apply your static label, you must
276 specify relabel=yes. Otherwise disk images must be manually labeled
277 by the admin, including images that virt-install is asked to
278 create.
279
280 Use --security=? to see a list of all available sub options.
281 Complete details at <http://libvirt.org/formatdomain.html#seclabel>
282
283 --features FEAT=on|off,...
284 Set elements in the guests <features> XML on or off. Examples
285 include acpi, apic, eoi, privnet, and hyperv features. Some
286 examples:
287
288 --features eoi=on
289 Enable APIC PV EOI
290
291 --features hyperv_vapic=on,hyperv_spinlocks=off
292 Enable hypver VAPIC, but disable spinlocks
293
294 --features kvm_hidden=on
295 Allow the KVM hypervisor signature to be hidden from the guest
296
297 --features pvspinlock=on
298 Notify the guest that the host supports paravirtual spinlocks
299 for example by exposing the pvticketlocks mechanism.
300
301 --features gic_version=2
302 This is relevant only for ARM architectures. Possible values
303 are "host" or version number.
304
305 --features smm=on
306 This enables System Management Mode of hypervisor. Some UEFI
307 firmwares may require this feature to be present. (QEMU
308 supports SMM only with q35 machine type.)
309
310 Use --features=? to see a list of all available sub options.
311 Complete details at
312 <http://libvirt.org/formatdomain.html#elementsFeatures>
313
314 --clock offset=OFFSET,TIMER_OPT=VAL,...
315 Configure the guest's <clock> XML. Some supported options:
316
317 --clock offset=OFFSET
318 Set the clock offset, ex. 'utc' or 'localtime'
319
320 --clock TIMER_present=no
321 Disable a boolean timer. TIMER here might be hpet, kvmclock,
322 etc.
323
324 --clock TIMER_tickpolicy=VAL
325 Set a timer's tickpolicy value. TIMER here might be rtc, pit,
326 etc. VAL might be catchup, delay, etc. Refer to the libvirt
327 docs for all values.
328
329 Use --clock=? to see a list of all available sub options. Complete
330 details at <http://libvirt.org/formatdomain.html#elementsTime>
331
332 --pm OPTIONS
333 Configure guest power management features. Example suboptions
334 include suspend_to_mem=on|off and suspend_to_disk=on|off
335
336 Use --pm=? to see a list of all available sub options. Complete
337 details at
338 <http://libvirt.org/formatdomain.html#elementsPowerManagement>
339
341 -c OPTIONS
342 --cdrom OPTIONS
343 File or device used as a virtual CD-ROM device. It can be path to
344 an ISO image or a URL from which to fetch/access a minimal boot ISO
345 image. The URLs take the same format as described for the
346 "--location" argument. If a cdrom has been specified via the
347 "--disk" option, and neither "--cdrom" nor any other install option
348 is specified, the "--disk" cdrom is used as the install media.
349
350 -l LOCATION
351 --location OPTIONS
352 Distribution tree installation source. virt-install can recognize
353 certain distribution trees and fetches a bootable kernel/initrd
354 pair to launch the install.
355
356 With libvirt 0.9.4 or later, network URL installs work for remote
357 connections. virt-install will download kernel/initrd to the local
358 machine, and then upload the media to the remote host. This option
359 requires the URL to be accessible by both the local and remote
360 host.
361
362 --location allows things like --extra-args for kernel arguments,
363 and using --initrd-inject. If you want to use those options with
364 CDROM media, you have a few options:
365
366 * Run virt-install as root and do --location ISO
367
368 * Mount the ISO at a local directory, and do --location DIRECTORY
369
370 * Mount the ISO at a local directory, export that directory over
371 local http, and do --location http://localhost/DIRECTORY
372
373 The "LOCATION" can take one of the following forms:
374
375 http://host/path
376 An HTTP server location containing an installable distribution
377 image.
378
379 ftp://host/path
380 An FTP server location containing an installable distribution
381 image.
382
383 nfs:host:/path or nfs://host/path
384 An NFS server location containing an installable distribution
385 image. This requires running virt-install as root.
386
387 DIRECTORY
388 Path to a local directory containing an installable
389 distribution image. Note that the directory will not be
390 accessible by the guest after initial boot, so the OS installer
391 will need another way to access the rest of the install media.
392
393 ISO Mount the ISO and probe the directory. This requires running
394 virt-install as root, and has the same VM access caveat as
395 DIRECTORY.
396
397 Some distro specific url samples:
398
399 Fedora/Red Hat Based
400 http://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_64/os
401
402 Debian
403 http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/
404
405 Ubuntu
406 http://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/
407
408 Suse
409 http://download.opensuse.org/distribution/11.0/repo/oss/
410
411 Mandriva
412 ftp://ftp.uwsg.indiana.edu/linux/mandrake/official/2009.0/i586/
413
414 Mageia
415 ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/1
416
417 --pxe
418 Use the PXE boot protocol to load the initial ramdisk and kernel
419 for starting the guest installation process.
420
421 --import
422 Skip the OS installation process, and build a guest around an
423 existing disk image. The device used for booting is the first
424 device specified via "--disk" or "--filesystem".
425
426 --livecd
427 Specify that the installation media is a live CD and thus the guest
428 needs to be configured to boot off the CDROM device permanently. It
429 may be desirable to also use the "--disk none" flag in combination.
430
431 -x EXTRA
432 --extra-args OPTIONS
433 Additional kernel command line arguments to pass to the installer
434 when performing a guest install from "--location". One common usage
435 is specifying an anaconda kickstart file for automated installs,
436 such as --extra-args "ks=http://myserver/my.ks"
437
438 --initrd-inject PATH
439 Add PATH to the root of the initrd fetched with "--location". This
440 can be used to run an automated install without requiring a network
441 hosted kickstart file:
442
443 --initrd-inject=/path/to/my.ks --extra-args "ks=file:/my.ks"
444
445 --os-variant OS_VARIANT
446 Optimize the guest configuration for a specific operating system
447 (ex. 'fedora18', 'rhel7', 'winxp'). While not required, specifying
448 this options is HIGHLY RECOMMENDED, as it can greatly increase
449 performance by specifying virtio among other guest tweaks.
450
451 By default, virt-install will attempt to auto detect this value
452 from the install media (currently only supported for URL installs).
453 Autodetection can be disabled with the special value 'none'.
454 Autodetection can be forced with the special value 'auto'.
455
456 Use the command "osinfo-query os" to get the list of the accepted
457 OS variants.
458
459 --boot BOOTOPTS
460 Optionally specify the post-install VM boot configuration. This
461 option allows specifying a boot device order, permanently booting
462 off kernel/initrd with option kernel arguments, and enabling a BIOS
463 boot menu (requires libvirt 0.8.3 or later)
464
465 --boot can be specified in addition to other install options (such
466 as --location, --cdrom, etc.) or can be specified on its own. In
467 the latter case, behavior is similar to the --import install
468 option: there is no 'install' phase, the guest is just created and
469 launched as specified.
470
471 Some examples:
472
473 --boot cdrom,fd,hd,network,menu=on
474 Set the boot device priority as first cdrom, first floppy,
475 first harddisk, network PXE boot. Additionally enable BIOS boot
476 menu prompt.
477
478 --boot kernel=KERNEL,initrd=INITRD,kernel_args="console=/dev/ttyS0"
479 Have guest permanently boot off a local kernel/initrd pair,
480 with the specified kernel options.
481
482 --boot kernel=KERNEL,initrd=INITRD,dtb=DTB
483 Have guest permanently boot off a local kernel/initrd pair with
484 an external device tree binary. DTB can be required for some
485 non-x86 configurations like ARM or PPC
486
487 --boot loader=BIOSPATH
488 Use BIOSPATH as the virtual machine BIOS.
489
490 --boot menu=on,useserial=on
491 Enable the bios boot menu, and enable sending bios text output
492 over serial console.
493
494 --boot init=INITPATH
495 Path to a binary that the container guest will init. If a root
496 "--filesystem" has been specified, virt-install will default to
497 /sbin/init, otherwise will default to /bin/sh.
498
499 --boot uefi
500 Configure the VM to boot from UEFI. In order for virt-install
501 to know the correct UEFI parameters, libvirt needs to be
502 advertising known UEFI binaries via domcapabilities XML, so
503 this will likely only work if using properly configured distro
504 packages.
505
506 --boot
507 loader=/.../OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/.../OVMF_VARS.fd,loader_secure=no
508 Specify that the virtual machine use the custom OVMF binary as
509 boot firmware, mapped as a virtual flash chip. In addition,
510 request that libvirt instantiate the VM-specific UEFI varstore
511 from the custom "/.../OVMF_VARS.fd" varstore template. This is
512 the recommended UEFI setup, and should be used if --boot uefi
513 doesn't know about your UEFI binaries. If your UEFI firmware
514 supports Secure boot feature you can enable it via
515 loader_secure.
516
517 Use --boot=? to see a list of all available sub options. Complete
518 details at <http://libvirt.org/formatdomain.html#elementsOS>
519
520 --idmap OPTIONS
521 If the guest configuration declares a UID or GID mapping, the
522 'user' namespace will be enabled to apply these. A suitably
523 configured UID/GID mapping is a pre-requisite to make containers
524 secure, in the absence of sVirt confinement.
525
526 --idmap can be specified to enable user namespace for LXC
527 containers
528
529 Example:
530 --idmap
531 uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10
532
533 Use --idmap=? to see a list of all available sub options. Complete
534 details at
535 <http://libvirt.org/formatdomain.html#elementsOSContainer>
536
538 --disk OPTIONS
539 Specifies media to use as storage for the guest, with various
540 options. The general format of a disk string is
541
542 --disk opt1=val1,opt2=val2,...
543
544 The simplest invocation to create a new 10G disk image and
545 associated disk device:
546
547 --disk size=10
548
549 virt-install will generate a path name, and place it in the default
550 image location for the hypervisor. To specify media, the command
551 can either be:
552
553 --disk /some/storage/path[,opt1=val1]...
554
555 or explicitly specify one of the following arguments:
556
557 path
558 A path to some storage media to use, existing or not. Existing
559 media can be a file or block device.
560
561 Specifying a non-existent path implies attempting to create the
562 new storage, and will require specifying a 'size' value. Even
563 for remote hosts, virt-install will try to use libvirt storage
564 APIs to automatically create the given path.
565
566 If the hypervisor supports it, path can also be a network URL,
567 like http://example.com/some-disk.img . For network paths, they
568 hypervisor will directly access the storage, nothing is
569 downloaded locally.
570
571 pool
572 An existing libvirt storage pool name to create new storage on.
573 Requires specifying a 'size' value.
574
575 vol An existing libvirt storage volume to use. This is specified as
576 'poolname/volname'.
577
578 Other available options:
579
580 device
581 Disk device type. Value can be 'cdrom', 'disk', 'lun' or
582 'floppy'. Default is 'disk'. If a 'cdrom' is specified, and no
583 install method is chosen, the cdrom is used as the install
584 media.
585
586 boot_order
587 Guest installation with multiple disks will need this parameter
588 to boot correctly after being installed. A boot_order parameter
589 will take values 1,2,3,... Devices with lower value has higher
590 priority.
591
592 bus Disk bus type. Value can be 'ide', 'sata', 'scsi', 'usb',
593 'virtio' or 'xen'. The default is hypervisor dependent since
594 not all hypervisors support all bus types.
595
596 removable
597 Sets the removable flag (/sys/block/$dev/removable on Linux).
598 Only used with QEMU and bus=usb. Value can be 'on' or 'off'.
599
600 readonly
601 Set drive as readonly (takes 'on' or 'off')
602
603 shareable
604 Set drive as shareable (takes 'on' or 'off')
605
606 size
607 size (in GiB) to use if creating new storage
608
609 sparse
610 whether to skip fully allocating newly created storage. Value
611 is 'yes' or 'no'. Default is 'yes' (do not fully allocate)
612 unless it isn't supported by the underlying storage type.
613
614 The initial time taken to fully-allocate the guest virtual disk
615 (sparse=no) will be usually balanced by faster install times
616 inside the guest. Thus use of this option is recommended to
617 ensure consistently high performance and to avoid I/O errors in
618 the guest should the host filesystem fill up.
619
620 backing_store
621 Path to a disk to use as the backing store for the newly
622 created image.
623
624 backing_format
625 Disk image format of backing_store
626
627 cache
628 The cache mode to be used. The host pagecache provides cache
629 memory. The cache value can be 'none', 'writethrough',
630 'directsync', 'unsafe' or 'writeback'. 'writethrough' provides
631 read caching. 'writeback' provides read and write caching.
632 'directsync' bypasses the host page cache. 'unsafe' may cache
633 all content and ignore flush requests from the guest.
634
635 discard
636 Whether discard (also known as "trim" or "unmap") requests are
637 ignored or passed to the filesystem. The value can be either
638 "unmap" (allow the discard request to be passed) or "ignore"
639 (ignore the discard request). Since 1.0.6 (QEMU and KVM only)
640
641 format
642 Disk image format. For file volumes, this can be 'raw',
643 'qcow2', 'vmdk', etc. See format types in
644 <http://libvirt.org/storage.html> for possible values. This is
645 often mapped to the driver_type value as well.
646
647 If not specified when creating file images, this will default
648 to 'qcow2'.
649
650 If creating storage, this will be the format of the new image.
651 If using an existing image, this overrides libvirt's format
652 auto-detection.
653
654 driver_name
655 Driver name the hypervisor should use when accessing the
656 specified storage. Typically does not need to be set by the
657 user.
658
659 driver_type
660 Driver format/type the hypervisor should use when accessing the
661 specified storage. Typically does not need to be set by the
662 user.
663
664 io Disk IO backend. Can be either "threads" or "native".
665
666 error_policy
667 How guest should react if a write error is encountered. Can be
668 one of "stop", "ignore", or "enospace"
669
670 serial
671 Serial number of the emulated disk device. This is used in
672 linux guests to set /dev/disk/by-id symlinks. An example serial
673 number might be: WD-WMAP9A966149
674
675 startup_policy
676 It defines what to do with the disk if the source file is not
677 accessible. See possible values in
678 <http://www.libvirt.org/formatdomain.html#elementsDisks>,
679 "startupPolicy" attribute of the <disk> element
680
681 snapshot_policy
682 Defines default behavior of the disk during disk snapshots.
683 See possible values in
684 <http://www.libvirt.org/formatdomain.html#elementsDisks>,
685 "snapshot" attribute of the <disk> element.
686
687 See the examples section for some uses. This option deprecates
688 -f/--file, -s/--file-size, --nonsparse, and --nodisks.
689
690 Use --disk=? to see a list of all available sub options. Complete
691 details at <http://libvirt.org/formatdomain.html#elementsDisks>
692
693 --filesystem
694 Specifies a directory on the host to export to the guest. The most
695 simple invocation is:
696
697 --filesystem /source/on/host,/target/point/in/guest
698
699 Which will work for recent QEMU and linux guest OS or LXC
700 containers. For QEMU, the target point is just a mounting hint in
701 sysfs, so will not be automatically mounted.
702
703 The following explicit options can be specified:
704
705 type
706 The type or the source directory. Valid values are 'mount' (the
707 default) or 'template' for OpenVZ templates.
708
709 mode
710 The access mode for the source directory from the guest OS.
711 Only used with QEMU and type=mount. Valid modes are
712 'passthrough' (the default), 'mapped', or 'squash'. See libvirt
713 domain XML documentation for more info.
714
715 source
716 The directory on the host to share.
717
718 target
719 The mount location to use in the guest.
720
721 Use --filesystem=? to see a list of all available sub options.
722 Complete details at
723 <http://libvirt.org/formatdomain.html#elementsFilesystems>
724
726 -w OPTIONS
727 --network OPTIONS
728 Connect the guest to the host network. The value for "NETWORK" can
729 take one of 4 formats:
730
731 bridge=BRIDGE
732 Connect to a bridge device in the host called "BRIDGE". Use
733 this option if the host has static networking config & the
734 guest requires full outbound and inbound connectivity to/from
735 the LAN. Also use this if live migration will be used with this
736 guest.
737
738 network=NAME
739 Connect to a virtual network in the host called "NAME". Virtual
740 networks can be listed, created, deleted using the "virsh"
741 command line tool. In an unmodified install of "libvirt" there
742 is usually a virtual network with a name of "default". Use a
743 virtual network if the host has dynamic networking (eg
744 NetworkManager), or using wireless. The guest will be NATed to
745 the LAN by whichever connection is active.
746
747 type=direct,source=IFACE[,source_mode=MODE]
748 Direct connect to host interface IFACE using macvtap.
749
750 user
751 Connect to the LAN using SLIRP. Only use this if running a QEMU
752 guest as an unprivileged user. This provides a very limited
753 form of NAT.
754
755 none
756 Tell virt-install not to add any default network interface.
757
758 If this option is omitted a single NIC will be created in the
759 guest. If there is a bridge device in the host with a physical
760 interface enslaved, that will be used for connectivity. Failing
761 that, the virtual network called "default" will be used. This
762 option can be specified multiple times to setup more than one NIC.
763
764 Other available options are:
765
766 model
767 Network device model as seen by the guest. Value can be any nic
768 model supported by the hypervisor, e.g.: 'e1000', 'rtl8139',
769 'virtio', ...
770
771 mac Fixed MAC address for the guest; If this parameter is omitted,
772 or the value "RANDOM" is specified a suitable address will be
773 randomly generated. For Xen virtual machines it is required
774 that the first 3 pairs in the MAC address be the sequence
775 '00:16:3e', while for QEMU or KVM virtual machines it must be
776 '52:54:00'.
777
778 filterref
779 Controlling firewall and network filtering in libvirt. Value
780 can be any nwfilter defined by the "virsh" 'nwfilter'
781 subcommands. Available filters can be listed by running 'virsh
782 nwfilter-list', e.g.: 'clean-traffic', 'no-mac-spoofing', ...
783
784 virtualport_type
785 The type of virtual port profile, one the following values
786
787 "802.Qbg"
788 The following additional parameters are accepted
789
790 virtualport_managerid
791 The VSI Manager ID identifies the database containing
792 the VSI type and instance definitions. This is an
793 integer value and the value 0 is reserved.
794
795 virtualport_typeid
796 The VSI Type ID identifies a VSI type characterizing
797 the network access. VSI types are typically managed by
798 network administrator. This is an integer value.
799
800 virtualport_typeidversion
801 The VSI Type Version allows multiple versions of a VSI
802 Type. This is an integer value.
803
804 virtualport_instanceid
805 The VSI Instance ID Identifier is generated when a VSI
806 instance (i.e. a virtual interface of a virtual
807 machine) is created. This is a globally unique
808 identifier.
809
810 "802.Qbh"
811 The following additional parameters are accepted
812
813 virtualport_profileid
814 The profile ID contains the name of the port profile
815 that is to be applied to this interface. This name is
816 resolved by the port profile database into the network
817 parameters from the port profile, and those network
818 parameters will be applied to this interface.
819
820 "openvswitch"
821 The following additional parameters are accepted
822
823 virtualport_profileid
824 The OpenVSwitch port profile for the interface
825
826 virtualport_interfaceid
827 A UUID to uniquely identify the interface. If omitted
828 one will be generated automatically
829
830 "midonet"
831 The following additional parameters are accepted
832
833 virtualport_interfaceid
834 A UUID identifying the port in the network to which the
835 interface will be bound
836
837 Use --network=? to see a list of all available sub options.
838 Complete details at
839 <http://libvirt.org/formatdomain.html#elementsNICS>
840
841 This option deprecates -m/--mac, -b/--bridge, and --nonetworks
842
844 If no graphics option is specified, "virt-install" will try to select
845 the appropriate graphics if the DISPLAY environment variable is set,
846 otherwise '--graphics none' is used.
847
848 --graphics TYPE,opt1=arg1,opt2=arg2,...
849 Specifies the graphical display configuration. This does not
850 configure any virtual hardware, just how the guest's graphical
851 display can be accessed. Typically the user does not need to
852 specify this option, virt-install will try and choose a useful
853 default, and launch a suitable connection.
854
855 General format of a graphical string is
856
857 --graphics TYPE,opt1=arg1,opt2=arg2,...
858
859 For example:
860
861 --graphics vnc,password=foobar
862
863 The supported options are:
864
865 type
866 The display type. This is one of:
867
868 vnc
869
870 Setup a virtual console in the guest and export it as a VNC
871 server in the host. Unless the "port" parameter is also
872 provided, the VNC server will run on the first free port number
873 at 5900 or above. The actual VNC display allocated can be
874 obtained using the "vncdisplay" command to "virsh" (or
875 virt-viewer(1) can be used which handles this detail for the
876 use).
877
878 spice
879
880 Export the guest's console using the Spice protocol. Spice
881 allows advanced features like audio and USB device streaming,
882 as well as improved graphical performance.
883
884 Using spice graphic type will work as if those arguments were
885 given:
886
887 --video qxl --channel spicevmc
888
889 none
890
891 No graphical console will be allocated for the guest. Guests
892 will likely need to have a text console configured on the first
893 serial port in the guest (this can be done via the --extra-args
894 option). The command 'virsh console NAME' can be used to
895 connect to the serial device.
896
897 port
898 Request a permanent, statically assigned port number for the
899 guest console. This is used by 'vnc' and 'spice'
900
901 tlsport
902 Specify the spice tlsport.
903
904 listen
905 Address to listen on for VNC/Spice connections. Default is
906 typically 127.0.0.1 (localhost only), but some hypervisors
907 allow changing this globally (for example, the qemu driver
908 default can be changed in /etc/libvirt/qemu.conf). Use 0.0.0.0
909 to allow access from other machines.
910
911 Use 'none' to specify that the display server should not listen
912 on any port. The display server can be accessed only locally
913 through libvirt unix socket (virt-viewer with --attach for
914 instance).
915
916 Use 'socket' to have the VM listen on a libvirt generated unix
917 socket path on the host filesystem.
918
919 This is used by 'vnc' and 'spice'
920
921 keymap
922 Request that the virtual console be configured to run with a
923 specific keyboard layout. If the special value 'local' is
924 specified, virt-install will attempt to configure to use the
925 same keymap as the local system. A value of 'none' specifically
926 defers to the hypervisor. Default behavior is hypervisor
927 specific, but typically is the same as 'local'. This is used by
928 'vnc' and 'spice'.
929
930 password
931 Request a console password, required at connection time.
932 Beware, this info may end up in virt-install log files, so
933 don't use an important password. This is used by 'vnc' and
934 'spice'
935
936 gl Whether to use OpenGl accelerated rendering. Value is 'yes' or
937 'no'. This is used by 'spice'.
938
939 rendernode
940 DRM render node path to use. This is used when 'gl' is enabled.
941
942 Use --graphics=? to see a list of all available sub options.
943 Complete details at
944 <http://libvirt.org/formatdomain.html#elementsGraphics>
945
946 This deprecates the following options: --vnc, --vncport,
947 --vnclisten, -k/--keymap, --sdl, --nographics
948
949 --noautoconsole
950 Don't automatically try to connect to the guest console. The
951 default behaviour is to launch virt-viewer(1) to display the
952 graphical console, or to run the "virsh" "console" command to
953 display the text console. Use of this parameter will disable this
954 behaviour.
955
957 Options to override the default virtualization type choices.
958
959 -v
960 --hvm
961 Request the use of full virtualization, if both para & full
962 virtualization are available on the host. This parameter may not be
963 available if connecting to a Xen hypervisor on a machine without
964 hardware virtualization support. This parameter is implied if
965 connecting to a QEMU based hypervisor.
966
967 -p
968 --paravirt
969 This guest should be a paravirtualized guest. If the host supports
970 both para & full virtualization, and neither this parameter nor the
971 "--hvm" are specified, this will be assumed.
972
973 --container
974 This guest should be a container type guest. This option is only
975 required if the hypervisor supports other guest types as well (so
976 for example this option is the default behavior for LXC and OpenVZ,
977 but is provided for completeness).
978
979 --virt-type
980 The hypervisor to install on. Example choices are kvm, qemu, or
981 xen. Available options are listed via 'virsh capabilities' in the
982 <domain> tags.
983
984 This deprecates the --accelerate option, which is now the default
985 behavior. To install a plain QEMU guest, use '--virt-type qemu'
986
988 All devices have a set of address.* options for configuring the
989 particulars of the device's address on its parent controller or bus.
990 See "http://libvirt.org/formatdomain.html#elementsAddress" for details.
991
992 --controller OPTIONS
993 Attach a controller device to the guest. TYPE is one of: ide, fdc,
994 scsi, sata, virtio-serial, or usb.
995
996 Controller also supports the special values usb2 and usb3 to
997 specify which version of the USB controller should be used (version
998 2 or 3).
999
1000 model
1001 Controller model. These may vary according to the hypervisor
1002 and its version. Most commonly used models are e.g. auto,
1003 virtio-scsi for the scsi controller, ehci or none for the usb
1004 controller. For full list and further details on
1005 controllers/models, see
1006 "http://libvirt.org/formatdomain.html#elementsControllers".
1007
1008 address
1009 Shorthand for setting a manual PCI address from an lscpi style
1010 string. The preferred method for setting this is using the
1011 address.* parameters.
1012
1013 index
1014 A decimal integer describing in which order the bus controller
1015 is encountered, and to reference the controller bus.
1016
1017 master
1018 Applicable to USB companion controllers, to define the master
1019 bus startport.
1020
1021 Examples:
1022
1023 --controller usb,model=ich9-ehci1,address=0:0:4.0,index=0
1024 Adds a ICH9 EHCI1 USB controller on PCI address 0:0:4.0
1025
1026 --controller usb,model=ich9-uhci2,address=0:0:4.7,index=0,master=2
1027 Adds a ICH9 UHCI2 USB companion controller for the previous
1028 master controller, ports start from port number 2.
1029
1030 The parameter multifunction='on' will be added automatically to
1031 the proper device (if needed). This applies to all PCI
1032 devices.
1033
1034 Use --controller=? to see a list of all available sub options.
1035 Complete details at
1036 <http://libvirt.org/formatdomain.html#elementsControllers>
1037
1038 --input OPTIONS
1039 Attach an input device to the guest. Example input device types are
1040 mouse, tablet, or keyboard.
1041
1042 Use --input=? to see a list of all available sub options. Complete
1043 details at <http://libvirt.org/formatdomain.html#elementsInput>
1044
1045 --hostdev OPTIONS
1046 --host-device OPTIONS
1047 Attach a physical host device to the guest. Some example values for
1048 HOSTDEV:
1049
1050 --hostdev pci_0000_00_1b_0
1051 A node device name via libvirt, as shown by 'virsh
1052 nodedev-list'
1053
1054 --hostdev 001.003
1055 USB by bus, device (via lsusb).
1056
1057 --hostdev 0x1234:0x5678
1058 USB by vendor, product (via lsusb).
1059
1060 --hostdev 1f.01.02
1061 PCI device (via lspci).
1062
1063 Use --hostdev=? to see a list of all available sub options.
1064 Complete details at
1065 <http://libvirt.org/formatdomain.html#elementsHostDev>
1066
1067 --sound MODEL
1068 Attach a virtual audio device to the guest. MODEL specifies the
1069 emulated sound card model. Possible values are ich6, ich9, ac97,
1070 es1370, sb16, pcspk, or default. 'default' will try to pick the
1071 best model that the specified OS supports.
1072
1073 This deprecates the old --soundhw option.
1074
1075 Use --sound=? to see a list of all available sub options. Complete
1076 details at <http://libvirt.org/formatdomain.html#elementsSound>
1077
1078 --watchdog MODEL[,action=ACTION]
1079 Attach a virtual hardware watchdog device to the guest. This
1080 requires a daemon and device driver in the guest. The watchdog
1081 fires a signal when the virtual machine appears to hung. ACTION
1082 specifies what libvirt will do when the watchdog fires. Values are
1083
1084 reset
1085 Forcefully reset the guest (the default)
1086
1087 poweroff
1088 Forcefully power off the guest
1089
1090 pause
1091 Pause the guest
1092
1093 none
1094 Do nothing
1095
1096 shutdown
1097 Gracefully shutdown the guest (not recommended, since a hung
1098 guest probably won't respond to a graceful shutdown)
1099
1100 MODEL is the emulated device model: either i6300esb (the default)
1101 or ib700. Some examples:
1102
1103 Use the recommended settings:
1104
1105 --watchdog default
1106
1107 Use the i6300esb with the 'poweroff' action
1108
1109 --watchdog i6300esb,action=poweroff
1110
1111 Use --watchdog=? to see a list of all available sub options.
1112 Complete details at
1113 <http://libvirt.org/formatdomain.html#elementsWatchdog>
1114
1115 --parallel OPTIONS
1116 --serial OPTIONS
1117 Specifies a serial device to attach to the guest, with various
1118 options. The general format of a serial string is
1119
1120 --serial type,opt1=val1,opt2=val2,...
1121
1122 --serial and --parallel devices share all the same options, unless
1123 otherwise noted. Some of the types of character device redirection
1124 are:
1125
1126 --serial pty
1127 Pseudo TTY. The allocated pty will be listed in the running
1128 guests XML description.
1129
1130 --serial dev,path=HOSTPATH
1131 Host device. For serial devices, this could be /dev/ttyS0. For
1132 parallel devices, this could be /dev/parport0.
1133
1134 --serial file,path=FILENAME
1135 Write output to FILENAME.
1136
1137 --serial pipe,path=PIPEPATH
1138 Named pipe (see pipe(7))
1139
1140 --serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL
1141 TCP net console. MODE is either 'bind' (wait for connections on
1142 HOST:PORT) or 'connect' (send output to HOST:PORT), default is
1143 'bind'. HOST defaults to '127.0.0.1', but PORT is required.
1144 PROTOCOL can be either 'raw' or 'telnet' (default 'raw'). If
1145 'telnet', the port acts like a telnet server or client. Some
1146 examples:
1147
1148 Wait for connections on any address, port 4567:
1149
1150 --serial tcp,host=0.0.0.0:4567
1151
1152 Connect to localhost, port 1234:
1153
1154 --serial tcp,host=:1234,mode=connect
1155
1156 Wait for telnet connection on localhost, port 2222. The user
1157 could then connect interactively to this console via 'telnet
1158 localhost 2222':
1159
1160 --serial tcp,host=:2222,mode=bind,protocol=telnet
1161
1162 --serial udp,host=CONNECT_HOST:PORT,bind_host=BIND_HOST:BIND_PORT
1163 UDP net console. HOST:PORT is the destination to send output to
1164 (default HOST is '127.0.0.1', PORT is required).
1165 BIND_HOST:BIND_PORT is the optional local address to bind to
1166 (default BIND_HOST is 127.0.0.1, but is only set if BIND_PORT
1167 is specified). Some examples:
1168
1169 Send output to default syslog port (may need to edit
1170 /etc/rsyslog.conf accordingly):
1171
1172 --serial udp,host=:514
1173
1174 Send output to remote host 192.168.10.20, port 4444 (this
1175 output can be read on the remote host using 'nc -u -l 4444'):
1176
1177 --serial udp,host=192.168.10.20:4444
1178
1179 --serial unix,path=UNIXPATH,mode=MODE
1180 Unix socket, see unix(7). MODE has similar behavior and
1181 defaults as --serial tcp,mode=MODE
1182
1183 Use --serial=? or --parallel=? to see a list of all available sub
1184 options. Complete details at
1185 <http://libvirt.org/formatdomain.html#elementsCharSerial> and
1186 <http://libvirt.org/formatdomain.html#elementsCharParallel>
1187
1188 --channel
1189 Specifies a communication channel device to connect the guest and
1190 host machine. This option uses the same options as --serial and
1191 --parallel for specifying the host/source end of the channel. Extra
1192 'target' options are used to specify how the guest machine sees the
1193 channel.
1194
1195 Some of the types of character device redirection are:
1196
1197 --channel SOURCE,target_type=guestfwd,target_address=HOST:PORT
1198 Communication channel using QEMU usermode networking stack. The
1199 guest can connect to the channel using the specified HOST:PORT
1200 combination.
1201
1202 --channel SOURCE,target_type=virtio[,name=NAME]
1203 Communication channel using virtio serial (requires 2.6.34 or
1204 later host and guest). Each instance of a virtio --channel line
1205 is exposed in the guest as /dev/vport0p1, /dev/vport0p2, etc.
1206 NAME is optional metadata, and can be any string, such as
1207 org.linux-kvm.virtioport1. If specified, this will be exposed
1208 in the guest at /sys/class/virtio-ports/vport0p1/NAME
1209
1210 --channel spicevmc,target_type=virtio[,name=NAME]
1211 Communication channel for QEMU spice agent, using virtio serial
1212 (requires 2.6.34 or later host and guest). NAME is optional
1213 metadata, and can be any string, such as the default
1214 com.redhat.spice.0 that specifies how the guest will see the
1215 channel.
1216
1217 Use --channel=? to see a list of all available sub options.
1218 Complete details at
1219 <http://libvirt.org/formatdomain.html#elementsCharChannel>
1220
1221 --console
1222 Connect a text console between the guest and host. Certain guest
1223 and hypervisor combinations can automatically set up a getty in the
1224 guest, so an out of the box text login can be provided
1225 (target_type=xen for xen paravirt guests, and possibly
1226 target_type=virtio in the future).
1227
1228 Example:
1229
1230 --console pty,target_type=virtio
1231 Connect a virtio console to the guest, redirected to a PTY on
1232 the host. For supported guests, this exposes /dev/hvc0 in the
1233 guest. See http://fedoraproject.org/wiki/Features/VirtioSerial
1234 for more info. virtio console requires libvirt 0.8.3 or later.
1235
1236 Use --console=? to see a list of all available sub options.
1237 Complete details at
1238 <http://libvirt.org/formatdomain.html#elementsCharConsole>
1239
1240 --video OPTIONS
1241 Specify what video device model will be attached to the guest.
1242 Valid values for VIDEO are hypervisor specific, but some options
1243 for recent kvm are cirrus, vga, qxl, virtio, or vmvga (vmware).
1244
1245 Use --video=? to see a list of all available sub options. Complete
1246 details at <http://libvirt.org/formatdomain.html#elementsVideo>
1247
1248 --smartcard MODE[,OPTIONS]
1249 Configure a virtual smartcard device.
1250
1251 Mode is one of host, host-certificates, or passthrough. Additional
1252 options are:
1253
1254 type
1255 Character device type to connect to on the host. This is only
1256 applicable for passthrough mode.
1257
1258 An example invocation:
1259
1260 --smartcard passthrough,type=spicevmc
1261 Use the smartcard channel of a SPICE graphics device to pass
1262 smartcard info to the guest
1263
1264 Use --smartcard=? to see a list of all available sub options.
1265 Complete details at
1266 <http://libvirt.org/formatdomain.html#elementsSmartcard>
1267
1268 --redirdev BUS[,OPTIONS]
1269 Add a redirected device.
1270
1271 type
1272 The redirection type, currently supported is tcp or spicevmc.
1273
1274 server
1275 The TCP server connection details, of the form 'server:port'.
1276
1277 Examples of invocation:
1278
1279 --redirdev usb,type=tcp,server=localhost:4000
1280 Add a USB redirected device provided by the TCP server on
1281 'localhost' port 4000.
1282
1283 --redirdev usb,type=spicevmc
1284 Add a USB device redirected via a dedicated Spice channel.
1285
1286 Use --redirdev=? to see a list of all available sub options.
1287 Complete details at
1288 <http://libvirt.org/formatdomain.html#elementsRedir>
1289
1290 --memballoon MODEL
1291 Attach a virtual memory balloon device to the guest. If the
1292 memballoon device needs to be explicitly disabled, MODEL='none' is
1293 used.
1294
1295 MODEL is the type of memballoon device provided. The value can be
1296 'virtio', 'xen' or 'none'. Some examples:
1297
1298 Use the recommended settings:
1299
1300 --memballoon virtio
1301
1302 Do not use memballoon device:
1303
1304 --memballoon none
1305
1306 Use --memballoon=? to see a list of all available sub options.
1307 Complete details at
1308 <http://libvirt.org/formatdomain.html#elementsMemBalloon>
1309
1310 --tpm TYPE[,OPTIONS]
1311 Configure a virtual TPM device.
1312
1313 Type must be passthrough. Additional options are:
1314
1315 model
1316 The device model to present to the guest operating system.
1317 Model must be tpm-tis.
1318
1319 An example invocation:
1320
1321 --tpm passthrough,model=tpm-tis
1322 Make the host's TPM accessible to a single guest.
1323
1324 --tpm /dev/tpm
1325 Convenience option for passing through the hosts TPM.
1326
1327 Use --tpm=? to see a list of all available sub options. Complete
1328 details at <http://libvirt.org/formatdomain.html#elementsTpm>
1329
1330 --rng TYPE[,OPTIONS]
1331 Configure a virtual RNG device.
1332
1333 Type can be random or egd.
1334
1335 If the specified type is random then these values must be
1336 specified:
1337
1338 backend_device
1339 The device to use as a source of entropy.
1340
1341 Whereas, when the type is egd, these values must be provided:
1342
1343 backend_host
1344 Specify the host of the Entropy Gathering Daemon to connect to.
1345
1346 backend_service
1347 Specify the port of the Entropy Gathering Daemon to connect to.
1348
1349 backend_type
1350 Specify the type of the connection: tcp or udp.
1351
1352 backend_mode
1353 Specify the mode of the connection. It is either 'bind' (wait
1354 for connections on HOST:PORT) or 'connect' (send output to
1355 HOST:PORT).
1356
1357 backend_connect_host
1358 Specify the remote host to connect to when the specified
1359 backend_type is udp and backend_mode is bind.
1360
1361 backend_connect_service
1362 Specify the remote service to connect to when the specified
1363 backend_type is udp and backend_mode is bind.
1364
1365 An example invocation:
1366
1367 --rng
1368 egd,backend_host=localhost,backend_service=8000,backend_type=tcp
1369 Connect to localhost to the TCP port 8000 to get entropy data.
1370
1371 --rng /dev/random
1372 Use the /dev/random device to get entropy data, this form
1373 implicitly uses the "random" model.
1374
1375 Use --rng=? to see a list of all available sub options.
1376 Complete details at
1377 <http://libvirt.org/formatdomain.html#elementsRng>
1378
1379 --panic MODEL[,OPTS]
1380 Attach a panic notifier device to the guest. For the recommended
1381 settings, use:
1382
1383 --panic default
1384
1385 Use --panic=? to see a list of all available sub options. Complete
1386 details at <http://libvirt.org/formatdomain.html#elementsPanic>
1387
1388 --memdev OPTS
1389 Add a memory module to a guest which can be hotunplugged. To add a
1390 memdev you need to configure hotplugmemory and NUMA for a guest.
1391
1392 Use --memdev=? to see a list of all available sub options. Complete
1393 details at <http://libvirt.org/formatdomain.html#elementsMemory>.
1394
1396 -h
1397 --help
1398 Show the help message and exit
1399
1400 --version
1401 Show program's version number and exit
1402
1403 --autostart
1404 Set the autostart flag for a domain. This causes the domain to be
1405 started on host boot up.
1406
1407 --transient
1408 Use --import or --boot and --transient if you want a transient
1409 libvirt VM. These VMs exist only until the domain is shut down or
1410 the host server is restarted. Libvirt forgets the XML
1411 configuration of the VM after either of these events. Note that
1412 the VM's disks will not be deleted. See:
1413 <http://wiki.libvirt.org/page/VM_lifecycle#Transient_guest_domains_vs_Persistent_guest_domains>
1414
1415 --print-xml [STEP]
1416 Print the generated XML of the guest, instead of defining it. By
1417 default this WILL do storage creation (can be disabled with
1418 --dry-run). This option implies --quiet.
1419
1420 If the VM install has multiple phases, by default this will print
1421 all generated XML. If you want to print a particular step, use
1422 --print-xml 2 (for the second phase XML).
1423
1424 --noreboot
1425 Prevent the domain from automatically rebooting after the install
1426 has completed.
1427
1428 --wait WAIT
1429 Amount of time to wait (in minutes) for a VM to complete its
1430 install. Without this option, virt-install will wait for the
1431 console to close (not necessarily indicating the guest has
1432 shutdown), or in the case of --noautoconsole, simply kick off the
1433 install and exit. Any negative value will make virt-install wait
1434 indefinitely, a value of 0 triggers the same results as
1435 noautoconsole. If the time limit is exceeded, virt-install simply
1436 exits, leaving the virtual machine in its current state.
1437
1438 --dry-run
1439 Proceed through the guest creation process, but do NOT create
1440 storage devices, change host device configuration, or actually
1441 teach libvirt about the guest. virt-install may still fetch
1442 install media, since this is required to properly detect the OS to
1443 install.
1444
1445 --check
1446 Enable or disable some validation checks. Some examples are warning
1447 about using a disk that's already assigned to another VM (--check
1448 path_in_use=on|off), or warning about potentially running out of
1449 space during disk allocation (--check disk_size=on|off). Most
1450 checks are performed by default.
1451
1452 -q
1453 --quiet
1454 Only print fatal error messages.
1455
1456 -d
1457 --debug
1458 Print debugging information to the terminal when running the
1459 install process. The debugging information is also stored in
1460 "~/.cache/virt-manager/virt-install.log" even if this parameter is
1461 omitted.
1462
1464 Install a Fedora 9 plain QEMU guest, using LVM partition, virtual
1465 networking, booting from PXE, using VNC server/viewer, with virtio-scsi
1466 disk
1467
1468 # virt-install \
1469 --connect qemu:///system \
1470 --name demo \
1471 --memory 500 \
1472 --disk path=/dev/HostVG/DemoVM,bus=scsi \
1473 --controller virtio-scsi \
1474 --network network=default \
1475 --virt-type qemu \
1476 --graphics vnc \
1477 --os-variant fedora9
1478
1479 Run a Live CD image under Xen fullyvirt, in diskless environment
1480
1481 # virt-install \
1482 --hvm \
1483 --name demo \
1484 --memory 500 \
1485 --disk none \
1486 --livecd \
1487 --graphics vnc \
1488 --cdrom /root/fedora7live.iso
1489
1490 Run /usr/bin/httpd in a linux container guest (LXC). Resource usage is
1491 capped at 512 MiB of ram and 2 host cpus:
1492
1493 # virt-install \
1494 --connect lxc:/// \
1495 --name httpd_guest \
1496 --memory 512 \
1497 --vcpus 2 \
1498 --init /usr/bin/httpd
1499
1500 Start a linux container guest(LXC) with a private root filesystem,
1501 using /bin/sh as init. Container's root will be under host dir
1502 /home/LXC. The host dir "/home/test" will be mounted at "/mnt" dir
1503 inside container:
1504
1505 # virt-install \
1506 --connect lxc:/// \
1507 --name container \
1508 --memory 128 \
1509 --filesystem /home/LXC,/ \
1510 --filesystem /home/test,/mnt \
1511 --init /bin/sh
1512
1513 Install a paravirtualized Xen guest, 500 MiB of RAM, a 5 GiB of disk,
1514 and Fedora Core 6 from a web server, in text-only mode, with old style
1515 --file options:
1516
1517 # virt-install \
1518 --paravirt \
1519 --name demo \
1520 --memory 500 \
1521 --disk /var/lib/xen/images/demo.img,size=6 \
1522 --graphics none \
1523 --location http://download.fedora.redhat.com/pub/fedora/linux/core/6/x86_64/os/
1524
1525 Create a guest from an existing disk image 'mydisk.img' using defaults
1526 for the rest of the options.
1527
1528 # virt-install \
1529 --name demo \
1530 --memory 512 \
1531 --disk /home/user/VMs/mydisk.img \
1532 --import
1533
1534 Start serial QEMU ARM VM, which requires specifying a manual kernel.
1535
1536 # virt-install \
1537 --name armtest \
1538 --memory 1024 \
1539 --arch armv7l --machine vexpress-a9 \
1540 --disk /home/user/VMs/myarmdisk.img \
1541 --boot kernel=/tmp/my-arm-kernel,initrd=/tmp/my-arm-initrd,dtb=/tmp/my-arm-dtb,kernel_args="console=ttyAMA0 rw root=/dev/mmcblk0p3" \
1542 --graphics none
1543
1545 Please see http://virt-manager.org/page/BugReporting
1546
1548 Copyright (C) Red Hat, Inc, and various contributors. This is free
1549 software. You may redistribute copies of it under the terms of the GNU
1550 General Public License "http://www.gnu.org/licenses/gpl.html". There is
1551 NO WARRANTY, to the extent permitted by law.
1552
1554 virsh(1), "virt-clone(1)", "virt-manager(1)", the project website
1555 "http://virt-manager.org"
1556
1557
1558
15591.5.0 2018-10-30 VIRT-INSTALL(1)