Tahlia Richardson Dayle Parker Laura BaileyScott RadvanRed Hat Enterprise Linux 6Virtualization Host Configuration andGuest Installation GuideInstalli
before, " "so cannot be deassigned\n", __func__); r = -EINVAL; goto out;
These steps cover assigning a PCI device to a virtual machine on a KVM hypervisor.This example uses a PCIe network controller with the PCI identifier
pci_0000_00_1d_2pci_0000_00_1d_7pci_0000_00_1e_0pci_0000_00_1f_0pci_0000_00_1f_2pci_0000_00_1f_3pci_0000_01_00_0pci_0000_01_00_1pci_0000_02_00_0pci_00
bus='0'slot='25'function='0'If you want to convert to hexadecimal values, you can use the pri ntf utility to convert fro
PCI devices can be added to guest virtual machines using the graphical vi rt-manag er tool. Thefollowing procedure adds a Gigabit Ethernet controller
Fig u re 12.2. T h e Ad d n ew virt u al h ard ware wiz ard3. Ad d t h e n ew d eviceThe setup is complete and the guest virtual machine now has di
Fig u re 12.3. T h e virt u al machin e hard ware inf o rmat io n win d o w12.3. Assigning a PCI device wit h virt -inst allTo use virt - in st all t
# virsh nodedev-list --cap pcipci_0000_00_00_0pci_0000_00_01_0pci_0000_00_03_0pci_0000_00_07_0pci_0000_00_10_0pci_0000_00_10_1pci_0000_00_14_0pci_0000
<capability type='virt_functions'> </capability> </capability></device>2. Ad d t h e d eviceUse the PCI id
virsh nodedev-reattach pci_0000_01_00_0The device is now available for host use.Pro ced u re 12.7. Det achin g a PCI Device f rom a g u est wit h v
Chapter 13. SR-IOV13.1. Int roduct ionDeveloped by the PCI-SIG (PCI Special Interest Group), the Single Root I/O Virtualization (SR-IOV)specification
Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software andtechnology. You can find a list of publicly availa
PCI devices which are backed on the physical PCI device by resources such as queues and registersets.Ad van t ag es o f SR - IO VSR-IOV devices can s
On an Intel system, enable Intel VT-d in the BIOS if it is not enabled already. Refer toProcedure 12.1, “Preparing an Intel system for PCI device assi
# echo "options igb max_vfs=7" >>/etc/modprobe.d/igb.conf6. In sp ect t h e n ew Virt u al Fu n ct io n sUsing the l spci command,
Use the vi rsh no d ed ev-l i st command and the g rep command to filter the Intel 82576network device from the list of available host devices. 0b is
<capability type='pci'> <domain>0</domain> <bus>11</bus> <slot>16</slot> &l
NoteIf you do not specify a MAC address, one will be automatically generated. The <virtualport> element is only used when connecting to an 802.1
Erro r st art in g t h e g u estWhen starting a configured virtual machine, an error occurs as follows:# virsh start testerror: Failed to start domai
Chapter 14. KVM guest timing managementVirtualization involves several intrinsic challenges for time keeping in guest virtual machines.Interrupts cann
If any output is given your CPU has the co nstant_tsc bit. If no output is given follow theinstructions below.14 .1.1. Configuring host s wit hout a
5.5 x86 with the para-virtualized clock Additional parameters are not required5.5 x86 without the para-virtualized clock clocksource=acpi_pm lpj=n5.4
Chapter 1. Introduction1.1. What is in t his guide?This guide provides information on installing virtualization software and configuring guest machin
Windows uses both the Real-Time Clock (RTC) and the Time Stamp Counter (TSC). For Windowsguest virtual machines the Real-Time Clock can be used instea
Steal time is reported in the CPU time fields in /pro c/stat as st. It is automatically reported byutilities such as to p and vmstat, and cannot be sw
Chapter 15. Network booting with libvirtGuest virtual machines can be booted with PXE enabled. PXE allows guest virtual machines to bootand load their
15.2. Boot ing a guest using PXEThis section demonstrates how to boot a guest virtual machine with PXE.15.2.1. Using bridged net workingPro ced u re
</os>Also ensure that the guest virtual machine is connected to the private network:<interface type='network'> <mac ad
Chapter 16. QEMU Guest AgentThe QEMU Guest Agent allows the host machine to issue commands to the guest operating system.The guest operating system th
Red Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst allat ion G uide122
NetKVM Driver ParametersAfter the NetKVM driver is installed, you can configure it to better suit your environment. Theparameters listed in this secti
ImportantHigh logging levels will slow down your guest virtual machine.Lo g g in g .St at ist ics( sec)An integer that defines whether log statistics
In Red Hat Enterprise Linux 6.4 and onward, the valid values for this parameter are Al l(the default), which enables IP, TCP and UDP checksum offloadi
VMware ESX/ESX(i) hypervisors to Red Hat Enterprise Virtualization and KVM managed by libvirt.NoteAll of these guides are available at the Red Hat Cus
1 (enabled).T est O n ly.Packet Filt erA Boolean value that determines whether packet filtering is enabled. The default value is 1(enabled).T est O n
Common libvirt errors and troubleshootingThis appendix documents common lib virt -related problems and errors along with instructions fordealing with
PXE boot (or D HCP) on guestfailedA guest virtual machine startssuccessfully, but is unable toacquire an IP address fromDHCP, boot using the PXEprotoc
No guest virtual machines arepresent when lib virt d isstartedThe lib virt daemon issuccessfully started, but noguest virtual machines appearto be pr
NoteThis line is commented out by default to prevent libvirt from producing excessivelog messages. After diagnosing the problem, it is recommended to
When running a command, the following error (or similar) appears:$ virsh -c name_of_uri listerror: Cannot read CA certificate '/etc/pki/CA/cacert
unix_sock_group = <g ro up>unix_sock_ro_perms = <perms>unix_sock_rw_perms = <perms>NoteThe user running vi rsh must be a member of t
Nearly all new BIOSes allow enabling or disabling of the No eXecute bit. However, ifdisabled, some CPUs do not report this flag and thus lib virt de
save was incomplete (for example, due to loss of power before the managed save imagewas flushed to disk), the save image is corrupted and will not be
Symp t o mAfter building a guest virtual machine from an existing disk image, the guest booting stallswith the error message No bo o t d evi ce. Howe
Chapter 2. System requirementsThis chapter lists system requirements for successfully running virtual machines, referred to as VMson Red Hat Enterpris
<emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu&
If the default network (or any other locally-created network) is unable to start, any virtualmachine configured to use that network for its connectivi
address from DHCP or boot using the PXE protocol, or both. There are two common causesof this error: having a long forward delay time set for the brid
scri pts/i fcfg -name_of_bridge file to turn STP on with a 0 seconddelay:STP=onDELAY=0After changing the configuration file, restart the bridge device
When these conditions occur, UDP packets sent from the host to theguest have uncomputed checksums. This makes the host's UDP packetsseem invalid
physical interface cannot be bounced back up to the macvtap bridge for forwarding to theguests.So lu t io nUse libvirt to create an isolated network,
This message appears:Could not add rule to fixup DHCP response checksums on network 'default'In vest ig at io nAlthough this message appears
br0 Link encap:Ethernet HWaddr 00:00:5A:11:70:48 inet addr:10.22.1.5 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST
warning: could not open /dev/net/tun: no virtual network emulation qemu-kvm: -netdev tap,script=/etc/my-qemu-ifup,id=hostnet0: Device 'tap'
cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom&q
Guest virtual machine requirements are further outlined in the Red Hat Enterprise Linux 6 VirtualizationAdministration Guide in Chapter 6. Overcommitt
Note that the address used for migration data cannot be automatically determined from theaddress used for connecting to destination lib virt d (for e
In vest ig at io nBy default, migration only transfers the in-memory state of a running guest (such asmemory or CPU state). Although disk images are n
# virsh list --all Id Name State----------------------------------------------------#In vest ig at io nThere are various
# virsh uriqemu:///systemThis situation occurs when there are other hypervisors present, which libvirt mayspeak to by default.So lu t io nAfter perfo
To do this, modify the /etc/sysco nfi g /l i bvi rtd file and uncomment the followingline:#LIBVIRTD_ARGS="--listen"Then restart the lib vir
These documents contain definitions of states and configurations for the guests. Thesedocuments are automatically generated and should not be edited m
Ensure line number display is enabled in your text editor. Open the XML file, and locate thetext on line 6:<domain type='kvm'> <n
The message following the last colon, cl o ck l i ne 16 and d o mai n, reveals that <cl o ck> contains a mismatched tag on line 16 of the docu
<domain ty pe='kvm'>These XML examples will not parse correctly because of typographical errors such as amissing special character, or
# virsh dumpxml domain<domain type='kvm'> ... <disk type='block' device='cdrom'> <driver name='
Chapter 3. KVM guest virtual machine compatibilityTo verify whether your processor supports the virtualization extensions and for information onenabli
Revision HistoryRevisio n 0.5- 31 Fri O ct 10 2014 Sco t t R ad vanVersion for 6.6 GA release.Revisio n 0.5- 30 T h u O ct 09 2014 Sco t t R a
Removed --live option and note from SR-IOV chapter.Revisio n 0.5- 15 T h u rs 5 Ju n e 2014 T ah lia Rich ard so nRemoved unnecessary screenshots.Rev
Revisio n 0.4 - 52 Fri Feb 15 2013 T ah lia Rich ard sonChanged author tags to fix glitch.Revisio n 0.4 - 50 T h u No v 22 2012 Lau ra B aileyCorr
Corrected virsh nodedev-list usage and a number of minor typographical errors (BZ #830097).Added description of new boot parameter (BZ #853318).Correc
BZ #800748 - Added part on steal time accounting to Chap. 14BZ #838415 - Included appendix for creating ESXi guests - B.7: VMWare ESXi guest creation
Revisio n 0.3- 33 Mo n d ay May 2 2012 Lau ra BaileyApplied QE feedback.Revisio n 0.3- 28 Mo n d ay Ap ril 02 2012 Laura BaileyUpdated the procedure
Revisio n 0.3- 8 T h u rsd ay Feb ru ary 16 2012 Dayle ParkerCorrected typographical errors, clarified guest naming rules, and added missing figure
<model name='pentium'/> </model> <model name='pentium3'> <model name='pentium2&apos
</model> <model name='Nehalem'> <model name='Penryn'/> </model> <model name=&apo
NoteA full list of supported CPU models and recognized CPUID flags can also be found using the q emu-kvm -cpu ? command.Chapt er 3. KVM guest virt u
Chapter 4. Virtualization restrictionsThis chapter covers additional support and product restrictions of the virtualization packages in RedHat Enterpr
SCSI emulation is not supported with KVM in Red Hat Enterprise Linux.Virt u aliz ed ID E d evicesKVM is limited to a maximum of four virtualized (emu
Live migration is only possible between hosts with the same CPU type (that is, Intel to Intelor AMD to AMD only).For live migration, both hosts must h
n et d u mp serverYou should carefully evaluate applications and tools that heavily utilize I/O or those that require real-time performance. Consider
Chapter 5. Installing the virtualization packagesBefore you can use virtualization, the virtualization packages must be installed on your computer.Vir
Fig u re 5.1. T h e Red Hat En terp rise Lin u x p ackag e select io n screenSelect the Vi rtual i zati on Ho st server role to install a platform
Fig u re 5.2. T h e Red Hat En terp rise Lin u x p ackag e select io n screenNoteIf you wish to create virtual machines in a graphical user interfa
Fig u re 5.3. T h e Red Hat En terp rise Lin u x p ackag e select io n screenClick on the Cl o se button, then the Next button to continue the inst
5.2. Inst alling virt ualizat ion packages on an exist ing Red HatEnt erprise Linux syst emThis section describes the steps for installing the KVM hyp
The libvirt-client package provides the client-side APIs and libraries for accessing libvirtservers. The libvirt-client package includes the vi rsh co
Red Hat Enterprise Linux 6 Virtualization Host Configuration and GuestInstallation GuideInstalling and configuring your virtual environmentTahlia Rich
Chapter 6. Guest virtual machine installation overviewAfter you have installed the virtualization packages on the host system you can create guestoper
You can use the vi rt-i nstal l command to create guest virtual machines from the command line. vi rt-i nstal l is used either interactively or as p
Pro ced u re 6 .1. Creat in g a g u est virt u al mach in e wit h virt -man ag er1. O p en virt - man ag erStart vi rt-manag er. Launch the Virt
Fig u re 6 .2. Name virt ual mach in e an d select in st allat io n met h o dType in a virtual machine name and choose an installation type:Lo cal i
This method uses a Preboot eXecution Environment (PXE) server to install the guestvirtual machine. Setting up a PXE server is covered in the Deploymen
Fig u re 6 .4 . Local ISO imag e in st allat io n6. Co n f ig u re CPU and memo ryThe next step involves configuring the number of CPUs and amount
Fig u re 6 .5. Co n f ig u ring CPU an d Memo ry7. Co n f ig u re st o rag eAssign storage to the guest virtual machine.Red Hat Ent erp rise Linu
Fig u re 6 .6 . Co n f ig urin g virt u al st o rageIf you chose to import an existing disk image during the first step, vi rt-manag er will skipthis
Fig u re 6 .7. Verif yin g t h e co n f ig u rat io nIf you prefer to further configure the virtual machine's hardware first, check the Cu st o
PXE guest installation requires a PXE server running on the same subnet as the guest virtualmachines you wish to install. The method of accomplishing
Legal NoticeCo pyright © 20 13 Red Hat, Inc.This do cument is licensed by Red Hat under the Creative Commons Attributio n-ShareAlike 3.0Unpo rted Lic
Fig u re 6 .8. Select in g t he in st allat io n met h o dRed Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst all
Fig u re 6 .9 . Select in g t h e in st allat io n t yp eChapt er 6 . G uest virt ual machine inst allat ion overview37
Fig u re 6 .10. Sp ecif yin g virt ualiz ed h ard ware d et ailsRed Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest In
Fig u re 6 .11. Sp ecif yin g st o rag e d et ails2. St art the in st allat io nThe installation is ready to start.Chapt er 6 . G uest virt ual
Fig u re 6 .12. Fin aliz ing virt u al machin e det ailsA D HCP request is sent and if a valid PXE server is found the guest virtual machine's i
Chapter 7. Installing a Red Hat Enterprise Linux 6 guest virtualmachine on a Red Hat Enterprise Linux 6 hostThis chapter covers how to install a Red H
Fig u re 7.1. T h e Virt u al Machin e Man ag er win d o wClick on the Create a new vi rtual machi ne button to start the new virtualized guestwizard
Choose the Lo cal i nstal l med i a (ISO i mag e o r C D RO M) radio button.Fig u re 7.3. T h e New VM win d o w - St ep 1Click Fo rward to cont
Fig u re 7.4 . Lo cat e yo u r in st all med iaA. If you wish to install from a CD-ROM or DVD, select the Use C D R O M o r D VD radiobutton, and se
ImportantFor ISO image files and guest storage images, the recommended location to use is /var/l i b/l i bvi rt/i mag es/. Any other location may requ
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Virtual machines require sufficient physical memory (RAM) to run efficiently and effectively.Red Hat supports a minimum of 512MB of RAM for a virtual
NoteLive and offline migrations require virtual machines to be installed on shared networkstorage. For information on setting up shared storage for vi
Fig u re 7.7. T h e New VM win d o w - St ep 4Click Fo rward to create a disk image on the local hard drive. Alternatively, select Sel ect manag ed
Fig u re 7.8. T h e Lo cat e or creat e st o rag e vo lu me win d o wi. Select a storage pool from the Sto rag e P oo l s list.ii. Optional: Click o
Fig u re 7.9 . T h e Ad d a St orag e Vo lu me win d o wClick Fi ni sh to continue.7. Verif y an d f in ishVerify there were no errors made during t
Fig u re 7.10. T h e New VM win d o w - lo cal st o rag eClick Fi ni sh to continue into the Red Hat Enterprise Linux installation sequence. For more
7.2. Creat ing a Red Hat Ent erprise Linux 6 guest wit h a net workinst allat ion t reePro ced u re 7.2. C reat in g a Red H at En t erp rise Lin
Fig u re 7.11. T h e main virt - man ag er win do wClick on the Create a new vi rtual machi ne button to start the new virtual machinewizard.Fig u r
Fig u re 7.13. T h e New VM win d o w - St ep 1Click Fo rward to continue.4. Provide the installation URL, and the Kickstart URL and Kernel option
Fig u re 7.14 . T h e New VM win do w - St ep 2Click Fo rward to continue.5. The remaining steps are the same as the ISO installation procedure. C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ImportantVarious storage types may be used for storing guest virtual machines. However, for avirtual machine to be able to use migration features the
Fig u re 7.16 . T h e creat e n ew virt u aliz ed gu est b u t tonThe New VM window opens.3. Name t he virt ual mach in eVirtual machine names can
4. The remaining steps are the same as the ISO installation procedure. Continue from Step 5 ofthe ISO installation procedure. From this point, the on
Chapter 8. Virtualizing Red Hat Enterprise Linux on OtherPlatformsThis chapter contains useful reference material for customers running Red Hat Enterp
Dynamic expansion of fixed size Linux VHDXs - Allows expansion of live mounted fixed size RedHat Enterprise Linux VHDXs.Boot using UEFI - Allows virtu
Chapter 9. Installing a fully-virtualized Windows guestThis chapter describes how to create a fully-virtualized Windows guest using the command-line(v
The path-to-disk must be a device (e.g. /d ev/sd a3) or image file(/var/l i b/l i bvi rt/i mag es/name. i mg ). It must also have enough free space to
Chapter 10. KVM Para-virtualized (virtio) DriversPara-virtualized drivers enhance the performance of guests, decreasing guest I/O latency andincreasin
This section covers the installation process for the KVM Windows virtio drivers. The KVM virtio driverscan be loaded during the Windows installation o
1. O p en virt - man ag er an d t he g u est virt ual mach in eOpen vi rt-manag er, then open the guest virtual machine from the list by double-cl
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fig u re 10.2. T h e Ad d n ew virt u al h ard ware wiz ard in Red Hat En t erp rise Lin u x 6 .1Click the Fi ni sh button to proceed.4. Select
Fig u re 10.4 . T h e Ad d n ew virt u al h ard ware wiz ard in Red Hat En t erprise Lin u x 6 .16. Reb o o tReboot or start the virtual machine
Fig u re 10.5. T h e Co mp u t er Man ag emen t win d o w2. O p en t h e Device ManagerSelect the Devi ce Manag er from the left-most pane. This ca
Fig u re 10.6 . T h e Compu t er Man ag ement win d o w3. St art t h e d river u p d at e wiz arda. View availab le syst em d evicesExpand System
Fig u re 10.8. T h e Co mp u t er Man ag emen t win d o wc. O pen t he d river u p d at e wiz ardFrom the drop-down menu, select Upd ate D ri ver S
Fig u re 10.10. Th e driver u p d at e wiz ard5. Select t h e d river t o in st alla. O p en a f ile b ro wserClick on Bro wse. . .Chapt er 1 0
Fig u re 10.11. Th e driver u p d at e wiz ardb. Bro wse t o t h e lo cat io n o f t h e d riverA separate driver is provided for each of the vari
Fig u re 10.13. Th e Up d at e Driver So f t ware wiz ardThe following screen is displayed while the driver installs:Fig u re 10.14 . T h e U p d at e
6. Clo se t h e in st allerThe following screen is displayed when installation is complete:Fig u re 10.15. Th e Up d at e Driver So f t ware wiz ardC
ImportantCreate the virtual machine, as normal, without starting the virtual machine. Follow oneof the procedures below.Select one of the following gu
Preface1. Document Convent ionsThis manual uses several conventions to highlight certain words and phrases and draw attention tospecific pieces of in
Fig u re 10.16 . T h e virt -man ag er gu est creat io n wiz ardClick on the Fi ni sh button to continue.ii. O pen t he Add Hard ware wiz ardClic
Fig u re 10.17. Th e Ad d n ew virt ual h ard ware wiz ardEnsure the Sel ect manag ed o r o ther exi sti ng sto rag e radio buttonis selected. Clic
Fig u re 10.20. Th e virt u al mach in e h ardware in f o rmat io n win d o wYou have now created a removable device accessible by your virtual machi
Fig u re 10.21. Th e virt u al mach in e h ardware in f o rmat io n win d o wAdd a new virtual storage device by clicking Ad d Hard ware. Then, chan
Fig u re 10.22. Th e virt u al mach in e h ardware in f o rmat io n win d o wvi. En su re set t in g s are co rrectReview the settings for VirtIO Di
ImportantIf the device you wish to add is a d i sk (that is, not a fl o ppy or a cd ro m), youwill also need to add the bus= vi rti o option to the e
Fig u re 10.24 . T h e Win d ows Set u p screenPress S to install additional device drivers.Fig u re 10.25. Th e Win d o ws Set u p screenFig u re 1
Follow the same procedure for Windows Server 2003, but when the installer promptsyou for the driver, click on Lo ad D ri ver, point the installer to
vi rti o_net and vi rti o _bl k are the only drivers whose order can be changed. If other drivers areloaded in a different order, they will not work.N
# ethtool -K interface gso off# ethtool -K interface tso offVirt io d river swap p art it io n issu eAfter activating the virtio block device drive
C haracter T abl e. Double-click this highlighted character to place it in the T ext to co py field and then click the C o py button. Now switch back
5. Remove the ad d ress tag inside the d isk tags. This must be done for this procedure to work.Libvirt will regenerate the add ress tag appropriatel
Fig u re 10.28. Th e Ad d n ew virt ual h ard ware wiz ard5. Select t h e st o rag e d evice an d d riverCreate a new disk image or select a stora
Fig u re 10.29 . T h e Ad d n ew virt u al h ard ware wiz ardClick Fi ni sh to complete the procedure.Pro ced u re 10.6 . Ad d in g a n et wo rk d e
Fig u re 10.31. Th e Ad d n ew virt ual h ard ware wiz ard5. Select t h e n et wo rk d evice an d d riverSet the D evi ce mo d el to vi rti o to
Fig u re 10.32. Th e Ad d n ew virt ual h ard ware wiz ardClick Fi ni sh to complete the procedure.Once all new devices are added, reboot the virtual
Chapter 11. Network configurationThis chapter provides an introduction to the common networking configurations used by libvirtbased guest virtual mach
# brctl showbridge name bridge id STP enabled interfacesvirbr0 8000.000000000000 yesl i bvi rt adds i ptabl es ru
<interface type="network"> ... <model type="virtio"/> <driver name="qemu"/> ...</interface&
Chapter 12. PCI device assignmentRed Hat Enterprise Linux 6 exposes three classes of device to its virtual machines:Emulated devices are purely virtua
Pro ced u re 12.1. Prep arin g an In t el syst em f o r PC I d evice assig n men t1. En ab le t h e In t el VT- d sp ecif icat io n sThe Intel VT-d
Komentáře k této Příručce