Sunday, January 20, 2013

VM pt 1HOW IT WAS INSTALLED Detailed

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Virtualization_Host_Configuration_and_Guest_Installation_Guide/index.html#sect-Virtualization_Host_Configuration_and_Guest_Installation_Guide-Guest_Installation-Installing_guests_with_PXE


ct

This guide covers KVM packages, compatibility and restrictions. Also included are host configuration details and instructions for installing guest virtual machines of different types, PCI device configuration and SR-IOV.Note: This document is under development, is subject to substantial change, and is provided only as a preview. The included information and instructions should not be considered complete, and should be used with caution.Preface1. Document Conventions1.1. Typographic Conventions1.2. Pull-quote Conventions1.3. Notes and Warnings2. Getting Help and Giving Feedback2.1. Do You Need Help?2.2. We Need Feedback!1. Introduction1.1. What is in this guide?2. System requirements3. KVM guest virtual machine compatibility3.1. Red Hat Enterprise Linux 6 support limits3.2. Supported CPU Models3.2.1. Guest CPU models4. Virtualization restrictions4.1. KVM restrictions4.2. Application restrictions4.3. Other restrictions5. Installing the virtualization packages5.1. Configuring a Virtualization Host installation5.2. Installing virtualization packages on an existing Red Hat Enterprise Linux system6. Guest virtual machine installation overview6.1. Guest virtual machine prerequisites and considerations6.2. Creating guests with virt-install6.3. Creating guests with virt-manager6.4. Installing guest virtual machines with PXE7. Installing a Red Hat Enterprise Linux 6 guest virtual machine on a Red Hat Enterprise Linux 6 host7.1. Creating a Red Hat Enterprise Linux 6 guest with local installation media7.2. Creating a Red Hat Enterprise Linux 6 guest with a network installation tree7.3. Creating a Red Hat Enterprise Linux 6 guest with PXE8. Virtualizing Red Hat Enterprise Linux on Other Platforms8.1. On VMWare8.2. On Hyper-V9. Installing a fully-virtualized Windows guest9.1. Using virt-install to create a guest10. KVM Para-virtualized Drivers10.1. Installing the KVM Windows para-virtualized drivers10.2. Installing the drivers on an installed Windows guest virtual machine10.3. Installing drivers during the Windows installation10.4. Using the para-virtualized drivers with Red Hat Enterprise Linux 3.9 guests10.5. Using KVM para-virtualized drivers for existing devices10.6. Using KVM para-virtualized drivers for new devices11. Network configuration11.1. Network Address Translation (NAT) with libvirt11.2. Disabling vhost-net11.3. Bridged networking with libvirt12. PCI device configuration12.1. Assigning a PCI device with virsh12.2. Assigning a PCI device with virt-manager12.3. PCI device assignment with virt-install12.4. Detaching an assigned PCI device13. SR-IOV13.1. Introduction13.2. Using SR-IOV13.3. Troubleshooting SR-IOV14. KVM guest timing management15. Network booting with libvirt15.1. Preparing the boot server15.1.1. Setting up a PXE boot server on a private libvirt network15.2. Booting a guest using PXE15.2.1. Using bridged networking15.2.2. Using a private libvirt network16. QEMU Guest Agent16.1. Set Up Communication between Guest Agent and HostA. NetKVM Driver ParametersA.1. Configurable parameters for NetKVMB. Common libvirt errors and troubleshootingB.1. libvirtd failed to startB.2. The URI failed to connect to the hypervisorB.2.1. Cannot read CA certificateB.2.2. Failed to connect socket ... : Permission deniedB.2.3. Other connectivity errorsB.3. The guest virtual machine cannot be started: internal error guest CPU is not compatible with host CPUB.4. Guest starting fails with error: monitor socket did not show upB.5. Internal error cannot find character device (null)B.6. Guest virtual machine booting stalls with error: No boot deviceB.7. Virtual network default has not been startedB.8. PXE boot (or DHCP) on guest failedB.9. Guest can reach outside network, but cannot reach host when using macvtap interfaceB.10. Could not add rule to fixup DHCP response checksums on network 'default'B.11. Unable to add bridge br0 port vnet0: No such deviceB.12. Guest is unable to start with error: warning: could not open /dev/net/tunB.13. Migration fails with Error: unable to resolve addressB.14. Migration fails with Unable to allow access for disk path: No such file or directoryB.15. No guest virtual machines are present when libvirtd is startedB.16. Unable to connect to server at 'host:16509': Connection refused ... error: failed to connect to the hypervisorB.17. Common XML errorsB.17.1. Editing domain definitionB.17.2. XML syntax errorsB.17.3. Logic and configuration errorsC. Revision History



★★★★
1. Document Conventions

This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.

1.1. Typographic Conventions

Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.Mono-spaced BoldUsed to highlight system input, including shell commands, file names and paths. Also used to highlight keys and key combinations. For example:To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command.The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all distinguishable thanks to context.Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination. For example:Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to a virtual terminal.The first example highlights a particular key to press. The second example highlights a key combination: a set of three keys pressed simultaneously.If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mono-spaced bold. For example:File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.Proportional BoldThis denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:Choose System → Preferences → Mouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose Applications → Accessories → Character Map from the main menu bar. Next, choose Search → Find… from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click theCopy button. Now switch back to your document and choose Edit → Paste from the gedit menu bar.The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.Mono-spaced Bold Italic or Proportional Bold ItalicWhether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com.The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home.To see the version of a currently installed package, use the rpm -q packagecommand. It will return a result as follows: package-version-release.Note the words in bold italics above — username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:Publican is a DocBook publishing system.

1.2. Pull-quote Conventions

Terminal output and source code listings are set off visually from the surrounding text.Output sent to a terminal is set in mono-spaced roman and presented thus:books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgsSource-code listings are also set in mono-spaced roman but add syntax highlighting as follows:package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }

1.3. Notes and Warnings

Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.

Note

Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.

Important

Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.

Warning

Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

2. Getting Help and Giving Feedback

2.1. Do You Need Help?

If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer Portal at http://access.redhat.com. Through the customer portal, you can:search or browse through a knowledgebase of technical support articles about Red Hat products.submit a support case to Red Hat Global Support Services (GSS).access other product documentation.Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo. Click on the name of any mailing list to subscribe to that list or to access the list archives.

2.2. We Need Feedback!

If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http://bugzilla.redhat.com/ against the product Red Hat Enterprise Linux 6.When submitting a bug report, be sure to mention the manual's identifier: doc-Virtualization_Host_Configuration_and_Guest_Installation_GuiIf you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.

Chapter 1. Introduction

1.1. What is in this guide?

1.1. What is in this guide?

This guide provides information on installing virtualization software and configuring guest machines on a Red Hat Enterprise Linux virtualization host.The initial chapters in this guide outline the prerequisites to enable a Red Hat Enterprise Linux host machine to deploy virtualization. System requirements, compatible hardware, support and product restrictions are covered in detail.Basic host configuration, including mandatory and optional virtualization packages, are covered in Chapter 5, Installing the virtualization packages.Guest virtual machine installation is covered in detail starting from Chapter 6, Guest virtual machine installation overview, with procedures for installing fully virtualized Red Hat Enterprise Linux guests and Windows para-virtualized guests using virt-manager and virsh.More detailed information on networking, PCI device configuration, SR-IOV, KVM guest timing management, and troubleshooting help for libvirt and SR-IOV is included later in the guide.

Note

This book provides guidance for virtualization host configuration and guest installation. For more detailed system configuration information, refer to the Red Hat Enterprise Linux Virtualization Administration Guide.In addition to this guide, the following titles cover virtualization with Red Hat Enterprise Linux:Virtualization Getting Started Guide: This guide provides an introduction to virtualization concepts, advantages, and tools, and an overview of Red Hat virtualization documentation and products.Virtualization Administration Guide: This guide covers administration of hosts, networking, storage, device and guest management using either virt-manager or virsh, a libvirt and QEMU reference, and troubleshooting information.Virtualization Security Guide: This guide provides an overview of virtualization security technologies provided by Red Hat. Also included are recommendations for securing hosts, guests, and shared infrastructure and resources in virtualized environments.Virtualization Tuning and Optimization Guide: This guide provides tips, tricks and suggestions for making full use of virtualization performance features and options for your systems and guest virtual machines.

Chapter 2. System requirements

This chapter lists system requirements for successfully running virtual machines, referred to as VMs on Red Hat Enterprise Linux 6. Virtualization is available for Red Hat Enterprise Linux 6 on the Intel 64 and AMD64 architecture.The KVM hypervisor is provided with Red Hat Enterprise Linux 6.For information on installing the virtualization packages, see Chapter 5, Installing the virtualization packages.

Minimum system requirements

6 GB free disk space.2 GB of RAM.

Recommended system requirements

One processor core or hyper-thread for the maximum number of virtualized CPUs in a guest virtual machine and one for the host.2 GB of RAM plus additional RAM for virtual machines.6 GB disk space for the host, plus the required disk space for each virtual machine.Most guest operating systems will require at least 6GB of disk space, but the additional storage space required for each guest depends on its image format.For guest virtual machines using raw images, the guest's total required space (total for raw format) is equal to or greater than the sum of the space required by the guest's raw image files (images), the 6GB space required by the host operating system(host), and the swap space that guest will require (swap).

Equation 2.1. Calculating required space for guest virtual machines using raw images

total for raw format = images + host + swapFor qcow images, you must also calculate the expected maximum storage requirements of the guest (total for qcow format), as qcow and qcow2 images grow as required. To allow for this expansion, first multiply the expected maximum storage requirements of the guest (expected maximum guest storage) by 1.01, and add to this the space required by the host (host), and the necessary swap space (swap).

Equation 2.2. Calculating required space for guest virtual machines using qcow images

total for qcow format = (expected maximum guest storage * 1.01) + host + swapGuest virtual machine requirements are further outlined in the Red Hat Enterprise Linux 6 Virtualization Administration Guide in Chapter 6. Overcommitting with KVM.

Calculating swap space

Using swap space can provide additional memory beyond the available physical memory. The swap partition is used for swapping underused memory to the hard drive to speed up memory performance. The default size of the swap partition is calculated from the physical RAM of the host.Red Hat Knowledgebase contains an article on safely and efficiently determining the size of the swap partition, available here: https://access.redhat.com/knowledge/solutions/15244.

KVM requirements

The KVM hypervisor requires:an Intel processor with the Intel VT-x and Intel 64 extensions for x86-based systems, oran AMD processor with the AMD-V and the AMD64 extensions.Refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide to determine if your processor has the virtualization extensions.

Storage support

The guest virtual machine storage methods are:files on local storage,physical disk partitions,locally connected physical LUNs,LVM partitions,NFS shared file systems,iSCSI,GFS2 clustered file systems,Fibre Channel-based LUNs, andFibre Channel over Ethernet (FCoE).

Chapter 3. KVM guest virtual machine compatibility

3.1. Red Hat Enterprise Linux 6 support limits3.2. Supported CPU Models3.2.1. Guest CPU modelsTo verify whether your processor supports the virtualization extensions and for information on enabling the virtualization extensions if they are disabled, refer to the Red Hat Enterprise Linux Virtualization Administration Guide.

3.1. Red Hat Enterprise Linux 6 support limits

Red Hat Enterprise Linux 6 servers have certain support limits.The following URLs explain the processor and memory amount limitations for Red Hat Enterprise Linux:For host systems: http://www.redhat.com/resourcelibrary/articles/articles-red-hat-enterprise-linux-6-technology-capabilities-and-limitsFor hypervisors: http://www.redhat.com/resourcelibrary/articles/virtualization-limits-rhel-hypervisorsThe following URL is a complete reference showing supported operating systems and host and guest combinations:http://www.redhat.com/resourcelibrary/articles/enterprise-linux-virtualization-support

3.2. Supported CPU Models

Red Hat Enterprise Linux 6 supports the use of the following QEMU CPU model definitions:Opteron_G4AMD Opteron 62xx (Gen 4 Class Opteron)Opteron_G3AMD Opteron 23xx (Gen 3 Class Opteron)Opteron_G2AMD Opteron 22xx (Gen 2 Class Opteron)Opteron_G1AMD Opteron 240 (Gen 1 Class Opteron)SandyBridgeIntel Xeon E312xx (Sandy Bridge)NehalemIntel Core i7 9xx (Nehalem Class Core i7)PenrynIntel Core 2 Duo P9xxx (Penryn Class Core 2)ConroeIntel Celeron_4x0 (Conroe/Merom Class Core 2)WestmereWestmere E56xx/L56xx/X56xx (Nehalem-C)cpu64-rhel5Red Hat Enterprise Linux 5 supported QEMU Virtual CPU version (cpu64-rhel5)cpu64-rhel6Red Hat Enterprise Linux 6 supported QEMU Virtual CPU version (cpu64-rhel6)

3.2.1. Guest CPU models

Historically, CPU model definitions were hard-coded in qemu. This method of defining CPU models was inflexible, and made it difficult to create virtual CPUs with feature sets that matched existing physical CPUs. Typically, users modified a basic CPU model definition with feature flags in order to provide the CPU characteristics required by a virtual machine. Unless these feature sets were carefully controlled, safe migration — which requires feature sets between current and prospective hosts to match — was difficult to support.qemu-kvm has now replaced most hard-wired definitions with configuration file based CPU model definitions. Definitions for a number of current processor models are now included by default, allowing users to specify features more accurately and migrate more safely.A list of supported guest CPU models can be viewed with the /usr/libexec/qemu-kvm -cpu ?model command. This command outputs the name used to select the CPU model at the command line, and a model identifier that corresponds to a commercial instance of that processor class.Configuration details for all of these CPU models can be viewed with the /usr/libexec/qemu-kvm -cpu ?dump command, but they are also stored in the /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf file by default. Each CPU model definition begins with [cpudef], as shown:[cpudef] name = "Nehalem" level = "2" vendor = "GenuineIntel" family = "6" model = "26" stepping = "3" feature_edx = "sse2 sse fxsr mmx clflush pse36 pat cmov mca \ pge mtrr sep apic cx8 mce pae msr tsc pse de fpu" feature_ecx = "popcnt x2apic sse4.2 sse4.1 cx16 ssse3 sse3" extfeature_edx = "i64 syscall xd" extfeature_ecx = "lahf_lm" xlevel = "0x8000000A" model_id = "Intel Core i7 9xx (Nehalem Class Core i7)"The four CPUID fields, feature_edx, feature_ecx, extfeature_edx and extfeature_ecx, accept named flag values from the corresponding feature sets listed by the /usr/libexec/qemu-kvm -cpu ?cpuid command, as shown:# /usr/libexec/qemu-kvm -cpu ?cpuid Recognized CPUID flags: f_edx: pbe ia64 tm ht ss sse2 sse fxsr mmx acpi ds clflush pn \ pse36 pat cmov mca pge mtrr sep apic cx8 mce pae msr tsc \ pse de vme fpu f_ecx: hypervisor avx osxsave xsave aes popcnt movbe x2apic \ sse4.2|sse4_2 sse4.1|sse4_1 dca pdcm xtpr cx16 fma cid \ ssse3 tm2 est smx vmx ds_cpl monitor dtes64 pclmuldq \ pni|sse3 extf_edx: 3dnow 3dnowext lm rdtscp pdpe1gb fxsr_opt fxsr mmx \ mmxext nx pse36 pat cmov mca pge mtrr syscall apic cx8 \ mce pae msr tsc pse de vme fpu extf_ecx: nodeid_msr cvt16 fma4 wdt skinit xop ibs osvw \ 3dnowprefetch misalignsse sse4a abm cr8legacy extapic svm \ cmp_legacy lahf_lmThese feature sets are described in greater detail in the appropriate Intel and AMD specifications.It is important to use the check flag to verify that all configured features are available.# /usr/libexec/qemu-kvm -cpu Nehalem,check warning: host cpuid 0000_0001 lacks requested flag 'sse4.2|sse4_2' [0x00100000] warning: host cpuid 0000_0001 lacks requested flag 'popcnt' [0x00800000]If a defined feature is not available, those features will fail silently by default.

Chapter 4. Virtualization restrictions

4.1. KVM restrictions4.2. Application restrictions4.3. Other restrictionsThis chapter covers additional support and product restrictions of the virtualization packages in Red Hat Enterprise Linux 6.

4.1. KVM restrictions

The following restrictions apply to the KVM hypervisor:Maximum vCPUs per guestGuest virtual machines support up to a maximum of 160 virtual CPUs in Red Hat Enterprise Linux 6.Constant TSC bitSystems without a Constant Time Stamp Counter require additional configuration. Refer to Chapter 14, KVM guest timing management for details on determining whether you have a Constant Time Stamp Counter and configuration steps for fixing any related issues.


Memory overcommitKVM supports memory overcommit and can store the memory of guest virtual machines in swap. A virtual machine will run slower if it is swapped frequently. Red Hat Knowledgebase has an article on safely and efficiently determining the size of the swap partition, available here: https://access.redhat.com/knowledge/solutions/15244. When KSM is used for memory overcommitting, make sure that the swap size follows the recommendations described in this article.

Important

When device assignment is in use, all virtual machine memory must be statically pre-allocated to enable DMA with the assigned device. Memory overcommit is therefore not supported with device assignment.CPU overcommitIt is not recommended to have more than 10 virtual CPUs per physical processor core. Customers are encouraged to use a capacity planning tool in order to determine the CPU overcommit ratio. Estimating an ideal ratio is difficult as it is highly dependent on each workload. For instance, a guest virtual machine may consume 100% CPU on one use case, and multiple guests may be completely idle on another.Red Hat does not support running more vCPUs to a single guest than the amount of overall physical cores that exist on the system. While Hyperthreads can be considered as cores, their performance can also vary from one scenario to the next, and they should not be expected to perform as well as regular cores.Refer to the Red Hat Enterprise Linux Virtualization Administration Guide for tips and recommendations on overcommitting CPUs.Virtualized SCSI devicesSCSI emulation is not supported with KVM in Red Hat Enterprise Linux.Virtualized IDE devicesKVM is limited to a maximum of four virtualized (emulated) IDE devices per guest virtual machine.Para-virtualized devicesPara-virtualized devices are also known as Virtio devices. They are purely virtual devices designed to work optimally in a virtual machine.Red Hat Enterprise Linux 6 supports 32 PCI device slots per virtual machine, and 8 PCI functions per device slot. This gives a theoretical maximum of 256 PCI functions per guest when multi-function capabilities are enabled.However, this theoretical maximum is subject to the following limitations:Each virtual machine supports a maximum of 8 assigned device functions.4 PCI device slots are configured with emulated devices by default. However, users can explicitly remove 2 of the emulated devices that are configured by default (the video adapter device in slot 2, and the memory balloon driver device in slot 3). This gives users a supported functional maximum of 30 PCI device slots per virtual machine.Migration restrictionsDevice assignment refers to physical devices that have been exposed to a virtual machine, for the exclusive use of that virtual machine. Because device assignment uses hardware on the specific host where the virtual machine runs, migration and save/restore are not supported when device assignment is in use. If the guest operating system supports hot-plugging, assigned devices can be removed prior to the migration or save/restore operation to enable this feature.Live migration is only possible between hosts with the same CPU type (that is, Intel to Intel or AMD to AMD only).For live migration, both hosts must have the same value set for the No eXecution (NX) bit, either on or off.For migration to work, cache=none must be specified for all block devices opened in write mode.

Warning

Failing to include the cache=none option can result in disk corruption.Storage restrictionsThere are risks associated with giving guest virtual machines write access to entire disks or block devices (such as /dev/sdb). If a guest virtual machine has access to an entire block device, it can share any volume label or partition table with the host machine. If bugs exist in the host system's partition recognition code, this can create a security risk. Avoid this risk by configuring the host machine to ignore devices assigned to a guest virtual machine.

Warning

Failing to adhere to storage restrictions can result in risks to security.SR-IOV restrictionsSR-IOV is only thoroughly tested with the following devices (other SR-IOV devices may work but have not been tested at the time of release):Intel® 82576NS Gigabit Ethernet Controller (igb driver)Intel® 82576EB Gigabit Ethernet Controller (igb driver)Intel® 82599ES 10 Gigabit Ethernet Controller (ixgbe driver)Intel® 82599EB 10 Gigabit Ethernet Controller (ixgbe driver)Core dumping restrictionsBecause core dumping is currently implemented on top of migration, it is not supported when device assignment is in use.PCI device assignment restrictionsPCI device assignment (attaching PCI devices to virtual machines) requires host systems to have AMD IOMMU or Intel VT-d support to enable device assignment of PCI-e devices.For parallel/legacy PCI, only single devices behind a PCI bridge are supported.Multiple PCIe endpoints connected through a non-root PCIe switch require ACS support in the PCIe bridges of the PCIe switch. To disable this restriction, edit the /etc/libvirt/qemu.conf file and insert the line:relaxed_acs_check=1Red Hat Enterprise Linux 6 has limited PCI configuration space access by guest device drivers. This limitation could cause drivers that are dependent on PCI configuration space to fail configuration.Red Hat Enterprise Linux 6.2 introduces interrupt remapping as a requirement for PCI device assignment. If your platform does not provide support for interrupt remapping, circumvent the KVM check for this support with the following command as the root user at the command line prompt:# echo 1 > /sys/module/kvm/parameters/allow_unsafe_assigned_interrupts

4.2. Application restrictions

There are aspects of virtualization which make it unsuitable for certain types of applications.Applications with high I/O throughput requirements should use the para-virtualized drivers for fully-virtualized guests. Without the para-virtualized drivers certain applications may be unpredictable under heavy I/O loads.The following applications should be avoided due to high I/O requirements:kdump servernetdump serverYou should carefully evaluate applications and tools that heavily utilize I/O or those that require real-time performance. Consider the para-virtualized drivers or PCI device assignment for increased I/O performance. Refer to Chapter 10, KVM Para-virtualized Drivers for more information on the para-virtualized drivers for fully virtualized guests. Refer to Chapter 12, PCI device configuration for more information on PCI device assignment.Applications suffer a small performance loss from running in virtualized environments. The performance benefits of virtualization through consolidating to newer and faster hardware should be evaluated against the potential application performance issues associated with using virtualization.

4.3. Other restrictions

For the list of all other restrictions and issues affecting virtualization read the Red Hat Enterprise Linux 6 Release Notes. The Red Hat Enterprise Linux 6 Release Notes cover the present new features, known issues and restrictions as they are updated or discovered.

Chapter 5. Installing the virtualization packages

5.1. Configuring a Virtualization Host installation5.2. Installing virtualization packages on an existing Red Hat Enterprise Linux systemBefore you can use virtualization, the virtualization packages must be installed on your computer. Virtualization packages can be installed either during the host installation sequence or after host installation using the yum command and the Red Hat Network (RHN).The KVM hypervisor uses the default Red Hat Enterprise Linux kernel with the kvmkernel module.

5.1. Configuring a Virtualization Host installation

This section covers installing virtualization tools and virtualization packages as part of a fresh Red Hat Enterprise Linux installation.

Note

The Red Hat Enterprise Linux Installation Guide, available from https://access.redhat.com/knowledge/docs/Red_Hat_Enterprise_Linux/, covers installing Red Hat Enterprise Linux in detail.

Procedure 5.1. Installing the virtualization package group

Launch the Red Hat Enterprise Linux 6 installation programStart an interactive Red Hat Enterprise Linux 6 installation from the Red Hat Enterprise Linux Installation CD-ROM, DVD or PXE.Continue installation up to package selectionComplete the other steps up to the package selection step.

Figure 5.1. The Red Hat Enterprise Linux package selection screen

Select the Virtualization Host server role to install a platform for guest virtual machines. Alternatively, ensure that the Customize Now radio button is selected before proceeding, to specify individual packages.Select the Virtualization package group.This selects the qemu-kvm emulator, virt-manager, libvirt and virt-viewer for installation.

Figure 5.2. The Red Hat Enterprise Linux package selection screen

Note

If you wish to create virtual machines in a graphical user interface (virt-manager) later, you should also select the General Purpose Desktop package group.Customize the packages (if required)Customize the Virtualization group if you require other virtualization packages.

Figure 5.3. The Red Hat Enterprise Linux package selection screen

Click on the Close button, then the Next button to continue the installation.When the installation is complete, reboot the system.

Important

You require a valid RHN virtualization entitlement to receive updates for the virtualization packages.

Installing KVM packages with Kickstart files

Kickstart files allow for large, automated installations without a user manually installing each individual host system. This section describes how to create and use a Kickstart file to install Red Hat Enterprise Linux with the Virtualization packages.In the %packages section of your Kickstart file, append the following package groups:@virtualization @virtualization-client @virtualization-platform @virtualization-toolsFor more information about Kickstart files, refer to the Red Hat Enterprise Linux Installation Guide, available from https://access.redhat.com/knowledge/docs/Red_Hat_Enterprise_Linux/.

5.2. Installing virtualization packages on an existing Red Hat Enterprise Linux system

This section describes the steps for installing the KVM hypervisor on a working Red Hat Enterprise Linux 6 or newer system.To install the packages, your machines must be registered. There are two methods of registering an unregistered installation of Red Hat Enterprise Linux:To register via RHN Classic, run the rhn_register command and follow the prompts.To register via Red Hat Subscription Manager, run the subscription-manager register command and follow the prompts.If you do not have a valid Red Hat subscription, visit the Red Hat online store to obtain one.

Installing the virtualization packages with yum

To use virtualization on Red Hat Enterprise Linux you require at least the qemu-kvm and qemu-img packages. These packages provide the user-level KVM emulator and disk image manager on the host Red Hat Enterprise Linux system.To install the qemu-kvm and qemu-img packages, run the following command:# yum install qemu-kvm qemu-imgSeveral additional virtualization management packages are also available:

Recommended virtualization packages

python-virtinstProvides the virt-install command for creating virtual machines.libvirtThe libvirt package provides the server and host side libraries for interacting with hypervisors and host systems. The libvirt package provides the libvirtd daemon that handles the library calls, manages virtual machines and controls the hypervisor.libvirt-pythonThe libvirt-python package contains a module that permits applications written in the Python programming language to use the interface supplied by the libvirt API.virt-managervirt-manager, also known as Virtual Machine Manager, provides a graphical tool for administering virtual machines. It uses libvirt-client library as the management API.libvirt-clientThe libvirt-client package provides the client-side APIs and libraries for accessing libvirtservers. The libvirt-client package includes the virsh command line tool to manage and control virtual machines and hypervisors from the command line or a special virtualization shell.Install all of these recommended virtualization packages with the following command:# yum install virt-manager libvirt libvirt-python python-virtinst libvirt-client

Installing Virtualization package groups

The virtualization packages can also be installed from package groups. The following table describes the virtualization package groups and what they provide.

Note

Note that the qemu-img package is installed as a dependency of the Virtualizationpackage group if it is not already installed on the system. It can also be installed manually with the yum install qemu-img command as described previously.

Table 5.1. Virtualization Package Groups

Package GroupDescriptionMandatory PackagesOptional PackagesVirtualizationProvides an environment for hosting virtual machinesqemu-kvmqemu-guest-agent, qemu-kvm-toolsVirtualization ClientClients for installing and managing virtualization instancespython-virtinst, virt-manager, virt-viewervirt-topVirtualization PlatformProvides an interface for accessing and controlling virtual machines and containerslibvirt, libvirt-client, virt-who, virt-whatfence-virtd-libvirt, fence-virtd-multicast, fence-virtd-serial, libvirt-cim, libvirt-java, libvirt-qmf, libvirt-snmp, perl-Sys-VirtVirtualization ToolsTools for offline virtual image managementlibguestfslibguestfs-java, libguestfs-tools, virt-v2vTo install a package group, run the yum groupinstall <groupname> command. For instance, to install the Virtualization Tools package group, run the yum groupinstall "Virtualization Tools" command.

Chapter 6. Guest virtual machine installation overview

6.1. Guest virtual machine prerequisites and considerations6.2. Creating guests with virt-install6.3. Creating guests with virt-manager6.4. Installing guest virtual machines with PXEAfter you have installed the virtualization packages on the host system you can create guest operating systems. This chapter describes the general processes for installing guest operating systems on virtual machines. You can create guest virtual machines using the New button in virt-manager or use the command line interface virt-install. Both methods are covered by this chapter.Detailed installation instructions are available in the following chapters for specific versions of Red Hat Enterprise Linux and Microsoft Windows.

6.1. Guest virtual machine prerequisites and considerations

Various factors should be considered before creating any guest virtual machines. Not only should the role of a virtual machine be considered before deployment, but regular ongoing monitoring and assessment based on variable factors (load, amount of clients) should be performed. Some factors include:PerformanceGuest virtual machines should be deployed and configured based on their intended tasks. Some guest systems (for instance, guests running a database server) may require special performance considerations. Guests may require more assigned CPUs or memory based on their role and projected system load.Input/Output requirements and types of Input/OutputSome guest virtual machines may have a particularly high I/O requirement or may require further considerations or projections based on the type of I/O (for instance, typical disk block size access, or the amount of clients).StorageSome guest virtual machines may require higher priority access to storage or faster disk types, or may require exclusive access to areas of storage. The amount of storage used by guests should also be regularly monitored and taken into account when deploying and maintaining storage.Networking and network infrastructureDepending upon your environment, some guest virtual machines could require faster network links than other guests. Bandwidth or latency are often factors when deploying and maintaining guests, especially as requirements or load changes.Request requirementsSCSI requests can only be issued to guest virtual machines on virtio drives if the virtio drives are backed by whole disks, and the disk device parameter is set to lun, as shown in the following example:<devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='block' device='lun'>

6.2. Creating guests with virt-install

You can use the virt-install command to create guest virtual machines 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 that can be passed on the command line. To see a complete list of options run the following command:# virt-install --helpNote that you need root privileges in order for virt-install commands to complete successfully. 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 --graphics option which allows graphical installation of a virtual machine.

Example 6.1. Using virt-install to install a Red Hat Enterprise Linux 5 guest virtual machine

This example creates a Red Hat Enterprise Linux 5 guest:virt-install \ --name=guest1-rhel5-64 \ --file=/var/lib/libvirt/images/guest1-rhel5-64.dsk \ --file-size=8 \ --nonsparse --graphics spice \ --vcpus=2 --ram=2048 \ --location=http://example1.com/installation_tree/RHEL5.6-Server-x86_64/os \ --network bridge=br0 \ --os-type=linux \ --os-variant=rhel5.4Ensure that you select the correct os-type for your operating system when running this command.Refer to man virt-install for more examples.

Note

When installing a Windows guest with virt-install, the --os-type=windowsoption is recommended. This option prevents the CD-ROM from disconnecting when rebooting during the installation procedure. The --os-variant option further optimizes the configuration for a specific guest operating system.

6.3. Creating guests with virt-manager

virt-manager, also known as Virtual Machine Manager, is a graphical tool for creating and managing guest virtual machines.

Procedure 6.1. Creating a guest virtual machine with virt-manager

Open virt-managerStart virt-manager. Launch the Virtual Machine Manager application from the Applications menu and System Tools submenu. Alternatively, run the virt-managercommand as root.Optional: Open a remote hypervisorSelect the hypervisor and press the Connect button to connect to the remote hypervisor.Create a new virtual machineThe virt-manager window allows you to create a new virtual machine. Click the Create a new virtual machine button (Figure 6.1, "Virtual Machine Manager window") to open the New VM wizard.

Figure 6.1. Virtual Machine Manager window

The New VM wizard breaks down the virtual machine creation process into five steps:Naming the guest virtual machine and choosing the installation typeLocating and configuring the installation mediaConfiguring memory and CPU optionsConfiguring the virtual machine's storageConfiguring networking, architecture, and other hardware settingsEnsure that virt-manager can access the installation media (whether locally or over the network) before you continue.Specify name and installation typeThe guest virtual machine creation process starts with the selection of a name and installation type. Virtual machine names can have underscores (_), periods (.), and hyphens (-).

Figure 6.2. Name virtual machine and select installation method

Type in a virtual machine name and choose an installation type:Local install media (ISO image or CDROM)This method uses a CD-ROM, DVD, or image of an installation disk (for example, .iso).Network Install (HTTP, FTP, or NFS)Network installing involves the use of a mirrored Red Hat Enterprise Linux or Fedora installation tree to install a guest. The installation tree must be accessible through either HTTP, FTP, or NFS.Network Boot (PXE)This method uses a Preboot eXecution Environment (PXE) server to install the guest virtual machine. Setting up a PXE server is covered in the Deployment Guide. To install via network boot, the guest must have a routable IP address or shared network device. For information on the required networking configuration for PXE installation, refer to Section 6.4, "Installing guest virtual machines with PXE".Import existing disk imageThis method allows you to create a new guest virtual machine and import a disk image (containing a pre-installed, bootable operating system) to it.Click Forward to continue.Configure installationNext, configure the OS type and Version of the installation. Ensure that you select the appropriate OS type for your virtual machine. Depending on the method of installation, provide the install URL or existing storage path.

Figure 6.3. Remote installation URL

Figure 6.4. Local ISO image installation

Configure CPU and memoryThe next step involves configuring the number of CPUs and amount of memory to allocate to the virtual machine. The wizard shows the number of CPUs and amount of memory you can allocate; configure these settings and click Forward.

Figure 6.5. Configuring CPU and Memory

Configure storageAssign storage to the guest virtual machine.

Figure 6.6. Configuring virtual storage

If you chose to import an existing disk image during the first step, virt-manager will skip this step.Assign sufficient space for your virtual machine and any applications it requires, then click Forward to continue.Final configurationVerify the settings of the virtual machine and click Finish when you are satisfied; doing so will create the virtual machine with default networking settings, virtualization type, and architecture.

Figure 6.7. Verifying the configuration

If you prefer to further configure the virtual machine's hardware first, check the Customize configuration before install box first before clicking Finish. Doing so will open another wizard that will allow you to add, remove, and configure the virtual machine's hardware settings.After configuring the virtual machine's hardware, click Apply. virt-manager will then create the virtual machine with your specified hardware settings.



6.4. Installing guest virtual machines with PXE

Requirements

PXE guest installation requires a PXE server running on the same subnet as the guest virtual machines you wish to install. The method of accomplishing this depends on how the virtual machines are connected to the network. Contact Support if you require assistance setting up a PXE server.

PXE installation with virt-install

virt-install PXE installations require both the --network=bridge:installation parameter, where installation is the name of your bridge, and the --pxe parameter.By default, if no network is found, the guest virtual machine attempts to boot from alternative bootable devices. If there is no other bootable device found, the guest pauses. You can use the qemu-kvm boot parameter reboot-timeout to allow the guest to retry booting if no bootable device is found, like so:# qemu-kvm -boot reboot-timeout=1000

Example 6.2. Fully-virtualized PXE installation with virt-install

# virt-install --hvm --connect qemu:///system \ --network=bridge:installation --pxe --graphics spice \ --name rhel6-machine --ram=756 --vcpus=4 \ --os-type=linux --os-variant=rhel6 \ --disk path=/var/lib/libvirt/images/rhel6-machine.img,size=10Note that the command above cannot be executed in a text-only environment. A fully-virtualized (--hvm) guest can only be installed in a text-only environment if the --location and --extra-args "console=console_type" are provided instead of the --graphics spice parameter.

Procedure 6.2. PXE installation with virt-manager

Select PXESelect PXE as the installation method and follow the rest of the steps to configure the OS type, memory, CPU and storage settings.

Figure 6.8. Selecting the installation method

Figure 6.9. Selecting the installation type

Figure 6.10. Specifying virtualized hardware details

Figure 6.11. Specifying storage details

Start the installationThe installation is ready to start.

Figure 6.12. Finalizing virtual machine details

A DHCP request is sent and if a valid PXE server is found the guest virtual machine's installation processes will start.

Chapter 7. Installing a Red Hat Enterprise Linux 6 guest virtual machine on a Red Hat Enterprise Linux 6 host

7.1. Creating a Red Hat Enterprise Linux 6 guest with local installation media7.2. Creating a Red Hat Enterprise Linux 6 guest with a network installation tree7.3. Creating a Red Hat Enterprise Linux 6 guest with PXEThis chapter covers how to install a Red Hat Enterprise Linux 6 guest virtual machine on a Red Hat Enterprise Linux 6 host.These procedures assume that the KVM hypervisor and all other required packages are installed and the host is configured for virtualization.

Note

For more information on installing the virtualization packages, refer to Chapter 5, Installing the virtualization packages.

7.1. Creating a Red Hat Enterprise Linux 6 guest with local installation media

This procedure covers creating a Red Hat Enterprise Linux 6 guest virtual machine with a locally stored installation DVD or DVD image. DVD images are available from http://access.redhat.com for Red Hat Enterprise Linux 6.

Procedure 7.1. Creating a Red Hat Enterprise Linux 6 guest virtual machine with virt-manager

Optional: PreparationPrepare the storage environment for the virtual machine. For more information on preparing storage, refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide.

Important

Various storage types may be used for storing guest virtual machines. However, for a virtual machine to be able to use migration features the virtual machine must be created on networked storage.Red Hat Enterprise Linux 6 requires at least 1GB of storage space. However, Red Hat recommends at least 5GB of storage space for a Red Hat Enterprise Linux 6 installation and for the procedures in this guide.Open virt-manager and start the wizardOpen virt-manager by executing the virt-manager command as root or opening Applications → System Tools → Virtual Machine Manager.

Figure 7.1. The Virtual Machine Manager window

Click on the Create a new virtual machine button to start the new virtualized guest wizard.

Figure 7.2. The Create a new virtual machine button

The New VM window opens.Name the virtual machineVirtual machine names can contain letters, numbers and the following characters: '_', '.' and '-'. Virtual machine names must be unique for migration and cannot consist only of numbers.Choose the Local install media (ISO image or CDROM) radio button.

Figure 7.3. The New VM window - Step 1

Click Forward to continue.Select the installation mediaSelect the appropriate radio button for your installation media.

Figure 7.4. Locate your install media

If you wish to install from a CD-ROM or DVD, select the Use CDROM or DVD radio button, and select the appropriate disk drive from the drop-down list of drives available.If you wish to install from an ISO image, select Use ISO image, and then click the Browse... button to open the Locate media volume window.Select the installation image you wish to use, and click Choose Volume.If no images are displayed in the Locate media volume window, click on the Browse Local button to browse the host machine for the installation image or DVD drive containing the installation disk. Select the installation image or DVD drive containing the installation disk and click Open; the volume is selected for use and you are returned to the Create a new virtual machine wizard.

Important

For ISO image files and guest storage images, the recommended location to use is /var/lib/libvirt/images/. Any other location may require additional configuration by SELinux. Refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide for more details on configuring SELinux.Select the operating system type and version which match the installation media you have selected.

Figure 7.5. The New VM window - Step 2

Click Forward to continue.Set RAM and virtual CPUsChoose appropriate values for the virtual CPUs and RAM allocation. These values affect the host's and guest's performance. Memory and virtual CPUs can be overcommitted. For more information on overcommitting, refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide.Virtual machines require sufficient physical memory (RAM) to run efficiently and effectively. Red Hat supports a minimum of 512MB of RAM for a virtual machine. Red Hat recommends at least 1024MB of RAM for each logical core.Assign sufficient virtual CPUs for the virtual machine. If the virtual machine runs a multithreaded application, assign the number of virtual CPUs the guest virtual machine will require to run efficiently.You cannot assign more virtual CPUs than there are physical processors (or hyper-threads) available on the host system. The number of virtual CPUs available is noted in the Up to X available field.

Figure 7.6. The new VM window - Step 3

Click Forward to continue.StorageEnable and assign storage for the Red Hat Enterprise Linux 6 guest virtual machine. Assign at least 5GB for a desktop installation or at least 1GB for a minimal installation.

Note

Live and offline migrations require virtual machines to be installed on shared network storage. For information on setting up shared storage for virtual machines, refer to the Red Hat Enterprise Linux Virtualization Administration Guide.With the default local storageSelect the Create a disk image on the computer's hard drive radio button to create a file-based image in the default storage pool, the /var/lib/libvirt/images/ directory. Enter the size of the disk image to be created. If the Allocate entire disk now check box is selected, a disk image of the size specified will be created immediately. If not, the disk image will grow as it becomes filled.

Figure 7.7. The New VM window - Step 4

Click Forward to create a disk image on the local hard drive. Alternatively, select Select managed or other existing storage, then select Browse to configure managed storage.With a storage poolIf you selected Select managed or other existing storage in the previous step to use a storage pool and clicked Browse, the Locate or create storage volume window will appear.

Figure 7.8. The Locate or create storage volume window

Select a storage pool from the Storage Pools list.Optional: Click on the New Volume button to create a new storage volume. The Add a Storage Volume screen will appear. Enter the name of the new storage volume.Choose a format option from the Format dropdown menu. Format options include raw, cow, qcow, qcow2, qed, vmdk, and vpc. Adjust other fields as desired.

Figure 7.9. The Add a Storage Volume window

Click Finish to continue.Verify and finishVerify there were no errors made during the wizard and everything appears as expected.Select the Customize configuration before install check box to change the guest's storage or network devices, to use the para-virtualized drivers or to add additional devices.Click on the Advanced options down arrow to inspect and modify advanced options. For a standard Red Hat Enterprise Linux 6 installation, none of these options require modification.

Figure 7.10. The New VM window - local storage

Click Finish to continue into the Red Hat Enterprise Linux installation sequence. For more information on installing Red Hat Enterprise Linux 6 refer to the Red Hat Enterprise Linux 6 Installation Guide.A Red Hat Enterprise Linux 6 guest virtual machine is now created from an ISO installation disc image.

7.2. Creating a Red Hat Enterprise Linux 6 guest with a network installation tree

Procedure 


6.4. Installing guest virtual machines with PXE

Requirements

PXE guest installation requires a PXE server running on the same subnet as the guest virtual machines you wish to install. The method of accomplishing this depends on how the virtual machines are connected to the network. Contact Support if you require assistance setting up a PXE server.

PXE installation with virt-install

virt-install PXE installations require both the --network=bridge:installation parameter, where installation is the name of your bridge, and the --pxe parameter.By default, if no network is found, the guest virtual machine attempts to boot from alternative bootable devices. If there is no other bootable device found, the guest pauses. You can use the qemu-kvm boot parameter reboot-timeout to allow the guest to retry booting if no bootable device is found, like so:# qemu-kvm -boot reboot-timeout=1000

Example 6.2. Fully-virtualized PXE installation with virt-install

# virt-install --hvm --connect qemu:///system \ --network=bridge:installation --pxe --graphics spice \ --name rhel6-machine --ram=756 --vcpus=4 \ --os-type=linux --os-variant=rhel6 \ --disk path=/var/lib/libvirt/images/rhel6-machine.img,size=10Note that the command above cannot be executed in a text-only environment. A fully-virtualized (--hvm) guest can only be installed in a text-only environment if the --location and --extra-args "console=console_type" are provided instead of the --graphics spice parameter.

Procedure 6.2. PXE installation with virt-manager

Select PXESelect PXE as the installation method and follow the rest of the steps to configure the OS type, memory, CPU and storage settings.

Figure 6.8. Selecting the installation method

Figure 6.9. Selecting the installation type

Figure 6.10. Specifying virtualized hardware details

Figure 6.11. Specifying storage details

Start the installationThe installation is ready to start.

Figure 6.12. Finalizing virtual machine details

A DHCP request is sent and if a valid PXE server is found the guest virtual machine's installation processes will start.

Chapter 7. Installing a Red Hat Enterprise Linux 6 guest virtual machine on a Red Hat Enterprise Linux 6 host

7.1. Creating a Red Hat Enterprise Linux 6 guest with local installation media7.2. Creating a Red Hat Enterprise Linux 6 guest with a network installation tree7.3. Creating a Red Hat Enterprise Linux 6 guest with PXEThis chapter covers how to install a Red Hat Enterprise Linux 6 guest virtual machine on a Red Hat Enterprise Linux 6 host.These procedures assume that the KVM hypervisor and all other required packages are installed and the host is configured for virtualization.

Note

For more information on installing the virtualization packages, refer to Chapter 5, Installing the virtualization packages.

7.1. Creating a Red Hat Enterprise Linux 6 guest with local installation media

This procedure covers creating a Red Hat Enterprise Linux 6 guest virtual machine with a locally stored installation DVD or DVD image. DVD images are available from http://access.redhat.com for Red Hat Enterprise Linux 6.

Procedure 7.1. Creating a Red Hat Enterprise Linux 6 guest virtual machine with virt-manager

Optional: PreparationPrepare the storage environment for the virtual machine. For more information on preparing storage, refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide.

Important

Various storage types may be used for storing guest virtual machines. However, for a virtual machine to be able to use migration features the virtual machine must be created on networked storage.Red Hat Enterprise Linux 6 requires at least 1GB of storage space. However, Red Hat recommends at least 5GB of storage space for a Red Hat Enterprise Linux 6 installation and for the procedures in this guide.Open virt-manager and start the wizardOpen virt-manager by executing the virt-manager command as root or opening Applications → System Tools → Virtual Machine Manager.

Figure 7.1. The Virtual Machine Manager window

Click on the Create a new virtual machine button to start the new virtualized guest wizard.

Figure 7.2. The Create a new virtual machine button

The New VM window opens.Name the virtual machineVirtual machine names can contain letters, numbers and the following characters: '_', '.' and '-'. Virtual machine names must be unique for migration and cannot consist only of numbers.Choose the Local install media (ISO image or CDROM) radio button.

Figure 7.3. The New VM window - Step 1

Click Forward to continue.Select the installation mediaSelect the appropriate radio button for your installation media.

Figure 7.4. Locate your install media

If you wish to install from a CD-ROM or DVD, select the Use CDROM or DVD radio button, and select the appropriate disk drive from the drop-down list of drives available.If you wish to install from an ISO image, select Use ISO image, and then click the Browse... button to open the Locate media volume window.Select the installation image you wish to use, and click Choose Volume.If no images are displayed in the Locate media volume window, click on the Browse Local button to browse the host machine for the installation image or DVD drive containing the installation disk. Select the installation image or DVD drive containing the installation disk and click Open; the volume is selected for use and you are returned to the Create a new virtual machine wizard.

Important

For ISO image files and guest storage images, the recommended location to use is /var/lib/libvirt/images/. Any other location may require additional configuration by SELinux. Refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide for more details on configuring SELinux.Select the operating system type and version which match the installation media you have selected.

Figure 7.5. The New VM window - Step 2

Click Forward to continue.Set RAM and virtual CPUsChoose appropriate values for the virtual CPUs and RAM allocation. These values affect the host's and guest's performance. Memory and virtual CPUs can be overcommitted. For more information on overcommitting, refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide.Virtual machines require sufficient physical memory (RAM) to run efficiently and effectively. Red Hat supports a minimum of 512MB of RAM for a virtual machine. Red Hat recommends at least 1024MB of RAM for each logical core.Assign sufficient virtual CPUs for the virtual machine. If the virtual machine runs a multithreaded application, assign the number of virtual CPUs the guest virtual machine will require to run efficiently.You cannot assign more virtual CPUs than there are physical processors (or hyper-threads) available on the host system. The number of virtual CPUs available is noted in the Up to X available field.

Figure 7.6. The new VM window - Step 3

Click Forward to continue.StorageEnable and assign storage for the Red Hat Enterprise Linux 6 guest virtual machine. Assign at least 5GB for a desktop installation or at least 1GB for a minimal installation.

Note

Live and offline migrations require virtual machines to be installed on shared network storage. For information on setting up shared storage for virtual machines, refer to the Red Hat Enterprise Linux Virtualization Administration Guide.With the default local storageSelect the Create a disk image on the computer's hard drive radio button to create a file-based image in the default storage pool, the /var/lib/libvirt/images/ directory. Enter the size of the disk image to be created. If the Allocate entire disk now check box is selected, a disk image of the size specified will be created immediately. If not, the disk image will grow as it becomes filled.

Figure 7.7. The New VM window - Step 4

Click Forward to create a disk image on the local hard drive. Alternatively, select Select managed or other existing storage, then select Browse to configure managed storage.With a storage poolIf you selected Select managed or other existing storage in the previous step to use a storage pool and clicked Browse, the Locate or create storage volume window will appear.

Figure 7.8. The Locate or create storage volume window

Select a storage pool from the Storage Pools list.Optional: Click on the New Volume button to create a new storage volume. The Add a Storage Volume screen will appear. Enter the name of the new storage volume.Choose a format option from the Format dropdown menu. Format options include raw, cow, qcow, qcow2, qed, vmdk, and vpc. Adjust other fields as desired.

Figure 7.9. The Add a Storage Volume window

Click Finish to continue.Verify and finishVerify there were no errors made during the wizard and everything appears as expected.Select the Customize configuration before install check box to change the guest's storage or network devices, to use the para-virtualized drivers or to add additional devices.Click on the Advanced options down arrow to inspect and modify advanced options. For a standard Red Hat Enterprise Linux 6 installation, none of these options require modification.

Figure 7.10. The New VM window - local storage

Click Finish to continue into the Red Hat Enterprise Linux installation sequence. For more information on installing Red Hat Enterprise Linux 6 refer to the Red Hat Enterprise Linux 6 Installation Guide.A Red Hat Enterprise Linux 6 guest virtual machine is now created from an ISO installation disc image.

7.2. Creating a Red Hat Enterprise Linux 6 guest with a network installation tree

Procedure 










★★★★















★★★★★











★★★★★

7 comments:

  1. ACCESS SCRIPTING

    Lock release

    The locks are all implicitly released when the process that acquired them exits, however, a process may voluntarily give up the lock by running char *state = NULL; virLockManagerParam params[] = { { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UUID, .key = "uuid", }, { .type = VIR_LOCK_MANAGER_PARAM_TYPE_STRING, .key = "name", .value = { .str = dom->def->name }, }, { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT, .key = "id", .value = { .i = dom->def->id }, }, { .type = VIR_LOCK_MANAGER_PARAM_TYPE_UINT, .key = "pid", .value = { .i = dom->pid }, }, { .type = VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING, .key = "uri", .value = { .cstr = driver->uri }, }, }; mgr = virLockManagerNew(lockPlugin, VIR_LOCK_MANAGER_TYPE_DOMAIN, ARRAY_CARDINALITY(params), params, 0))); foreach (initial disks) virLockManagerAddResource(mgr, VIR_LOCK_MANAGER_RESOURCE_TYPE_DISK, $path, 0, NULL, $flags); virLockManagerRelease(mgr, & state, 0); The returned state string can be passed to the virLockManagerAcquire method to later re-acquire the exact same locks. This state transfer is commonly used when performing live migration of virtual machines. By validating the state the lock manager can ensure no other VM has re-acquire the same locks on a different host. The state can also be obtained without releasing the locks, by calling the virLockManagerInquire method





    ReplyDelete


  2. KEEP 64 BIT WIN 7 FROM JOINING DOMAIN


    Re:Win 7 64bit will not join a domain 2 Years, 3 Months ago Don't know, but we had an interesting development. The next day the other IT guy switched the RequireStrongKey registry key back to 1 and didn't have any problems joining the domain. I swear it didn't work when I tried it, until I changed that registry key. Then it connected to the network but couldn't establish a trust relationship. The next day Jon changes the key back, joins right up and the trust relationship is there. Beats me. Honestly as long as it works I really don't care.Chris Fresh BoarderPosts: 17  


    ReplyDelete

  3. KEEP 64 BIT WIN 7 FROM JOINING DOMAIN I recently installed clearOS (inluding a PDC w. Roaming Profiles) to replace my aging Win 2000 Server. At first, I could not join my Wn 7 Pro 64-bit client to the Samba domain. After adding the following to the registry:HKLM\System\CCS\Services\LanmanWorkstation\ParametersDWORD DomainCompatibilityMode = 1DWORD DNSNameResolutionRequired = 0as per clearOS doc.www.clearcenter.com/support/documentatio...ide/windows_settingsI had no problems joining my Win 7 64-bit client to the domain. I wonder if there's some difference in those who've had difficulty?


    ReplyDelete
  4. KEEP 64 BIT WIN 7 FROM JOINING DOMAIN



    hat, my good man, worked  Many, many thanks for your assistance! Even after applying these fixes I still had to change the:DWORD RequireStrongKey = 0 and then afterward change it back. Nonetheless, I can login to the domain!Great Job!


    Win 7 64bit will not join a domain 2 Years, 3 Months ago I just went through the process with a 64 bit Windows 7 machine. Applied the samba reg patch, applied the hotfix from Microsoft and I'm still getting the "domain cannot be found" error. I went and checked the XP Pro machines and they can login to the network domain, no problems. This is just the Windows 7 machine. I did notice I didn't have the RequireStrongKey DWORD reg key, even after the hotfixes. 

    ReplyDelete


  5. KEEP 64 BIT WIN 7 FROM JOINING DOMAIN
    Forum Tools#16967Win 7 64bit will not join a domain 2 Years, 4 Months ago Hello everyone!Can someone shed some light on the subject of ClearOS 5.2, Samba, and Windows 7?I'm trying to add a win7 64 bit workstation to my domain but I still get the "specified domain can't be located blah, blah, blah.Typically, this can be solved with the reg hack but apparently the lanman parameters for 64 bit are different . . .So, does anybody know the solution to add a win7 64bit to a domain?Thanks in advance for your help!Keith Osburn Junior BoarderPosts: 39  The administrator has disabled public write access. #16971Re:Win 7 64bit will not join a domain 2 Years, 4 Months ago I think I am right but its a vague memory but I think you need to disable 128 bit encryption. Its enforced in Win 7. Do a google for win 7 and samba domains as there are a couple of reg edits.You have got win 7 pro or ultimate as otherwise its "Computer says no"Stuart Naylor Expert BoarderPosts: 86  The administrator has disabled public write access. #16981Re:Win 7 64bit will not join a domain 2 Years, 4 Months ago You should not need to do anything except run the patch for the two registry keys. You can find this in the samba wiki. What verison of Win 7 is this? You can't use any of the "home" versions.DrewDrew Vonada-Smith Platinum BoarderPosts: 431  The administrator has disabled public write access. #16982Re:Win 7 64bit will not join a domain 2 Years, 4 Months ago Hi!First apply this fix from Samba WikiNext download this fix from Microsoft.Now, restart Windows 7 x64 workstation.Domain Join should work.Piotr Smalira ModeratorPosts: 172   Last Edit: 2010/09/07 07:48 By smali.The administrator has disabled public write access.Regards!Piotr SmaliraPolish ClearOS Translator & Moderator#GG: 1333493E-mail: p.smalira at g16-lublin.eu #17069Re:Win 7 64bit will not join a domain 2 Years, 4 Months ago That, my good man, worked  Many, many thanks for your assistance! Even after applying these fixes I still had to change the:DWORD RequireStrongKey = 0 and then afterward change it back. Nonetheless, I can login to the domain!Great Job!If I could find a replacement for Novell's Zenworks app launcher I'd jump off the Novell ship in a hurry  ClearOS is just perfect!Keith Osburn Junior BoarderPosts: 39  The administrator has disabled public write access. #17823Re:Win 7 64bit will not join a domain 2 Years, 3 Months ago I just went through the process with a 64 bit Windows 7 machine. Applied the samba reg patch, applied the hotfix from Microsoft and I'm still getting the "domain cannot be found" error. I went and checked the XP Pro machines and they can login to the network domain, no problems. This is just the Windows 7 machine. I did notice I didn't have the RequireStrongKey DWORD reg key, even after the hotfixes. This is Windows 7 Pro 64 bitChris Fresh BoarderPosts: 17  The administrator has disabled public write access. #17917Re:Win 7 64bit will not join a domain 2 Years, 3 Months ago Okay, got it to work this morning. It will join the domain, but it seems to do so reluctantly. Still working on the mapped drives reconnecting at logon. Anyway, here is the article with the key:You'll need to run the sambas fix and Microsoft hotfix linked above, then follow this procedure.Windows 7 on Samba domainThe fixes add the missing registry entries, but you still have to mod the RequireStrongKey to 0. If you're working on this late Friday, like we were, you might not notice that registry key is in a different service. It astounds me that Microsoft never considers, or doesn't want to consider, that their OS might be connecting to networks on a variety of platforms. It's not fair to make open source applications responsible for their poor judgment, but when the boss is coming in every day asking if it's working, you do what you have to do to get the job done.Chris Fresh BoarderPosts: 17  The administrator has disabled publi

    http://libvirt.org/drivers.html




    ReplyDelete
  6. KEEP 64 BIT WIN 7 FROM JOINING DOMAIN
    These are the settings they do to make it work



    DWORD RequireStrongKey = 0 
    HKLM\System\CCS\Services\LanmanWorkstation\ParametersDWORD DomainCompatibilityMode = 1DWORD DNSNameResolutionRequired = 0
    http://support.microsoft.com/kb/2171571
    http://libvirt.org/drivers.html

    http://www.clearcenter.com/support/documentation/clearos_enterprise_5.2/user_guide/windows_settings

    First apply this fix from Samba WikiNext download this fix from Microsoft.Now, restart Windows 7 x64 workstation

    You should not need to do anything except run the patch for the two registry keys. You can find this in the samba wiki. What verison of Win 7 is this? You can't use any of the "home" versions.

    ReplyDelete
  7. Nice stuff dear. I really love to read this all stuff. Thin Client Software & Citrix Thin Client

    ReplyDelete