Name
Part of the virt-goodies package, vmware2libvirt is a python script for migrating a vmware image to libvirt. Desktop applications ¶ virt-manager A general purpose desktop management tool, able to manage virtual machines across both local and remotely accessed hypervisors. VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use.For a thorough introduction to virtualization and VirtualBox.
virt-install - provision new virtual machines
Synopsis
virt-install [ OPTION ]...
Description
virt-install is a command line tool for creating new KVM , Xen, or Linux container guests using the 'libvirt' hypervisormanagement library. See the EXAMPLES section at the end of this document to quickly get started.
virt-install tool supports both text based & graphical installations, using VNC or SDL graphics, or a text serialconsole. The guest can be configured to use one or more virtual disks, network interfaces, audio devices, physical USB or PCIdevices, among others.
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 theOS distribution as needed. PXE booting, and importing an existing disk image (thus skipping the install phase) are alsosupported.
Given suitable command line arguments, 'virt-install' is capable of running completely unattended, with the guest 'kickstarting' itself too. Thisallows for easy automation of guest installs. An interactive mode is also available with the --prompt option, but this will only ask for the minimum requiredoptions.
Options
Most options are not required. Minimum requirements are --name, --ram, guest storage (--disk, --filesystem or --nodisks), and an install option.
If running on a host with the Xen kernel (checks against /proc/xen)
It is only necessary to provide the '--connect' argument if this default prioritization is incorrect, eg if wanting to use QEMUwhile on a Xen kernel.
General Options
CPU topology can additionally be specified with sockets, cores, and threads. If values are omitted, the rest will be autofilled preferingsockets over cores over threads.
The nodeset string must use escaped-quotes if specifying any other option.
Specific CPU features can be specified in a number of ways: using one of libvirt's feature policy values force, require, optional, disable,or forbid, or with the shorthand '+feature' and '-feature', which equal 'force=feature' and 'disable=feature' respectively
Some examples:
Installation Method options
With libvirt 0.9.4 or later, network URL installs work for remote connections. virt-install will download kernel/initrd to the local machine,and then upload the media to the remote host. This option requires the URL to be accessible by both the local and remote host.
The 'LOCATION' can take one of the following forms:
--initrd-inject=/path/to/my.ks --extra-args 'ks=file:/my.ks'
Virt-manager Mac Address
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.
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'.
If the special value 'list' is passed, virt-install will print the full list of variant values and exit. The printed format is not a stable interface,DO NOT PARSE IT .
If the special value 'none' is passed, no os variant is recorded and OS autodetection is disabled.
Values for some recent OS options are:
--boot can be specified in addition to other install options (such as --location, --cdrom, etc.) or can be specified on it's own. In the latter case,behavior is similar to the --import install option: there is no 'install' phase, the guest is just created and launched as specified.
Some examples:
Storage Configuration
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 isa 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 astorage pool if using this method.
An existing libvirt storage volume to use. This is specified as 'poolname/volname'.
Disk bus type. Value can be 'ide', 'scsi', 'usb', 'virtio' or 'xen'. The default is hypervisor dependent since not all hypervisors support all bustypes.
The initial time taken to fully-allocate the guest virtual disk (sparse=false) will be usually by balanced by faster install times inside the guest. Thususe 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.
With libvirt 0.8.3 and later, this option should be specified if reusing and existing disk image, since libvirt does not autodetect storage format as it isa potential security issue. For example, if reusing an existing qcow2 image, you will want to specify format=qcow2, otherwise the hypervisor may not be able toread your disk image.
Disk IO backend. Can be either 'threads' or 'native'.
The following explicit options can be specified:
Networking Configuration
Other available options are:
Fixed MAC address for the guest; If this parameter is omitted, or the value 'RANDOM' is specified a suitable address will berandomly generated. For Xen virtual machines it is required that the first 3 pairs in the MAC address be the sequence '00:16:3e', while forQEMU or KVM virtual machines it must be '52:54:00'.
Graphics Configuration
General format of a graphical string isFor example:The supported options are:
vnc
Setup a virtual console in the guest and export it as a VNC server in the host. Unless the 'port' parameter is also provided, theVNC 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).
sdl
Setup a virtual console in the guest and display an SDL window in the host to render the output. If the SDL window is closedthe guest may be unconditionally terminated.
spice
Export the guest's console using the Spice protocol. Spice allows advanced features like audio and USB device streaming, as well as improvedgraphical performance.
Using spice graphic type will work as if those arguments were given:none
No graphical console will be allocated for the guest. Fully virtualized guests (Xen FV or QEmu/KVM) will need to have a text consoleconfigured on the first serial port in the guest (this can be done via the --extra-args option). Xen PV will set this up automatically. Thecommand 'virsh console NAME ' can be used to connect to the serial device.
The format for this value is YYYY-MM-DDTHH:MM:SS , for example 2011-04-01T14:30:15
Virt Manager For Mac Os
Virtualization Type options
- are specified, this will be assumed.
- --container
- This guest should be a container type guest. This option is only required if the hypervisor supports other guest types as well (so for example this optionis the default behavior for LXC and OpenVZ, but is provided for completeness).
- --virt-type
- The hypervisor to install on. Example choices are kvm, qemu, xen, or kqemu. Availabile options are listed via 'virsh capabilities' in the <domain>tags.
- --accelerate
- Prefer KVM or KQEMU (in that order) if installing a QEMU guest. This behavior is now the default, and thisoption is deprecated. To install a plain QEMU guest, use '--virt-type qemu'
- --noapic
- Force disable APIC for the guest.
- --noacpi
- Force disable ACPI for the guest.
Device Options
This deprecates the old boolean --sound model (which still works the same as a single '--soundhw default')
Use the recommended settings:
--watchdog default
Use the i6300esb with the 'poweroff' action
--watchdog i6300esb,action=poweroff
Virt Viewer Mac
) or 'connect' (send output toHOST:PORT ), default is 'connect'. HOST defaults to '127.0.0.1', but PORT is required. PROTOCOL canbe either 'raw' or 'telnet' (default 'raw'). If 'telnet', the port acts like a telnet server or client. Some examples:Connect to localhost, port 1234:
--serial tcp,host=:1234
Wait for connections on any address, port 4567:
--serial tcp,host=0.0.0.0:4567,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
Send output to default syslog port (may need to edit /etc/rsyslog.conf accordingly):
--serial udp,host=:514
Send output to remote host 192.168.10.20, port 4444 (this output can be read on the remote host using 'nc -u -l 4444'):
--serial udp,host=192.168.10.20:4444
Some of the types of character device redirection are:
Example:
Mode is one of host, host-certificates, or passthrough. Additional options are:
Miscellaneous Options
If the guest has an install phase, you will need to use --print-step to specify exactly what XML output you want. This option implies--quiet.
Virt-manager Macos Guest
Virt-manager Macvtap
Examples
Install a Fedora 13 KVM guest with virtio accelerated disk/network, creating a new 8GB storage file, installing from media in the hostsCDROM drive, auto launching a graphical VNC viewerInstall a Fedora 9 plain QEMU guest, using LVM partition, virtual networking, booting from PXE , usingVNC server/viewerInstall a guest with a real partition, with the default QEMU hypervisor for a different architecture using SDL graphics, usinga remote kernel and initrd pair:Run a Live CD image under Xen fullyvirt, in diskless environmentRun /usr/bin/httpd in a linux container guest ( LXC ). Resource usage is capped at 512 MB of ram and 2 host cpus:Install a paravirtualized Xen guest, 500 MB of RAM , a 5 GB of disk, and Fedora Core 6 from a web server, intext-only mode, with old style --file options:Create a guest from an existing disk image 'mydisk.img' using defaults for the rest of the options.Test a custom kernel/initrd using an existing disk image, manually specifying a serial device hooked to a PTY on the host machine.
Authors
Written by Daniel P. Berrange, Hugh Brock, Jeremy Katz, Cole Robinson and a team of many other contributors. See the AUTHORS file in thesource distribution for the complete list of credits.
Bugs
Please see http://virt-manager.org/page/BugReporting
Copyright
Copyright © 2006-2011 Red Hat, Inc, and various contributors. This is free software. You may redistribute copies of it under the terms of theGNU General Public License 'http://www.gnu.org/licenses/gpl.html'. There is NO WARRANTY , to the extent permitted bylaw.
See Also
virsh(1), 'virt-clone(1)', 'virt-manager(1)', the project website 'http://virt-manager.org'