Installing a KVM Guest OS from the Command-line (virt-install)

From Techotopia
Revision as of 18:53, 23 June 2009 by Neil (Talk | contribs)

Jump to: navigation, search
PreviousTable of ContentsNext
Installing and Configuring Fedora KVM VirtualizationRunning Windows on Fedora Using KVM Virtualization


In the previous chapter we explored the creation and management of KVM guest operating systems using the virt-manager graphical tool. In this chapter we will cover the installation of a kvm guest operating system using the virt-install' command-line tool.

This chapter assumes that the necessary KVM tools are installed that the system was rebooted after these were installed. For details on these requirements read Installing and Configuring Fedora KVM Virtualization.


Contents


Preparing the System for virt-install

virt-install provides the option of supporting graphics for the guest operating system installation. This is achieved through use of QEMU. If graphics support is declined during the virt-install session, the standard text based installer will be used.

Running virt-install to Build the KVM Guest System

<google>ADSDAQBOX_FLOW</google> virt-install must be run as root and, once invoked, will ask a number of questions before creating the guest system. The question are as follows:

  • What is the name of your virtual machine? - The name by which the guest system will be referenced when managing and monitoring the system with other tools.
  • How much RAM should be allocated (in megabytes)? - The amount of system memory to be made available to the guest operating system.
  • What would you like to use as the disk (path)? - The path to the file or disk partition to be used to contain the guest operating system.
  • Would you like to enable graphics support? (yes or no) - Defines whether the graphical installer is used or the text based installer in the shell.
  • What is the install location? - The location of the installation files for the OS. This can be an ftp, nfs, http or local device location.

The following transcript shows a typical virt-install session:

[root@localhost nas]# virt-install
What is the name of your virtual machine? virt-fedora
 How much RAM should be allocated (in megabytes)? 256
 What would you like to use as the disk (file path)? /home/nas/kvm-fedora2.img
 How large would you like the disk (/home/nas/kvm-fedora2.img) to be (in gigabytes)? 1.5
 Would you like to enable graphics support? (yes or no) yes
 What is the virtual CD image, CD device or install location? /dev/sr0

Starting install...
Creating storage file...  100% |=========================| 1.5 GB    00:00
Creating domain...                                                 0 B 00:04


Running the KVM Virtual System

Once the guest system has been created, the QEMU screen will appear containing the operating system installer loaded form the specified installation media:

KVM Guest Fedora Installer running in QEMU window

Follow the standard installation procedure for the guest operating system.

Summary

In the chapter we have looked at the steps necessary to create a KVM Virtual System using the virt-install command line tool.

Once the installation is completed the next step is to learn how to administer KVM virtual systems system. This can be achieved the graphical virt-manager tool. (see Managing and Monitoring Fedora based KVM Guest Systems).



PreviousTable of ContentsNext
Installing and Configuring Fedora KVM VirtualizationRunning Windows on Fedora Using KVM Virtualization