Provided by: virtinst_0.500.1-2ubuntu6_all bug


       virt-install - provision new virtual machines


       virt-install [OPTION]...


       virt-install is a command line tool for provisioning new virtual
       machines using the "libvirt" hypervisor management library. The tool
       supports both text based & graphical installations, using serial
       console, SDL graphics or a VNC client/server pair. The guest can be
       configured to use one or more virtual disks, network interfaces, audio
       devices, and physical host devices (USB, PCI).

       The installation media can be held locally or remotely on NFS, HTTP,
       FTP servers. In the latter case "virt-install" will fetch the minimal
       files necessary to kick off the installation process, allowing the
       guest to fetch the rest of the OS distribution as needed. PXE booting,
       and importing an existing disk image (thus skipping the install phase)
       are also supported.

       Given suitable command line arguments, "virt-install" is capable of
       running completely unattended, with the guest ’kickstarting’ itself
       too. This allows for easy automation of guest installs. An interactive
       mode is also available with the --prompt option, but this will only ask
       for the minimum required options.


       Most options are not required. Minimum requirements are --name, --ram,
       guest storage (--disk or --nodisks), and an install option.

       -h, --help
         Show the help message and exit

         Connect to a non-default hypervisor. The default connection is chosen
         based on the following rules:

         xen If running on a host with the Xen kernel (checks against

             If running on a bare metal kernel as root (needed for KVM

             If running on a bare metal kernel as non-root

             It is only necessary to provide the "--connect" argument if this
             default prioritization is incorrect, eg if wanting to use QEMU
             while on a Xen kernel.

       General Options

       General configuration parameters that apply to all types of guest

       -n NAME, --name=NAME
         Name of the new guest virtual machine instance. This must be unique
         amongst all guests known to the hypervisor on the connection,
         including those not currently active. To re-define an existing guest,
         use the virsh(1) tool to shut it down (’virsh shutdown’) & delete
         (’virsh undefine’) it prior to running "virt-install".

       -r MEMORY, --ram=MEMORY
         Memory to allocate for guest instance in megabytes. If the hypervisor
         does not have enough free memory, it is usual for it to automatically
         take memory away from the host operating system to satisfy this

         Request a non-native CPU architecture for the guest virtual machine.
         If omitted, the host CPU architecture will be used in the guest.

       -u UUID, --uuid=UUID
         UUID for the guest; if none is given a random UUID will be generated.
         If you specify UUID, you should use a 32-digit hexadecimal number.
         UUID are intended to be unique across the entire data center, and
         indeed world. Bear this in mind if manually specifying a UUID

         Number of virtual cpus to configure for the guest. Not all
         hypervisors support SMP guests, in which case this argument will be
         silently ignored

         Check that the number virtual cpus requested does not exceed physical
         CPUs and warn if they do.

         Set which physical cpus the guest can use. "CPUSET" is a comma
         separated list of numbers, which can also be specified in ranges.

             0,2,3,5     : Use processors 0,2,3 and 5
             1-3,5,6-8   : Use processors 1,2,3,5,6,7 and 8

         If the value ’auto’ is passed, virt-install attempts to automatically
         determine an optimal cpu pinning using NUMA data, if available.

         Optimize the guest configuration for a type of operating system (ex.
         ’linux’, ’windows’). This will attempt to pick the most suitable ACPI
         & APIC settings, optimally supported mouse drivers, virtio, and
         generally accommodate other operating system quirks.

         By default, virt-install will attempt to auto detect this value from
         the install media (currently only supported for URL installs).
         Autodetection can be disabled with the special value ’none’

         See "--os-variant" for valid options.

         Further optimize the guest configuration for a specific operating
         system variant (ex. ’fedora8’, ’winxp’). This parameter is optional,
         and does not require an "--os-type" to be specified.

         By default, virt-install will attempt to auto detect this value from
         the install media (currently only supported for URL installs).
         Autodetection can be disabled with the special value ’none’.

         Valid values are:

                 Debian Etch

                 Debian Lenny

                 Debian Squeeze

                 Fedora Core 5

                 Fedora Core 6

                 Fedora 7

                 Fedora 8

                 Fedora 9

                 Fedora 10

                 Fedora 11

                 Fedora 12

                 Fedora 13

                 Generic 2.4.x kernel

                 Generic 2.6.x kernel

                 Generic 2.6.25 or later kernel with virtio

                 Red Hat Enterprise Linux 2.1

                 Red Hat Enterprise Linux 3

                 Red Hat Enterprise Linux 4

                 Red Hat Enterprise Linux 5

                 Red Hat Enterprise Linux 5.4 or later

                 Red Hat Enterprise Linux 6

                 Suse Linux Enterprise Server

                 Suse Linux Enterprise Server 11

                 Ubuntu 8.04 LTS (Hardy Heron)

                 Ubuntu 8.10 (Intrepid Ibex)

                 Ubuntu 9.04 (Jaunty Jackalope)

                 Ubuntu 9.10 (Karmic Koala)



                 Novell Netware 4

                 Novell Netware 5

                 Novell Netware 6

                 Sun OpenSolaris

                 Sun Solaris 10

                 Sun Solaris 9

                 Free BSD 6.x

                 Free BSD 7.x

                 Open BSD 4.x

                 Microsoft Windows Vista

                 Microsoft Windows 2000

                 Microsoft Windows 2003

                 Microsoft Windows 2008

                 Microsoft Windows 7

                 Microsoft Windows XP (x86)

                 Microsoft Windows XP (x86_64)

             No OS version specified (disables autodetect)

         Attach a physical host device to the guest. HOSTDEV is a node device
         name as used by libvirt (as shown by ’virsh nodedev-list’).

       Full Virtualization specific options

       Parameters specific only to fully virtualized guest installs.

         Attach a virtual audio device to the guest.

         Specifies a serial device to attach to the guest, with various
         options. The general format of a serial string is

             --serial type,opt1=val1,opt2=val2,...

         --serial and --parallel devices share all the same options, unless
         otherwise noted. Some of the types of character device redirection

         --serial pty
             Psuedo TTY. The allocated pty will be listed in the running
             guests XML description.

         --serial dev,path=HOSTPATH
             Host device. For serial devices, this could be /dev/ttyS0. For
             parallel devices, this could be /dev/parport0.

         --serial file,path=FILENAME
             Write output to FILENAME.

         --serial pipe,path=PIPEPATH
             Named pipe (see pipe(7))

         --serial tcp,host=HOST:PORT,mode=MODE,protocol=PROTOCOL
             TCP net console. MODE is either ’bind’ (wait for connections on
             HOST:PORT) or ’connect’ (send output to HOST:PORT), default is
             ’connect’. HOST defaults to ’’, but PORT is required.
             PROTOCOL can be either ’raw’ or ’telnet’ (default ’raw’). If
             ’telnet’, the port acts like a telnet server or client.  Some

             Connect to localhost, port 1234:

             --serial tcp,host=:1234

             Wait for connections on any address, port 4567:

             --serial tcp,host=,mode=bind

             Wait for telnet connection on localhost, port 2222. The user
             could then connect interactively to this console via ’telnet
             localhost 2222’:

             --serial tcp,host=:2222,mode=bind,protocol=telnet

         --serial udp,host=CONNECT_HOST:PORT,bind_port=BIND_HOST:BIND_PORT
             UDP net console. HOST:PORT is the destination to send output to
             (default HOST is ’’, PORT is required. BIND_HOST:PORT is
             the optional local address to bind to (default BIND_HOST is
   , but is only set if BIND_PORT is specified.) Some

             Send output to default syslog port (may need to edit
             /etc/rsyslog.conf accordingly):

             --serial udp,host=:514

             Send output to remote host, port 4444 (this output
             can be read on the remote host using ’nc -u -l 4444’:

             --serial udp,host=

         --serial unix,path=UNIXPATH,mode=MODE
             Unix socket (see unix(7). MODE has similar behavior and defaults
             as ’tcp’.

         Override the OS type / variant to disables the APIC setting for fully
         virtualized guest.

         Override the OS type / variant to disables the ACPI setting for fully
         virtualized guest.

       Virtualization Type options

       Options to override the default virtualization type choices.

       -v, --hvm
         Request the use of full virtualization, if both para & full
         virtualization are available on the host. This parameter may not be
         available if connecting to a Xen hypervisor on a machine without
         hardware virtualization support. This parameter is implied if
         connecting to a QEMU based hypervisor.

       -p, --paravirt
         This guest should be a paravirtualized guest. If the host supports
         both para & full virtualization, and neither this parameter nor the
         "--hvm" are specified, this will be assumed.

         The hypervisor to install on. Example choices are kvm, qemu, xen, or
         kqemu.  Availabile options are listed via ’virsh capabilities’ in the
         <domain> tags.

         Prefer KVM or KQEMU (in that order) if installing a QEMU guest. This
         behavior is now the default, and this option is deprecated. To
         install a plain QEMU guest, use ’--virt-type qemu’

       Installation Method options

       -c CDROM, --cdrom=CDROM
         File or device use as a virtual CD-ROM device for fully virtualized
         guests.  It can be path to an ISO image, or to a CDROM device. It can
         also be a URL from which to fetch/access a minimal boot ISO image.
         The URLs take the same format as described for the "--location"
         argument. If a cdrom has been specified via the "--disk" option, and
         neither "--cdrom" nor any other install option is specified, the
         "--disk" cdrom is used as the install media.

       -l LOCATION, --location=LOCATION
         Installation source for guest virtual machine kernel+initrd pair.
         The "LOCATION" can take one of the following forms:

             Path to a local directory containing an installable distribution

         nfs:host:/path or nfs://host/path
             An NFS server location containing an installable distribution

             An HTTP server location containing an installable distribution

             An FTP server location containing an installable distribution

         Some distro specific url samples:

         Fedora/Red Hat Based




         Use the PXE boot protocol to load the initial ramdisk and kernel for
         starting the guest installation process.

         Skip the OS installation process, and build a guest around an
         existing disk image. The device used for booting is the first device
         specified via "--disk" or "--file".

         Specify that the installation media is a live CD and thus the guest
         needs to be configured to boot off the CDROM device permanently. It
         may be desirable to also use the "--nodisks" flag in combination.

       -x EXTRA, --extra-args=EXTRA
         Additional kernel command line arguments to pass to the installer
         when performing a guest install from "--location".

       Storage Configuration

         Specifies media to use as storage for the guest, with various
         options. The general format of a disk string is

             --disk opt1=val1,opt2=val2,...

         To specify media, the command can either be:

             --disk /some/storage/path,opt1=val1

         or explicitly specify one of the following arguments:

             A path to some storage media to use, existing or not. Existing
             media can be a file or block device. If installing on a remote
             host, the existing media must be shared as a libvirt storage

             Specifying a non-existent path implies attempting to create the
             new storage, and will require specifyng a ’size’ value. If the
             base directory of the path is a libvirt storage pool on the host,
             the new storage will be created as a libvirt storage volume. For
             remote hosts, the base directory is required to be a storage pool
             if using this method.

             An existing libvirt storage pool name to create new storage on.
             Requires specifying a ’size’ value.

         vol An existing libvirt storage volume to use. This is specified as

         Other available options:

             Disk device type. Value can be ’cdrom’, ’disk’, or ’floppy’.
             Default is ’disk’. If a ’cdrom’ is specified, and no install
             method is chosen, the cdrom is used as the install media.

         bus Disk bus type. Value can be ’ide’, ’scsi’, ’usb’, ’virtio’ or
             ’xen’.  The default is hypervisor dependent since not all
             hypervisors support all bus types.

             Disk permissions. Value can be ’rw’ (Read/Write), ’ro’
             (Readonly), or ’sh’ (Shared Read/Write). Default is ’rw’

             size (in GB) to use if creating new storage

             whether to skip fully allocating newly created storage. Value is
             ’true’ or ’false’. Default is ’true’ (do not fully allocate).

             The initial time taken to fully-allocate the guest virtual disk
             (spare=false) will be usually by balanced by faster install times
             inside the guest. Thus use of this option is recommended to
             ensure consistently high performance and to avoid I/O errors in
             the guest should the host filesystem fill up.

             The cache mode to be used. The host pagecache provides cache
             memory.  The cache value can be ’none’, ’writethrough’, or
             ’writeback’.  ’writethrough’ provides read caching. ’writeback’
             provides read and write caching.

             Image format to be used if creating managed storage. For file
             volumes, this can be ’raw’, ’qcow2’, ’vmdk’, etc. See format
             types in <> for possible values.

         See the examples section for some uses. This option deprecates
         "--file", "--file-size", and "--nonsparse".

         Request a virtual machine without any local disk storage, typically
         used for running ’Live CD’ images or installing to network storage
         (iSCSI or NFS root).

       -f DISKFILE, --file=DISKFILE
         This option is deprecated in favor of "--disk path=DISKFILE".

       -s DISKSIZE, --file-size=DISKSIZE
         This option is deprecated in favor of "--disk ...,size=DISKSIZE,..."

         This option is deprecated in favor of "--disk ...,sparse=false,..."

       Networking Configuration

       -w NETWORK, --network=NETWORK,opt1=val1,opt2=val2
         Connect the guest to the host network. The value for "NETWORK" can
         take one of 3 formats:

             Connect to a bridge device in the host called "BRIDGE". Use this
             option if the host has static networking config & the guest
             requires full outbound and inbound connectivity  to/from the LAN.
             Also use this if live migration will be used with this guest.

             Connect to a virtual network in the host called "NAME". Virtual
             networks can be listed, created, deleted using the "virsh"
             command line tool. In an unmodified install of "libvirt" there is
             usually a virtual network with a name of "default". Use a virtual
             network if the host has dynamic networking (eg NetworkManager),
             or using wireless. The guest will be NATed to the LAN by
             whichever connection is active.

             Connect to the LAN using SLIRP. Only use this if running a QEMU
             guest as an unprivileged user. This provides a very limited form
             of NAT.

         If this option is omitted a single NIC will be created in the guest.
         If there is a bridge device in the host with a physical interface
         enslaved, that will be used for connectivity. Failing that, the
         virtual network called "default" will be used. This option can be
         specified multiple times to setup more than one NIC.

         Other available options are:

             Network device model as seen by the guest. Value can be any nic
             model supported by the hypervisor, e.g.: ’e1000’, ’rtl8139’,
             ’virtio’, ...

         mac Fixed MAC address for the guest; If this parameter is omitted, or
             the value "RANDOM" is specified a suitable address will be
             randomly generated. For Xen virtual machines it is required that
             the first 3 pairs in the MAC address be the sequence ’00:16:3e’,
             while for QEMU or KVM virtual machines it must be ’52:54:00’.

         Request a virtual machine without any network interfaces.

       -b BRIDGE, --bridge=BRIDGE
         This parameter is deprecated in favour of "--network

       -m MAC, --mac=MAC
         This parameter is deprecated in favour of "--network

       Graphics Configuration

       If no graphics option is specified, "virt-install" will default to
       --vnc if the DISPLAY environment variable is set, otherwise
       --nographics is used.

         Setup a virtual console in the guest and export it as a VNC server in
         the host. Unless the "--vncport" parameter is also provided, the VNC
         server will run on the first free port number at 5900 or above. The
         actual VNC display allocated can be obtained using the "vncdisplay"
         command to "virsh" (or virt-viewer(1) can be used which handles this
         detail for the use).

         Request a permanent, statically assigned port number for the guest
         VNC console. Use of this option is discouraged as other guests may
         automatically choose to run on this port causing a clash.

         Address to listen on for VNC connections. Default is typically (localhost only), but some hypervisors allow changing this
         globally (for example, the qemu driver default can be changed in
         /etc/libvirt/qemu.conf).  Use to allow access from other

       -k KEYMAP, --keymap=KEYMAP
         Request that the virtual VNC console be configured to run with a
         specific keyboard layout. If the special value ’local’ is specified,
         virt-install will attempt to configure to use the same keymap as the
         local system. A value of ’none’ specifically defers to the
         hypervisor. Default behavior is hypervisor specific, but typically is
         the same as ’local’.

         Setup a virtual console in the guest and display an SDL window in the
         host to render the output. If the SDL window is closed the guest may
         be unconditionally terminated.

         Specify what video device model will be attached to the guest. Valid
         values for VIDEO are hypervisor specific, but some options for recent
         kvm are cirrus, vga, or vmvga (vmware).

         No graphical console will be allocated for the guest. Fully
         virtualized guests (Xen FV or QEmu/KVM) will need to have a text
         console configured on the first serial port in the guest (this can be
         done via the --extra-args option). Xen PV will set this up
         automatically. The command ’virsh console NAME’ can be used to
         connect to the serial device.

         Don’t automatically try to connect to the guest console. The default
         behaviour is to launch a VNC client to display the graphical console,
         or to run the "virsh" "console" command to display the text console.
         Use of this parameter will disable this behaviour.

       Miscellaneous Options

       -d, --debug
         Print debugging information to the terminal when running the install
         process.  The debugging information is also stored in
         "$HOME/.virtinst/virt-install.log" even if this parameter is omitted.

         Prevent the domain from automatically rebooting after the install has

         Amount of time to wait (in minutes) for a VM to complete its install.
         Without this option, virt-install will wait for the console to close
         (not neccessarily indicating the guest has shutdown), or in the case
         of --noautoconsole, simply kick off the install and exit. Any
         negative value will make virt-install wait indefinitely, a value of 0
         triggers the same results as noautoconsole. If the time limit is
         exceeded, virt-install simply exits, leaving the virtual machine in
         its current state.

         Prevent interactive prompts. If the intended prompt was a yes/no
         prompt, always say yes. For any other prompts, the application will

         Specifically enable prompting for required information. Default
         prompting is off (as of virtinst 0.400.0)


       Install a KVM guest (assuming proper host support), creating a new
       +storage file, virtual networking, booting from the host CDROM, using
       +VNC server/viewer.

         # virt-install \
              --connect qemu:///system \
              --name demo \
              --ram 500 \
              --disk path=/var/lib/libvirt/images/demo.img,size=5 \
              --network network=default,model=virtio \
              --vnc \
              --cdrom /dev/cdrom

       Install a Fedora 9 plain QEMU guest, using LVM partition, virtual
       networking, booting from PXE, using VNC server/viewer

         # virt-install \
              --connect qemu:///system \
              --name demo \
              --ram 500 \
              --disk path=/dev/HostVG/DemoVM \
              --network network=default \
              --virt-type qemu
              --vnc \
              --os-variant fedora9

       Install a guest with a real partition, with the default QEMU hypervisor
       for a different architecture using SDL graphics, using a remote kernel
       and initrd pair:

         # virt-install \
              --connect qemu:///system \
              --name demo \
              --ram 500 \
              --disk path=/dev/hdc \
              --network bridge=eth1 \
              --arch ppc64 \
              --sdl \

       Run a Live CD image under Xen fullyvirt, in diskless environment

         # virt-install \
              --hvm \
              --name demo \
              --ram 500 \
              --nodisks \
              --livecd \
              --vnc \
              --cdrom /root/fedora7live.iso

       Install a paravirtualized Xen guest, 500 MB of RAM, a 5 GB of disk, and
       Fedora Core 6 from a web server, in text-only mode, with old style
       --file options:

         # virt-install \
              --paravirt \
              --name demo \
              --ram 500 \
              --file /var/lib/xen/images/demo.img \
              --file-size 6 \
              --nographics \

       Create a guest from an existing disk image ’mydisk.img’ using defaults
       for the rest of the options.

         # virt-install \
              --name demo
              --ram 512
              --disk /home/user/VMs/mydisk.img


       Written by Daniel P. Berrange, Hugh Brock, Jeremy Katz, Cole Robinson
       and a team of many other contributors. See the AUTHORS file in the
       source distribution for the complete list of credits.


       Please see


       Copyright (C) 2006-2009 Red Hat, Inc, and various contributors.  This
       is free software. You may redistribute copies of it under the terms of
       the GNU General Public License "".
       There is NO WARRANTY, to the extent permitted by law.


       virsh(1), "virt-clone(1)", "virt-manager(1)", the project website

                                  2009-12-03                   VIRT-INSTALL(1)