Installation guide
Dell Inc.
KVM Virtualization in RHEL 6 Made Easy
9
This is the image file for the VM, the size is specified in GBs.
--graphics none
This tells the installer not to launch a VNC window to access the VM‟s main console. Instead, it will
use a text console on the VM‟s serial port. If you rather use an X window with graphics to install the
OS on the VM, omit this parameter.
--location=http://my.server.com/pub/rhel6.1/install-x86_64/
This is the location of the RHEL 6.1 x64 installation directory, which of course will be different for
you. If you don‟t have a remote installation location for the OS, you can install from an iso instead.
Instead of using the location parameter, use the cdrom parameter:
--cdrom /root/RHEL6.1-20110510.1-Server-x86_64-DVD1.iso
--extra-args="console=tty0 console=ttyS0,115200"
The extra-args parameter is used to pass kernel boot parameters to the OS installer. In this case,
since we are connecting to the VM‟s serial port, we must use the proper kernel parameters to set it
up, just like we would on any server, virtual or not.
The extra-args parameter can also be used to specify a kickstart file for non-interactive
installations. So if we had a kickstart file we would use:
--extra-args="ks=http://my.server.com/pub/ks.cfg console=tty0
console=ttyS0,115200”
The OS installation on the VM proceeds as with a physical server, where you provide information such
as disk partitions, time zone, root password, etc.
Here is another example: Install a RHEL 6.0 x86 VM with 2 VCPUs, 2GB of memory, 15GB disk space,
using the default network (private VM network), install from a local iso on the host and use VNC to
interact with the VM (must have an X server running):
# virt-install \
--name vm1 \
--ram=2048 \
--vcpus=2 \
--disk path=/vm-images/vm1.img,size=15 \
--cdrom /root/RHEL6.0-20100922.1-Server-i386-DVD1.iso
For more information on all virt-install parameters, refer to the virt-install man page.
4. Cloning VMs
If you want several VMs with the same OS and same configuration, I recommend cloning existing VMs
rather than installing the OS on each one, which can quickly become a time-consuming & tedious task.
In this example, we clone vm1 to create a new VM clone called vm1-clone: