Virt-install: Difference between revisions
(→--boot) |
|||
Line 89: | Line 89: | ||
Installation source (eg, nfs:host:/path, | Installation source (eg, nfs:host:/path, | ||
http://host/path, ftp://host/path) | http://host/path, ftp://host/path) | ||
===Optional Installation Method Option=== | |||
====--boot==== | ====--boot==== | ||
Line 107: | Line 103: | ||
--boot init=/sbin/init | --boot init=/sbin/init | ||
</pre> | </pre> | ||
====--pxe==== | |||
Boot from the network using the PXE protocol. | |||
====--import==== | |||
Build guest around an existing disk image. | |||
====--extra-args===== | |||
<tt>--extra-args EXTRA_ARGS</tt> Additional arguments to pass to the install kernel booted from [[#--location|--location]]. | |||
=Optional Configuration= | =Optional Configuration= |
Revision as of 22:32, 26 June 2017
External
Internal
Overview
virt-install is a command-line utility for provisioning new virtual machines. It comes as part of the "virt-install" RPM package.
virt-install needs root privileges to work.
Documentation
virt-install --help
Mandatory Options
Guest Virtual Machine Name
The name of the guest virtual machine must be specified with --name
Memory Amount
virt-install needs the amount of memory allocated to the guest, in MiB, which must be specified with --memory.
Guest Storage Specification
One of the following must be specified:
--disk
Specifies guest storage, relative to the storage provided by the virtualization host. The most common option is to refer storage from a storage pool, but other options are also available.
--disk size=10
Specified a new 10 GiB image on the default storage pool.
--disk /storage-pool-path/volume-path,cache=none
--disk device=cdrom,bus=scsi
--disk=?
--nodisks
Installation Method Option
--os-type
The quest operating system type.
Example:
--os-type=linux
--os-variant
This is an important option, used to optimize guest configuration. Valid "--os-variant" values can be obtained with osinfo-query os command
Example:
--os-variant=rhel7.3
--cdrom CDROM CD-ROM installation media -l LOCATION, --location LOCATION Installation source (eg, nfs:host:/path, http://host/path, ftp://host/path)
Optional Installation Method Option
--boot
--boot BOOT_OPTS is used to configure guest boot settings:
--boot hd,cdrom,menu=on
--boot init=/sbin/init
--pxe
Boot from the network using the PXE protocol.
--import
Build guest around an existing disk image.
--extra-args=
--extra-args EXTRA_ARGS Additional arguments to pass to the install kernel booted from --location.
Optional Configuration
Network Specification
The network specification is optional, if not defined, a ? will be configured on the guest. Otherwise, it can be specified with '--network NETWORK-SPEC', as follows:
TODO
--network bridge=mybr0
If using a bridge, the bridge must be previously created, as described here Bridged Networking Configuration.
--network network=my_libvirt_virtual_net
--network network=mynet,model=virtio,mac=00:11..
--network none
Virtualization Platform Options
-v, --hvm
This guest should be a fully virtualized guest.
-p, --paravirt
This guest should be a paravirtualized guest.
--container
This guest should be a container guest.
--virt-type
Represents the hypervisor name to use ("kvm", "qemu", "xen", etc.)
--vcpus
Access to a Host Directory
"--filesystem" can be used to specify a host directory to be available on the guest.
Example:
--filesystem /my/host/source/dir,/dir/in/guest