Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Red Hat Enterprise Linux 9 Essentials Book now available.

Purchase a copy of Red Hat Enterprise Linux 9 (RHEL 9) Essentials

Red Hat Enterprise Linux 9 Essentials Print and eBook (PDF) editions contain 34 chapters and 298 pages

Preview Book

6.2. Creating guests with virt-install

You can use the virt-install command to create virtualized guests from the command line. virt-install is used either interactively or as part of a script to automate the creation of virtual machines. Using virt-install with Kickstart files allows for unattended installation of virtual machines.
The virt-install tool provides a number of options one can pass on the command line. To see a complete list of options run:
$ virt-install --help
The virt-install man page also documents each command option and important variables.
qemu-img is a related command which may be used before virt-install to configure storage options.
An important option is the --vnc option which opens a graphical window for the guest's installation.
Example 6.1. Using virt-install to install a RHEL 5 guest
This example creates a RHEL 5 guest with the following settings:
  • Uses LVM partitioning
  • Is a plain QEMU guest
  • Uses virtual networking
  • Boots from PXE
  • Uses VNC server/viewer
# virt-install \
   --network network:default \
   --name rhel5support --ram=756\
   --file=/var/lib/libvirt/images/rhel5support.img \
   --file-size=6 --vnc --cdrom=/dev/sr0

Refer to man virt-install for more examples.

 
 
  Published under the terms of the Creative Commons License Design by Interspire