Virtualization Guide - Virtualization Documentation - Oracle

1y ago
7.17 MB
440 Pages
Last View : 18d ago
Last Download : 6m ago
Upload by : Kaden Thurman

Red Hat Enterprise Linux 5Virtualization GuideVirtualization Documentation

Virtualization GuideRed Hat Enterprise Linux 5 Virtualization GuideVirtualization DocumentationEdition 5.8Authorrhelv5-list@redhat.comCopyright 2008, 2009, 2010, 2011 Red Hat, Inc.The text of and illustrations in this document are licensed by Red Hat under a Creative CommonsAttribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is availableat In accordance with CC-BY-SA, if you distribute thisdocument or an adaptation of it, you must provide the URL for the original version.Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the InfinityLogo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.Linux is the registered trademark of Linus Torvalds in the United States and other countries.Java is a registered trademark of Oracle and/or its affiliates.XFS is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United Statesand/or other countries.MySQL is a registered trademark of MySQL AB in the United States, the European Union and othercountries.All other trademarks are the property of their respective owners.1801 Varsity DriveRaleigh, NC 27606-2072 USAPhone: 1 919 754 3700Phone: 888 733 4281Fax: 1 919 754 3701The Red Hat Enterprise Linux Virtualization Guide contains information on installation, configuring,administering, and troubleshooting virtualization technologies included with Red Hat Enterprise Linux.

Prefaceix1. About this book . ix2. Document Conventions . ix2.1. Typographic Conventions . ix2.2. Pull-quote Conventions . xi2.3. Notes and Warnings . xi3. We need your feedback . xii3.1. Technical review requests . xii4. What is Virtualization? . xiii5. Types of Virtualization . xiii5.1. Full Virtualization . xiii5.2. Para-Virtualization . xiii5.3. Para-virtualized drivers . xiii6. How CIOs should think about virtualization . xiiiI. Requirements and Limitations for Virtualization with Red Hat Enterprise Linux11. System requirements32. Xen restrictions and support53. KVM restrictions and support74. Hyper-V restrictions and support95. Virtualization limitations5.1. General limitations for virtualization .5.2. KVM limitations .5.3. Xen limitations .5.4. Application limitations .II. Installation1111111214156. Installing the virtualization packages6.1. Installing Xen with a new Red Hat Enterprise Linux installation .6.2. Installing Xen packages on an existing Red Hat Enterprise Linux system .6.3. Installing KVM with a new Red Hat Enterprise Linux installation .6.4. Installing KVM packages on an existing Red Hat Enterprise Linux system .17172122277. Virtualized guest installation overview7.1. Creating guests with virt-install .7.2. Creating guests with virt-manager .7.3. Installing guests with PXE .292929488. Guest operating system installation procedures558.1. Installing Red Hat Enterprise Linux 5 as a para-virtualized guest . 558.2. Installing Red Hat Enterprise Linux as a fully virtualized guest . 988.3. Installing Windows XP as a fully virtualized guest . 1148.4. Installing Windows Server 2003 as a fully virtualized guest . 1398.5. Installing Windows Server 2008 as a fully virtualized guest . 144III. Configuration9. Virtualized storage devices9.1. Creating a virtualized floppy disk controller .9.2. Adding storage devices to guests .9.3. Configuring persistent storage in Red Hat Enterprise Linux 5 .159161161162165iii

Virtualization Guide9.4. Add a virtualized CD-ROM or DVD device to a guest . 16710. Network Configuration16910.1. Network address translation (NAT) with libvirt . 16910.2. Bridged networking with libvirt . 17011. Pre-Red Hat Enterprise Linux 5.4 Xen networking17511.1. Configuring multiple guest network bridges to use multiple Ethernet cards . 17511.2. Red Hat Enterprise Linux 5.0 laptop network configuration . 17712. Xen Para-virtualized Drivers12.1. System requirements .12.2. Para-virtualization Restrictions and Support .12.3. Installing the Para-virtualized Drivers .12.3.1. Common installation steps .12.3.2. Installation and Configuration of Para-virtualized Drivers on Red HatEnterprise Linux 3 .12.3.3. Installation and Configuration of Para-virtualized Drivers on Red HatEnterprise Linux 4 .12.3.4. Xen Para-virtualized Drivers on Red Hat Enterprise Linux 5 .12.3.5. Xen Para-virtualized Drivers on Red Hat Enterprise Linux 6 .12.4. Para-virtualized Network Driver Configuration .12.5. Additional Para-virtualized Hardware Configuration .12.5.1. Virtualized Network Interfaces .12.5.2. Virtual Storage Devices .18118218318518619119419619720220220313. KVM Para-virtualized Drivers13.1. Installing the KVM Windows para-virtualized drivers .13.2. Installing drivers with a virtualized floppy disk .13.3. Using KVM para-virtualized drivers for existing devices .13.4. Using KVM para-virtualized drivers for new devices .20520521721821818714. PCI passthrough22314.1. Adding a PCI device with virsh . 22414.2. Adding a PCI device with virt-manager . 22614.3. PCI passthrough with virt-install . 23114.4. PCI passthrough for para-virtualized Xen guests on Red Hat Enterprise Linux. 23215. SR-IOV15.1. Introduction .15.2. Using SR-IOV .15.3. Troubleshooting SR-IOV .23523523623916. KVM guest timing management241IV. Administration24517. Server best practices24718. Security for virtualization18.1. Storage security issues .18.2. SELinux and virtualization .18.3. SELinux .18.4. Virtualization firewall information .24924924925025119. Managing guests with xend25320. Xen live migration25520.1. A live migration example . 257iv

20.2. Configuring guest live migration . 26321. KVM live migration21.1. Live migration requirements .21.2. Share storage example: NFS for a simple migration .21.3. Live KVM migration with virsh .21.4. Migrating with virt-manager .26526526626726822. Remote management of virtualized guests22.1. Remote management with SSH .22.2. Remote management over TLS and SSL .22.3. Transport modes .281281282284V. Virtualization Storage Topics23. Using shared storage with virtual disk images23.1. Using iSCSI for storing virtual disk images .23.1.1. How to set up an iSCSI target on Red Hat Enterprise Linux .23.1.2. How to configure iSCSI on a libvirt KVM host and provision a guest usingvirt-install .VI. Virtualization Reference Guide28929129129129329924. Virtualization tools30125. Managing guests with virsh30326. Managing guests with the Virtual Machine Manager (virt-manager)26.1. The Add Connection window .26.2. The Virtual Machine Manager main window .26.3. The guest Overview tab .26.4. Virtual Machine graphical console .26.5. Starting virt-manager .26.6. Restoring a saved machine .26.7. Displaying guest details .26.8. Status monitoring .26.9. Displaying guest identifiers .26.10. Displaying a guest's status .26.11. Displaying virtual CPUs .26.12. Displaying CPU usage .26.13. Displaying memory usage .26.14. Managing a virtual network .26.15. Creating a virtual network 7. The xm command quick reference34528. Configuring the Xen kernel boot parameters34729. Configuring ELILO34930. libvirt configuration reference35331. Xen configuration files355VII. Tips and Tricks36332. Tips and tricks36532.1. Automatically starting guests . 36532.2. Changing between the KVM and Xen hypervisors . 365v

Virtualization Guide32.2.1. Xen to KVM .32.2.2. KVM to Xen .32.3. Using qemu-img .32.4. Overcommitting Resources .32.5. Modifying /etc/grub.conf .32.6. Verifying virtualization extensions .32.7. Accessing data from a guest disk image .32.8. Setting KVM processor affinities .32.9. Generating a new unique MAC address .32.10. Limit network bandwidth for a Xen guest .32.11. Configuring Xen processor affinities .32.12. Modifying the Xen hypervisor .32.13. Very Secure ftpd .32.14. Configuring LUN Persistence .32.15. Disable SMART disk monitoring for guests .32.16. Cleaning up old Xen configuration files .32.17. Configuring a VNC Server .32.18. Cloning guest configuration files .32.19. Duplicating an existing guest and its configuration file 8438438533. Creating custom libvirt scripts38733.1. Using XML configuration files with virsh . 387VIII. Troubleshootingvi38934. Troubleshooting Xen34.1. Debugging and troubleshooting Xen .34.2. Log files overview .34.3. Log file descriptions .34.4. Important directory locations .34.5. Troubleshooting with the logs .34.6. Troubleshooting with the serial console .34.7. Para-virtualized guest console access .34.8. Fully virtualized guest console access .34.9. Common Xen problems .34.10. Guest creation errors .34.11. Troubleshooting with serial consoles .34.11.1. Serial console output for Xen .34.11.2. Xen serial console output from para-virtualized guests .34.11.3. Serial console output from fully virtualized guests .34.12. Xen configuration files .34.13. Interpreting Xen error messages .34.14. The layout of the log directories 9940235. Troubleshooting35.1. Identifying available storage and partitions .35.2. After rebooting Xen-based guests the console freezes .35.3. Virtualized Ethernet devices are not found by networking tools .35.4. Loop device errors .35.5. Failed domain creation caused by a memory shortage .35.6. Wrong kernel image error .35.7. Wrong kernel image error - non-PAE kernel on a PAE platform .35.8. Fully-virtualized 64 bit guest fails to boot .35.9. A missing localhost entry causes virt-manager to fail .35.10. Microcode error during guest boot .403403403403403404404405405405406

35.11. Python depreciation warning messages when starting a virtual machine . 40635.12. Enabling Intel VT and AMD-V virtualization hardware extensions in BIOS . 40635.13. KVM networking performance . 40736. Troubleshooting the Xen para-virtualized drivers36.1. Red Hat Enterprise Linux 5 Virtualization log file and directories .36.2. Para-virtualized guest fail to load on a Red Hat Enterprise Linux 3 guestoperating system .36.3. A warning message is displayed while installing the para-virtualized drivers onRed Hat Enterprise Linux 3 .36.4. Manually loading the para-virtualized drivers .36.5. Verifying the para-virtualized drivers have successfully loaded .36.6. The system has limited throughput with para-virtualized drivers .Glossary411411412413413414414415A. Additional resources421A.1. Online resources . 421A.2. Installed documentation . 421B. Colophon423vii


PrefaceThe Red Hat Enterprise Linux Virtualization Guide covers all aspects of using and managingvirtualization products included with Red Hat Enterprise Linux.1. About this bookThis book is divided into 8 parts: System Requirements Installation Configuration Administration Storage Reference Tips and Tricks TroubleshootingKey terms and concepts used throughout this book are covered in the Glossary.This book covers virtualization topics for Red Hat Enterprise Linux 5. The KVM and Xen hypervisorsare provided with Red Hat Enterprise Linux 5. Both the KVM and Xen hypervisors support Fullvirtualization. The Xen hypervisor also supports Para-virtualization. Refer to Section 4, “What isVirtualization?” and the Glossary for more details on these terms.2. Document ConventionsThis manual uses several conventions to highlight certain words and phrases and draw attention tospecific pieces of information.1In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. TheLiberation 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 includesthe Liberation Fonts set by default.2.1. Typographic ConventionsFour typographic conventions are used to call attention to specific words and phrases. Theseconventions, 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 highlightkeycaps and key combinations. For /ix

PrefaceTo see the contents of the file my next bestselling novel in your currentworking directory, enter the cat my next bestselling novel command at theshell prompt and press Enter to execute the command.The above includes a file name, a shell command and a keycap, all presented in mono-spaced boldand all distinguishable thanks to context.Key combinations can be distinguished from keycaps by the hyphen connecting each part of a keycombination. For example:Press Enter to execute the command.Press Ctrl Alt F2 to switch to the first virtual terminal. Press Ctrl Alt F1 toreturn to your X-Windows session.The first paragraph highlights the particular keycap to press. The second highlights two keycombinations (each a set of three keycaps with each set pressed simultaneously).If source code is discussed, class names, methods, functions, variable names and returned valuesmentioned 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 fordirectories. 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 MousePreferences. In the Buttons tab, click the Left-handed mouse check box and clickClose to switch the primary mouse button from the left to the right (making the mousesuitable 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 theCharacter Map menu bar, type the name of the character in the Search field and clickNext. The character you sought will be highlighted in the Character Table. Doubleclick 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 thegedit menu bar.The above text includes application names; system-wide menu names and items; application-specificmenu names; and buttons and text found within a GUI interface, all presented in proportional bold andall distinguishable by context.Mono-spaced Bold Italic or Proportional Bold ItalicWhether mono-spaced bold or proportional bold, the addition of italics indicates replaceable orvariable text. Italics denotes text you do not input literally or displayed text that changes depending oncircumstance. For example:To connect to a remote machine using ssh, type ssh ata shell prompt. If the remote machine is and your username on thatmachine is john, type ssh

Pull-quote ConventionsThe mount -o remount file-system command remounts the named filesystem. For example, to remount the /home file system, the command is mount -oremount /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,, file-system, package, version andrelease. Each word is a placeholder, either for text you enter when issuing a command or for textdisplayed by the system.Aside from standard usage for presenting the title of a work, italics denotes the first use of a new andimportant term. For example:Publican is a DocBook publishing system.2.2. Pull-quote ConventionsTerminal 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:booksbooks agesmssnotesphotosscriptsstuffsvgssvnSource-code listings are also set in mono-spaced roman but add syntax highlighting as follows:package;import javax.naming.InitialContext;public class ExClient{public static void main(String args[])throws Exception{InitialContext iniCtx new InitialContext();Objectref iniCtx.lookup("EchoBean");EchoHomehome (EchoHome) ref;Echoecho home.create();System.out.println("Created Echo");System.out.println("Echo.echo('Hello') " echo.echo("Hello"));}}2.3. Notes and WarningsFinally, we use three visual styles to draw attention to information that might otherwise be overlooked.NoteNotes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note shouldhave no negative consequences, but you might miss out on a trick that makes your life easier.xi

PrefaceImportantImportant boxes detail things that are easily missed: configuration changes that only apply tothe current session, or services that need restarting before an update will apply. Ignoring a boxlabeled 'Important' will not cause data loss but may cause irritation and frustration.WarningWarnings should not be ignored. Ignoring warnings will most likely cause data loss.3. We need your feedbackIf you find a typographical error in this manual, or if you have thought of a way to make this manualbetter, we would love to hear from you. Submit a report in Bugzilla: againstRed Hat Enterprise Linux with the Virtualization Guide component.When submitting a bug report, be sure to mention the manual's identifier: Virtualization Guide andversion number: 5.If you have a suggestion for improving the documentation, try to be as specific as possible whendescribing it. If you have found an error, include the section number and some of the surrounding textso we can find it easily.3.1. Technical review requestsAll review requests are classified into one of the following five categories:New contentcontent documented for the first time — an entirely new feature, procedure, or concept. Forexample: "Section now describes the new procedure for creating bootable USB devices."Correctiona factual error previously present in the text has been corrected. For example: "Section previouslystated (incorrectly) that IPv4 and IPv6 were both supported; section now states that IPv6 hasnever been supported."Clarificationmaterial that was already factually correct but is now better explained. Clarifications are usually inresponse to reader feedback that the previous content was confusing or misleading in some way.For example: "Paths described in Example 1.2.3 now better reflect the directory structure of anactual installed system."Obsoletiona description of a feature or a procedure has been dropped. Material might be obsolete becauseof a feature that is no longer supported, a known issue that has been corrected, or hardware thatis now obsolete. For example, "Section no longer describes how to update kernel modules using afloppy disk."xii

What is Virtualization?Verificationa request to check a fact, procedure, or whether material should be obsoleted. For example,"Section describes how to connect to a generic iSCSI storage device. Please verify this on yourhardware" or "Section still describes how to update kernel modules using a LS-120 SuperDisk;please verify that we still need to tell readers about this obsolete hardware."4. What is Virtualization?Virtualization is a broad computing term for running software, usually operating systems, concurrentlyand isolated from other programs on one system. Most existing implementations of virtualization use ahypervisor, a software layer that controls hardware and provides guest operating systems with accessto underlying hardware devices. The hypervisor allows multiple operating systems to run on the samephysical system by offering virtualized hardware to the guest operating system.5. Types of Virtualization5.1. Full VirtualizationRed Hat Enterprise Linux contains virtualization packages and tools which provide systemadministrators wit

The Red Hat Enterprise Linux Virtualization Guide contains information on installation, configuring, administering, and troubleshooting virtualization technologies included with Red Hat Enterprise Linux. iii . I. Requirements and Limitations for Virtualization with Red Hat Enterprise Linux 1 1. System requirements 3

Related Documents:

Oracle e-Commerce Gateway, Oracle Business Intelligence System, Oracle Financial Analyzer, Oracle Reports, Oracle Strategic Enterprise Management, Oracle Financials, Oracle Internet Procurement, Oracle Supply Chain, Oracle Call Center, Oracle e-Commerce, Oracle Integration Products & Technologies, Oracle Marketing, Oracle Service,

Oracle is a registered trademark and Designer/2000, Developer/2000, Oracle7, Oracle8, Oracle Application Object Library, Oracle Applications, Oracle Alert, Oracle Financials, Oracle Workflow, SQL*Forms, SQL*Plus, SQL*Report, Oracle Data Browser, Oracle Forms, Oracle General Ledger, Oracle Human Resources, Oracle Manufacturing, Oracle Reports,

viii Related Documentation The platform-specific documentation for Oracle Database 10g products includes the following manuals: Oracle Database - Oracle Database Release Notes for Linux Itanium - Oracle Database Installation Guide for Linux Itanium - Oracle Database Quick Installation Guide for Linux Itanium - Oracle Database Oracle Clusterware and Oracle Real Application Clusters

7 Messaging Server Oracle Oracle Communications suite Oracle 8 Mail Server Oracle Oracle Communications suite Oracle 9 IDAM Oracle Oracle Access Management Suite Plus / Oracle Identity Manager Connectors Pack / Oracle Identity Governance Suite Oracle 10 Business Intelligence

Advanced Replication Option, Database Server, Enabling the Information Age, Oracle Call Interface, Oracle EDI Gateway, Oracle Enterprise Manager, Oracle Expert, Oracle Expert Option, Oracle Forms, Oracle Parallel Server [or, Oracle7 Parallel Server], Oracle Procedural Gateway, Oracle Replication Services, Oracle Reports, Oracle

Specific tasks you can accomplish using Oracle Sales Compensation Oracle Oracle Sales Compensation setup Oracle Oracle Sales Compensation functions and features Oracle Oracle Sales Compensation windows Oracle Oracle Sales Compensation reports and processes This preface explains how this user's guide is organized and introduces

PeopleSoft Oracle JD Edwards Oracle Siebel Oracle Xtra Large Model Payroll E-Business Suite Oracle Middleware Performance Oracle Database JDE Enterprise One 9.1 Oracle VM 2.2 2,000 Users TPC-C Oracle 11g C240 M3 TPC-C Oracle DB 11g & OEL 1,244,550 OPTS/Sec C250 M2 Oracle E-Business Suite M

Oracle Database using Oracle Real Application Clusters (Oracle RAC) and Oracle Resource Management provided the first consolidation platform optimized for Oracle Database and is the MAA best practice for Oracle Database 11g. Oracle RAC enables multiple Oracle databases to be easily consolidated onto a single Oracle RAC cluster.