Red Hat Enterprise Linux 6Virtualization GuideGuide to Virtualization on Red Hat Enterprise Linux 6
Prefacex2. 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
Chapter 11. KVM Para-virtualized Drivers90Press Next to continue.b. Performance settingThis screen configures advanced TCP settings for the network dr
Installing the drivers on an installed Windows guest91Press Next to continue.c. Confirm the exceptionWindows may prompt for a security exception.Press
Chapter 11. KVM Para-virtualized Drivers92d. FinishPress Finish to complete the installation.5. RebootReboot the guest to complete the driver installa
Installing drivers during the Windows installation932. Creating the guest with virshThis method attaches the para-virtualized driver floppy disk to a
Chapter 11. KVM Para-virtualized Drivers94Press the Finish button to continue.b. Add the new deviceSelect Storage from the Hardware type list. Click F
Installing drivers during the Windows installation95c. Select the driver diskSelect Select managed or existing storage.Set the location to /usr/share/
Chapter 11. KVM Para-virtualized Drivers96Press the Forward button to continue.d. Confirm the new deviceClick the Finish button to confirm the device
Installing drivers during the Windows installation97Press the green tick button to add the new device.4. Creating the guest with virt-installAppend th
Chapter 11. KVM Para-virtualized Drivers98Press S to install additional
Using KVM para-virtualized drivers for existing devices99Press Enter to continue the installation.b. Windows Server 2008Install the guest as described
Chapter 1.1IntroductionThis chapter introduces various virtualization technologies, applications and features and explains howthey work. The purpose o
Chapter 11. KVM Para-virtualized Drivers100 <source file='/var/lib/libvirt/images/disk1.img'/> <target dev='vda' bus=
Using KVM para-virtualized drivers for new devices101Press Forward to continue.2. Select the storage device and driverCreate a new disk image or selec
Chapter 11. KVM Para-virtualized Drivers102Press Forward to continue.3. Finish the procedureConfirm the details for the new device are correct.
Using KVM para-virtualized drivers for new devices103Press Finish to complete the procedure.Procedure 11.5. Adding a network device using the para-vir
Chapter 11. KVM Para-virtualized Drivers104Press Forward to continue.2. Select the network device and driverSelect the network device from the Host de
Using KVM para-virtualized drivers for new devices105Press Forward to continue.3. Finish the procedureConfirm the details for the new device are corre
Chapter 11. KVM Para-virtualized Drivers106Press Finish to complete the procedure.Once all new devices are added, reboot the guest. Windows guests may
Chapter 12.107PCI passthroughThis chapter covers using PCI passthrough with KVM.Certain hardware platforms allow virtualized guests to directly access
Chapter 12. PCI passthrough1083. Ready to useReboot the system to enable the changes. Your system is now PCI passthrough capable.Procedure 12.2. Prepa
Adding a PCI device with virsh109Record the PCI device number; the number is needed in other steps.2. Information on the domain, bus and function are
Chapter 1. Introduction2KSMKernel SamePage Merging (KSM) is used by the KVM hypervisor to allow KVM guests to shareidentical memory pages. These share
Chapter 12. PCI passthrough110$ readlink /sys/bus/pci/devices/0000\:00\:1a.7/driver../../../bus/pci/drivers/ehci_hcd7. Detach the device:$ virsh noded
Adding a PCI device with virt-manager111pci_0000_00_1a_7pci_0000_00_1b_0pci_0000_00_1c_0Tip: determining the PCI deviceComparing lspci output to lspci
Chapter 12. PCI passthrough1124. Add the new deviceSelect Physical Host Device from the Hardware type list. Click Forward to continue.5. Select a PCI
Adding a PCI device with virt-manager1136. Confirm the new deviceClick the Finish button to confirm the device setup and add the device to the guest.
Chapter 12. PCI passthrough114The setup is complete and the guest can now use the PCI device.12.3. PCI passthrough with virt-installTo use PCI passthr
PCI passthrough with virt-install115pci_0000_00_02_0pci_0000_00_02_1pci_0000_00_03_0pci_0000_00_03_2pci_0000_00_03_3pci_0000_00_19_0pci_0000_00_1a_0pc
Chapter 13.117SR-IOV13.1. IntroductionThe PCI-SIG (PCI Special Interest Group) developed the Single Root I/O Virtualization (SR-IOV)specification. The
Chapter 13. SR-IOV118appears as a network card in the same way as a normal network card would appear to an operatingsystem.The SR-IOV drivers are impl
Using SR-IOV1194. Activate Virtual FunctionsThe max_vfs parameter of the igb module allocates the maximum number of Virtual Functions.The max_vfs para
Virtualized and emulated devices3• Emulated software devices.• Para-virtualized devices.• Physically shared devices.These hardware devices all appear
Chapter 13. SR-IOV120pci_0000_0b_10_2pci_0000_0b_10_3pci_0000_0b_10_4pci_0000_0b_10_5pci_0000_0b_10_6pci_0000_0b_11_7pci_0000_0b_11_1pci_0000_0b_11_2p
Troubleshooting SR-IOV121Device pci_0000_0b_10_0 dettached10. Add the Virtual Function to the guesta. Shut down the guest.b. Use the output from the v
Chapter 13. SR-IOV122Error starting the guestStart the configured vm , an error reported as follows:# virsh start testerror: Failed to start domain te
Chapter 14.123KVM guest timing managementVirtualization poses various challenges for guest time keeping. Guests using the Time Stamp Counter(TSC) as a
Chapter 14. KVM guest timing management124If the CPU lacks the constant_tsc bit, disable all power management features (BZ#5131381).Each system has se
125Using the Real-Time Clock with Windows Server 2003 and Windows XP guestsWindows uses the both the Real-Time Clock (RTC) and the Time Stamp Counter
126
Part IV. AdministrationAdministering virtualized systemsThese chapters contain information for administering host and virtualized guests using tools i
Chapter 15.129Server best practicesThe following tasks and tips can assist you with securing and ensuring reliability of your Red HatEnterprise Linux
Chapter 1. Introduction4Emulated sound devicesTwo emulated sound devices are available:• The ac97 device emulates an Intel 82801AA AC97 Audio compatib
Chapter 16.131Security for virtualizationWhen deploying virtualization technologies on your corporate infrastructure, you must ensure thatthe host can
Chapter 16. Security for virtualization132# lvcreate -n NewVolumeName -L 5G volumegroup2. Format the NewVolumeName logical volume with a file system t
SELinux13316.3. SELinuxThis sections contains topics to consider when using SELinux with your virtualization deployment.When you deploy system changes
Chapter 16. Security for virtualization134• Enabling IP forwarding (net.ipv4.ip_forward = 1) is also required for shared bridges andthe default bridge
Chapter 17.135sVirtsVirt is a technology included in Red Hat Enterprise Linux 6 that integrates SELinux and virtualization.sVirt applies Mandatory Acc
Chapter 17. sVirt13617.1. Security and VirtualizationWhen services are not virtualized, machines are physically separated. Any exploit is usually cont
sVirt labeling137 system_u:object_r:svirt_image_t:s0:c87,c520 image1The following table outlines the different labels that can be assigned when usi
138
Chapter 18.139KVM live migrationThis chapter covers migrating guests running on a KVM hypervisor to another KVM host.Migration is the term for the pro
Physically shared devices5Para-virtualized block driverThe para-virtualized block driver is a driver for all storage devices supported by the hypervis
Chapter 18. KVM live migration140• Two or more Red Hat Enterprise Linux systems of the same version with the same updates.• Both systems must have the
Live KVM migration with virsh141Locations must be the same on source and destinationWhichever directory is chosen for the guests must exactly the same
Chapter 18. KVM live migration1424. Verify the guest has arrived at the destination hostFrom the destination system, test2.example.com, verify RHEL4te
Migrating with virt-manager143Figure 18.1. Add Connectionvirt-manager now displays the newly connected host in the list of available hosts.
Chapter 18. KVM live migration144Figure 18.2. Connected Host2. Add a storage pool to both hostsBoth hosts must be connected to the same storage pool.
Migrating with virt-manager145Figure 18.3. Storage tabb. Add a storage pool with the same NFS to the source and target hosts.Add a new storage pool. I
Chapter 18. KVM live migration146Figure 18.4. Add a new Storage PoolPress Forward to continue.c. Specify storage pool detailsEnter the following detai
Migrating with virt-manager147Figure 18.5. Storage pool detailsPress the Finish button to add the storage pool.d. Verify the new storage pool was adde
Chapter 18. KVM live migration148Figure 18.6. New storage pool in the storage tabComplete these steps on both hosts before proceeding.3. Optional: Add
Migrating with virt-manager149Figure 18.7. Add a storage volumeb. Create a new virtualized guest on the new volumeCreate a new virtualized guest that
Chapter 1. Introduction6in the PCI configuration space as multiple functions, each device has its own configuration spacecomplete with Base Address Re
Chapter 18. KVM live migration150Figure 18.8. New virtualized guestThe Virtual Machine window appears.
Migrating with virt-manager151Figure 18.9. Virtual Machine window4. Migrate the virtualized guestFrom the main virt-manager screen, right-click on the
Chapter 18. KVM live migration152Figure 18.10. Migrate the virtual machineSelect the destination host from the list.Select Migrate offline to disable
Migrating with virt-manager1535. A status bar tracks the progress of the migration. Once the migration is complete the virtualizedguest will appear in
154
Chapter 19.155Remote management of virtualizedguestsThis section explains how to remotely manage your virtualized guests using ssh or TLS and SSL.19.1
Chapter 19. Remote management of virtualized guests156$ ssh-keygen -t rsa3. Copying the keys to the remote hostsRemote login without a password, or wi
Transport modes157TLS/SSL access for virt-managerThe libvirt Wiki contains complete details on how to configure TLS/SSL access: http://wiki.libvirt.or
Chapter 19. Remote management of virtualized guests158Remote URIsA Uniform Resource Identifier (URI) is used by virsh and libvirt to connect to a remo
Transport modes159Name Transport mode Description Example usagehostname, portnumber, username andextra parameters fromthe remote URI, but incertain ve
Virtualization security features7Storage volumes are presented to virtualized guests as local storage devices regardless of theunderlying hardware.For
Chapter 19. Remote management of virtualized guests160Name Transport mode Description Example usageserver checks of theclient's certificate orIP
Chapter 20.161Overcommitting with KVMThe KVM hypervisor supports overcommitting CPUs and overcommitting memory. Overcommitting isallocating more virtu
Chapter 20. Overcommitting with KVM162Configuring swap for overcommitting memoryThe swap partition is used for swapping underused memory to the hard d
163core processor. Overcommitting symmetric multiprocessing guests in over the physical number ofprocessing cores will cause significant performance d
164
Chapter 21.165KSMThe concept of shared memory is common in modern operating systems. For example, when aprogram is first started it shares all of its
Chapter 21. KSM166The KSM tuning serviceThe ksmtuned service does not have any options. The ksmtuned service loops and adjusts ksm.The ksmtuned servic
167pages_volatileNumber of volatile pages.runWhether the KSM process is running.sleep_millisecsSleep milliseconds.KSM tuning activity is stored in the
168
Chapter 22.169Advanced virtualization administrationThis chapter covers advanced administration tools for fine tuning and controlling virtualized gues
Chapter 1. Introduction8Offline migrationAn offline migration suspends the guest then moves an image of the guest's memory to the destinationhost
Chapter 23.171Migrating to KVM from otherhypervisors using virt-v2vThe virt-v2v command converts guests from a foreign hypervisor to run on KVM, manag
Chapter 23. Migrating to KVM from other hypervisors using virt-v2v172Figure 23.2. The storage tabClick the plus sign (+) button to add a new storage p
Preparing to convert a virtualized guest173Figure 23.3. Adding a storage pool2. Create local network interfaces.The local machine must have an appropr
Chapter 23. Migrating to KVM from other hypervisors using virt-v2v174virt-v2v/software/. virt-v2v will display an error similar to Example 23.1, “Miss
Converting virtualized guests1751. From the Red Hat Enterprise Virtualization Manager, Login to Red Hat Network2. Click on Download Software3. Select
Chapter 23. Migrating to KVM from other hypervisors using virt-v2v176virt-v2v -i libvirtxml -op pool --bridge brname vm-name.xmlvirt-v2v -op pool --ne
Converting a local Xen virtualized guest177--version Display version number and exit.23.2.2. Converting a local Xen virtualized guestEnsure that the v
Chapter 23. Migrating to KVM from other hypervisors using virt-v2v178Authenticating to the ESX serverConnecting to the ESX server will require authent
Running converted virtualized guests17923.3. Running converted virtualized guestsOn successful completion, virt-v2v will create a new libvirt domain f
Part I. Requirements and limitationsSystem requirements, supportrestrictions and limitationsfor virtualization with RedHat Enterprise Linux 6These cha
Chapter 23. Migrating to KVM from other hypervisors using virt-v2v180Para-virtualized driver type Driver moduleStorage virtio_blkNetwork virtio_netIn
Configuration changes for Windows virtualized guests181NoteThe Guest Tools ISO must be uploaded using the ISO Uploader for this step to succeed. SeePr
182
Chapter 24.183Miscellaneous administration tasksThis chapter contain useful hints and tips to improve virtualization performance, scale and stability.
Chapter 24. Miscellaneous administration tasks184Image conversion is also useful to get smaller image when using a format which can grow, such asqcow
Setting KVM processor affinities185• The following output contains a vmx entry indicating an Intel processor with the Intel VTextensions:flags : fpu
Chapter 24. Miscellaneous administration tasks186Identifying CPU and NUMA topologyThe first step in deciding what policy to apply is to determine the
Setting KVM processor affinities187The output shows two NUMA nodes (also know as NUMA cells), each containing four logical CPUs(four processing cores)
Chapter 24. Miscellaneous administration tasks188b. Locate where the guest's virtual CPU count is specified. Find the vcpus element.<vcpus>
Generating a new unique MAC address189To lock the virtual CPUs to the second NUMA node (CPUs four to seven), run the followingcommands.# virsh vcpupin
Virtualization GuideRed Hat Enterprise Linux 6 Virtualization GuideGuide to Virtualization on Red Hat Enterprise Linux 6Edition 1AuthorCopyright © 200
Chapter 24. Miscellaneous administration tasks190 mac = [ 0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(
Very Secure ftpd191For more information on overcommitting with KVM, refer to Chapter 20, Overcommitting with KVM.Warning: turning off swapVirtual memo
Chapter 24. Miscellaneous administration tasks1924. Use the chkconfig --list vsftpd command to verify the vsftpd daemon is enabled tostart during syst
Virtual machine timer management with libvirt193Without the acpid package, the Red Hat Enterprise Linux 6 guest does not shut down when the virshshutd
Chapter 24. Miscellaneous administration tasks194Table 24.1. Offset attribute valuesValue Descriptionutc The guest clock will be synchronized to UTCwh
Virtual machine timer management with libvirt195Table 24.2. name attribute valuesValue Descriptionplatform The master virtual time source which may be
Chapter 24. Miscellaneous administration tasks196Value Descriptionparavirt Native + para-virtualized.•presentUsed to override the default set of timer
Part V. Virtualization storage topicsIntroduction to storageadministration for virtualizationThese chapters contain information the storage used in a
Chapter 25.199Storage conceptsThis chapter introduces the concepts used for describing managing storage devices.Local storageLocal storage is directly
Chapter 2.11System requirementsThis chapter lists system requirements for successfully running virtualized guest operating systemswith Red Hat Enterpr
Chapter 25. Storage concepts20025.2. VolumesStorage pools are divided into storage volumes. Storage volumes are an abstraction of physicalpartitions,
Volumes201Name: firstimageType: blockCapacity: 20.00 GBAllocation: 20.00 GBvirsh provides commands for converting betwee
Chapter 26.203Storage pools26.1. Creating storage pools26.1.1. Dedicated storage device-based storage poolsThis section covers dedicating storage dev
Chapter 26. Storage pools204 <device path='/dev/sdb'/>The device parameter with the path attribute specifies the device path of the s
Partition-based storage pools2055. Turn on autostartTurn on autostart for the storage pool. Autostart configures the libvirtd service to start thestor
Chapter 26. Storage pools206b. Click on the Storage tab of the Host Details window.
Partition-based storage pools2072. Create the new storage poola. Add a new pool (part 1)Press the + button (the add pool button). The Add a New Storag
Chapter 26. Storage pools208Press the Forward button to continue.b. Add a new pool (part 2)Change the Target Path, Format, and Source Path fields.Tar
Partition-based storage pools209The storage pool is now created, close the Host Details window.26.1.2.2. Creating a partition-based storage pool using
Chapter 2. System requirements12• GFS2 clustered file systems, and• Fibre Channel-based LUNs• SRP devices (SCSI RDMA Protocol), the block export proto
Chapter 26. Storage pools210The directory /guest_images is used in this example.# virsh pool-define-as guest_images_fs fs - - /dev/sdc1 - "/gues
Directory-based storage pools211guest_images_fs active yes6. Verify the storage poolVerify the storage pool was created correctly, the sizes
Chapter 26. Storage pools212total 8drwx------. 2 root root 4096 May 28 13:57 .dr-xr-xr-x. 26 root root 4096 May 28 13:57 ..2. Configure SELinux file
Directory-based storage pools2134. Create the new storage poola. Add a new pool (part 1)Press the + button (the add pool button). The Add a New Storag
Chapter 26. Storage pools214Press the Forward button to continue.b. Add a new pool (part 2)Change the Target Path field. This example uses /guest_ima
Directory-based storage pools215The storage pool is now created, close the Host Details window.26.1.3.2. Creating a directory-based storage pool with
Chapter 26. Storage pools2163. Create the local directoryUse the virsh pool-build command to build the directory-based storage pool. virsh pool-build
LVM-based storage pools217A directory-based storage pool is now available.26.1.4. LVM-based storage poolsThis chapter covers using LVM volume groups a
Chapter 26. Storage pools218e. Select the size of the partition. In this example the entire disk is allocated by pressing Enter.Last cylinder or +siz
LVM-based storage pools219b. Click on the Storage tab of the Host Details window.
Chapter 3.13KVM compatibilityThe KVM hypervisor requires a processor with the Intel-VT or AMD-V virtualization extensions.Note that this list is not c
Chapter 26. Storage pools2203. Create the new storage poola. Start the WizardPress the + button (the add pool button). The Add a New Storage Pool wiz
LVM-based storage pools221Press the Forward button to continue.b. Add a new pool (part 2)Change the Target Path field. This example uses /guest_images
Chapter 26. Storage pools222Press the Yes button to proceed to erase all data on the storage device and create thestorage pool.4. Verify the new stor
iSCSI-based storage pools223Pool guest_images_lvm defined# virsh pool-build guest_images_lvmPool guest_images_lvm built# virsh pool-start guest_images
Chapter 26. Storage pools224Procedure 26.3. Creating an iSCSI target1. Install the required packagesInstall the scsi-target-utils package and all dep
iSCSI-based storage pools225c. Configure SELinux file contextsConfigure the correct SELinux context for the new image and directory.# restorecon -R /v
Chapter 26. Storage pools226# service iptables restart8. Verify the new targetsView the new targets to ensure the setup was success with the tgt-admi
iSCSI-based storage pools227# iscsiadm -d2 -m node --loginscsiadm: Max file limits 1024 1024Logging in to [iface: default, target: iqn.2010-05.com.exa
Chapter 26. Storage pools228c. Open the Edit menu and select Host Details.d. Click on the Storage tab of the Host Details window.
iSCSI-based storage pools2292. Add a new pool (part 1)Press the + button (the add pool button). The Add a New Storage Pool wizard appears.Choose a nam
14
Chapter 26. Storage pools2303. Add a new pool (part 2)Enter the target path for the device, the host name of the target and the source path (the IQN)
iSCSI-based storage pools231<device path='iqn.2010-05.com.example.server1:trial1'/>The device element path attribute must contain the
Chapter 26. Storage pools2324. Start the storage poolUse the virsh command pool-start for this. pool-start enables a directory storage pool,allowing
NFS-based storage pools233c. Open the Edit menu and select Host Details.d. Click on the Storage tab of the Host Details window.
Chapter 26. Storage pools2342. Create a new pool (part 1)Press the + button (the add pool button). The Add a New Storage Pool wizard appears.Choose a
NFS-based storage pools2353. Create a new pool (part 2)Enter the target path for the device, the hostname and the NFS share path. Set the Format optio
236
Chapter 27.237Volumes27.1. Creating volumesThis section shows how to create disk volumes inside a block based storage pool.# virsh vol-create-as guest
Chapter 27. Volumes238#27.3. Adding storage devices to guestsThis section covers adding storage devices to a virtualized guest. Additional storage ca
Adding file based storage to a guest239 <source file='/var/lib/libvirt/images/FileName.img'/> <target dev='sdb'/>
Chapter 4.15Virtualization limitationsThis chapter covers additional support and product limitations of the virtualization packages in Red HatEnterpri
Chapter 27. Volumes240i. write changes to disk and quit.Command (m for help): w Command (m for help): qj. Format the new partition with the ext3 file
Deleting and removing volumes241Block device security - disk labelsThe host should not use disk labels to identify file systems in the fstab file, the
Chapter 28.243Miscellaneous storage topics28.1. Creating a virtualized floppy disk controllerFloppy disk controllers are required for a number of olde
Chapter 28. Miscellaneous storage topics24428.2. Configuring persistent storage in Red Hat EnterpriseLinux 6This section is for systems with external
Configuring persistent storage in Red Hat Enterprise Linux 6245KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --wh
Chapter 28. Miscellaneous storage topics246 multipath { wwid 1IET_00010004 alias oramp1 } multipath { wwid 1IET_00010005 alias oramp2 } mu
Accessing data from a guest disk image247 `- 9:0:0:7 sdbo 68:32 active ready running28.3. Accessing data from a guest disk imageThere are various m
Chapter 28. Miscellaneous storage topics2484. Mount the loop device which to a directory. If required, create the directory. This example uses /mnt/gu
Accessing data from a guest disk image249# mount /dev/VolGroup00/LogVol00 /mnt/guestboot6. The files are now available for reading in the /mnt/guestbo
Chapter 4. Virtualization limitations16Para-virtualized devicesPara-virtualized devices, which use the virtio drivers, are PCI devices. Presently, gue
250
Chapter 29.251N_Port ID Virtualization (NPIV)N_Port ID Virtualization (NPIV) is a function available with some Fibre Channel devices. NPIV sharesa sin
Chapter 29. N_Port ID Virtualization (NPIV)25229.1.2. Verify NPIV is used on the HBAOutput the data from the kernel on the port nodes of the HBA.Examp
Verify NPIV is used on the HBA253Adding the virtual HBA with virshThis procedure covers creating virtual HBA devices on a host with virsh. This proced
Chapter 29. N_Port ID Virtualization (NPIV)254WWNN and WWPN validationLibvirt does not validate the WWPN or WWNN values, invalid WWNs are rejected byt
Part VI. Virtualization reference guideVirtualization commands,system tools, applications andadditional systems referenceThese chapters provide detail
Chapter 30.257Managing guests with virshvirsh is a command line interface tool for managing guests and the hypervisor.The virsh command-line tool is b
Chapter 30. Managing guests with virsh258Command Descriptionsetvcpus Changes number of virtual CPUs assigned to aguest.vcpuinfo Displays virtual CPU i
259Command Descriptionthe XML definition for the storage pool withoutcreating the storage pool.pool-destroy Permanently destroys a storage pool inlibv
Application limitations17Applications with high I/O throughput requirements should use the para-virtualized drivers for fullyvirtualized guests. Witho
Chapter 30. Managing guests with virsh260This command outputs the guest's XML configuration file to standard out (stdout). You can save thedata b
261Suspending a guestSuspend a guest with virsh:# virsh suspend {domain-id, domain-name or domain-uuid}When a guest is in a suspended state, it consum
Chapter 30. Managing guests with virsh262You can control the behavior of the rebooting guest by modifying the on_reboot element in theguest's con
263used memory: 512000 kbDisplaying host informationTo display information about the host:# virsh nodeinfoAn example of virsh nodeinfo output:# vir
Chapter 30. Managing guests with virsh264 2 Domain010 inactive 3 Domain9600 crashedThe output from virsh list is categorized as
265# virsh setvcpus {domain-name, domain-id or domain-uuid} countThe new count value cannot exceed the count above the amount specified when the guest
Chapter 30. Managing guests with virsh266# virsh net-listThis command generates output similar to:# virsh net-listName State Auto
Chapter 31.267Managing guests with the VirtualMachine Manager (virt-manager)This section describes the Virtual Machine Manager (virt-manager) windows,
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)268Figure 31.1. Starting virt-managerAlternatively, virt-manager can be sta
The virtual hardware details window269Figure 31.2. Virtual Machine Manager main window31.3. The virtual hardware details windowThe virtual hardware de
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)270Figure 31.3. The virtual hardware details iconClicking the icon displays
Virtual Machine graphical console271Figure 31.4. The virtual hardware details window31.4. Virtual Machine graphical consoleThis window displays a virt
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)272Figure 31.5. Graphical console windowA note on security and VNCVNC is co
Adding a remote connection27331.5. Adding a remote connectionThis procedure covers how to set up a connection to a remote system using virt-manager.1.
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)274Figure 31.7. Remote host in the main virt-manager window31.6. Displaying
Displaying guest details2751. In the Virtual Machine Manager main window, highlight the virtual machine that you want to view.Figure 31.8. Selecting a
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2762. From the Virtual Machine Manager Edit menu, select Virtual Machine De
Displaying guest details277Figure 31.10. Displaying guest details overview3. Select Performance from the navigation pane on the left hand side.The Per
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)278Figure 31.11. Displaying guest performance details
Displaying guest details2794. Select Processor from the navigation pane on the left hand side. The Processor view allows youto view or change the curr
Part II. InstallationVirtualization installation topicsThese chapters cover setting up the host and installing virtualized guests with Red Hat Enterpr
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2805. Select Memory from the navigation pane on the left hand side. The Mem
Performance monitoring2816. Each virtual disk attached to the virtual machine is displayed in the navigation pane. Click on avirtual disk to modify or
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2821. From the Edit menu, select Preferences.Figure 31.16. Modifying guest
Displaying CPU usage2832. From the Stats tab specify the time in seconds or stats polling options.Figure 31.17. Configuring performance monitoring31.8
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2841. From the View menu, select Graph, then the CPU Usage check box.Figure
Displaying Network I/O2851. From the View menu, select Graph, then the Disk I/O check box.Figure 31.20. Selecting Disk I/O2. The Virtual Machine Manag
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2861. From the View menu, select Graph, then the Network I/O check box.Figu
Managing a virtual network2871. From the Edit menu, select Host Details.Figure 31.24. Selecting a host's details
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2882. This will open the Host Details menu. Click the Virtual Networks tab.
Creating a virtual network2891. Open the Host Details menu (refer to Section 31.11, “Managing a virtual network”) and click theAdd Network button, ide
iiiPreface vii
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)290Figure 31.27. Creating a new virtual network
Creating a virtual network2912. Enter an appropriate name for your virtual network and click Forward.Figure 31.28. Naming your virtual network
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2923. Enter an IPv4 address space for your virtual network and click Forwar
Creating a virtual network2934. Define the DHCP range for your virtual network by specifying a Start and End range of IPaddresses. Click Forward to co
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2945. Select how the virtual network should connect to the physical network
Creating a virtual network2956. You are now ready to create the network. Check the configuration of your network and clickFinish.Figure 31.32. Ready t
Chapter 31. Managing guests with the Virtual Machine Manager (virt-manager)2967. The new virtual network is now available in the Virtual Network tab o
Chapter 32.297libvirt configuration referenceThis chapter provides is a references for various parameters of libvirt XML configuration filesTable 32.1
298
Chapter 33.299Creating custom libvirt scriptsThis section provides some information which may be useful to programmers and systemadministrators intend
Chapter 5.21Installing the virtualization packagesBefore you can use virtualization, the virtualization packages must be installed on your computer.Vi
300
Part VII. TroubleshootingIntroduction to troubleshootingand problem solvingThe following chapters provide information to assist you in troubleshooting
Chapter 34.303TroubleshootingThis chapter covers common problems and solutions for Red Hat Enterprise Linux 6 virtualizationissues.This chapter is to
Chapter 34. Troubleshooting304# brctl showmacs virtbr0 port-no mac-addr local? aging timer1 fe:ff:ff:
kvm_stat305halt_exits 14050 259halt_wakeup 4496 203host_state_reload 1638354 24893hypercalls 0
Chapter 34. Troubleshooting306irq_exitsNumber of guest exits due to external interrupts.irq_injectionsNumber of interrupts sent to guests.irq_windowNu
Log files307request_irqNumber of guest interrupt window request exits.signal_exitsNumber of guest exits due to pending signals from the host.tlb_flush
Chapter 34. Troubleshooting308 initrd /initrd-2.6.32-36.x86-64.imgReboot the guest.On the host, access the serial console with the following command:#
KVM networking performance3092. Enabling the virtualization extensions in BIOSNote: BIOS stepsMany of the steps below may vary depending on your mothe
Chapter 5. Installing the virtualization packages22Select the Virtual Host server role to install a platform for virtualized guests. Alternatively, se
Chapter 34. Troubleshooting3103. Find the network interface section of the configuration. This section resembles the snippet below:<interface type=
311Appendix A. Additional resourcesTo learn more about virtualization and Red Hat Enterprise Linux, refer to the following resources.A.1. Online resou
312
313GlossaryThis glossary is intended to define the terms used in this Installation Guide.Bare-metal The term bare-metal refers to the underlying physi
Glossary314can run multiple, unmodified virtualized guest Windows and Linuxoperating systems. The KVM hypervisor in Red Hat EnterpriseLinux is managed
315Security Enhanced Linux Short for Security Enhanced Linux, SELinux uses Linux SecurityModules (LSM) in the Linux kernel to provide a range of minim
Glossary316operating systems. Software virtualization is significantly slowerthan hardware-assisted virtualization or para-virtualization.Software vir
317Appendix B. Revision HistoryRevision6.0-35Mon Oct 04 2010 Scott Radvan [email protected] for 6.0 release.Revision6.0-25Thu Sep 09 2010 Chris
Appendix B. Revision History318Beta version released.
319Appendix C. ColophonThis manual was written in the DocBook XML v4.3 format.This book is based on the original work of Jan Mark Holzer, Justin Clift
Installing KVM with a new Red Hat Enterprise Linux installation235. Customize the packages (if required)Customize the Virtualization group if you requ
Appendix C. Colophon320• Sam Friedmann• German• Hedda Peters• Greek• Nikos Charonitakis• Italian• Silvio Pierro• Francesco Valente• Brazilian Portugue
Chapter 5. Installing the virtualization packages24Press the Close button then the Next button to continue the installation.NoteYou require a valid RH
Installing KVM packages on an existing Red Hat Enterprise Linux system255.2. Installing KVM packages on an existing Red HatEnterprise Linux systemThe
Chapter 5. Installing the virtualization packages26libvirt-pythonThe libvirt-python package contains a module that permits applications written in the
Chapter 6.27Virtualized guest installation overviewAfter you have installed the virtualization packages on the host system you can create guest operat
Chapter 6. Virtualized guest installation overview28• Uses LVM partitioning• Is a plain QEMU guest• Uses virtual networking• Boots from PXE• Uses VNC
Creating guests with virt-manager29Figure 6.1. Virtual Machine Manager window4. New VM wizardThe New VM wizard breaks down the guest creation process
Virtualization GuideivIII. Configuration
Chapter 6. Virtualized guest installation overview30Figure 6.2. Step 1Type in a virtual machine name and choose an installation type:Local install med
Creating guests with virt-manager31Network Boot (PXE)This method uses a Preboot eXecution Environment (PXE) server to install the guest. Settingup a P
Chapter 6. Virtualized guest installation overview32Figure 6.4. Import existing disk image (configuration)ImportantIt is recommend that you use the de
Creating guests with virt-manager33Figure 6.5. Network Install (configuration)Click Forward to continue.7. Configure CPU and memoryThe next step invol
Chapter 6. Virtualized guest installation overview34Figure 6.6. Configuring CPU and Memory8. Configure storageAssign a physical storage device (Block
Creating guests with virt-manager35Figure 6.7. Configuring virtual storageIf you chose to import an existing disk image during the first step, virt-ma
Chapter 6. Virtualized guest installation overview36Figure 6.8. Verifying the configurationIf you prefer to further configure the virtual machine&apos
Installing guests with PXE37Figure 6.9. Virtual hardware configurationAfter configuring the virtual machine's hardware, click Apply. virt-manager
Chapter 6. Virtualized guest installation overview38TYPE=BridgeBOOTPROTO=dhcpONBOOT=yesWarningThe line, TYPE=Bridge, is case-sensitive. It must have u
Installing guests with PXE39# service iptables restartDisable iptables on bridgesAlternatively, prevent bridged traffic from being processed by iptabl
v23. Migrating to KVM from other hypervisors using virt-v2v 17123.1. Preparing to convert a virtualized gue
Chapter 6. Virtualized guest installation overview402. Select the bridgeSelect Shared physical device and select the bridge created in the previous pr
Installing guests with PXE413. Start the installationThe installation is ready to start.
Chapter 6. Virtualized guest installation overview42A DHCP request is sent and if a valid PXE server is found the guest installation processes will st
Chapter 7.43Installing Red Hat Enterprise Linux 6 asa virtualized guestThis Chapter covers how to install Red Hat Enterprise Linux 6 as a fully virtua
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest44Figure 7.1. The main virt-manager windowPress the create new virtualized gues
Creating a Red Hat Enterprise Linux 6 guest with local installation media45Figure 7.3. The Create a new virtual machine window - Step 1Press Forward t
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest46Figure 7.4. The Locate ISO media volume windowImage files and SELinuxFor ISO
Creating a Red Hat Enterprise Linux 6 guest with local installation media47Figure 7.5. The Create a new virtual machine window - Step 2Press Forward t
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest48Figure 7.6. The Create a new virtual machine window - Step 3Press Forward to
Creating a Red Hat Enterprise Linux 6 guest with local installation media49Figure 7.7. The Create a new virtual machine window - Step 4b. With a stora
Virtualization Guidevi29.1.1. Identifying HBAs in a Host System ... 25129.1.2. Verify NPIV is use
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest50Figure 7.8. The Locate or create storage volume windowi. Press the browse but
Creating a Red Hat Enterprise Linux 6 guest with local installation media51Figure 7.9. The Create a new virtual machine window - Step 4Press Forward t
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest52Figure 7.10. The Create a new virtual machine window - Step 5Press Finish to
Creating a Red Hat Enterprise Linux 6 guest with a network installation tree537.2. Creating a Red Hat Enterprise Linux 6 guest with anetwork installat
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest54Figure 7.11. The main virt-manager windowPress the create new virtualized gue
Creating a Red Hat Enterprise Linux 6 guest with PXE55Figure 7.13. The Create a new virtual machine window - Step 1Press Forward to continue.7.3. Crea
Chapter 7. Installing Red Hat Enterprise Linux 6 as a virtualized guest562. Open virt-manager and start the wizardOpen virt-manager by executing the v
Creating a Red Hat Enterprise Linux 6 guest with PXE57Choose the installation method from the list of radio buttons.Figure 7.16. The Create a new virt
58
Chapter 8.59Installing Red Hat Enterprise Linux 6as a para-virtualized guest on Red HatEnterprise Linux 5This section describes how to install Red Hat
viiPrefaceWelcome to the Red Hat Enterprise Linux 6 Virtualization Guide. This guide covers all aspects of usingand managing virtualization products i
Chapter 8. Installing Red Hat Enterprise Linux 6 as a para-virtualized guest on Red Hat Enterprise Linux 560The graphical console opens showing the in
Using virt-manager613. Start the new virtual machine wizardPressing the New button starts the virtual machine creation wizard.Press Forward to continu
Chapter 8. Installing Red Hat Enterprise Linux 6 as a para-virtualized guest on Red Hat Enterprise Linux 562Press Forward to continue.5. Choose a virt
Using virt-manager63Press Forward to continue.6. Select the installation methodRed Hat Enterprise Linux can be installed using one of the following me
Chapter 8. Installing Red Hat Enterprise Linux 6 as a para-virtualized guest on Red Hat Enterprise Linux 564Press Forward to continue.7. Locate instal
Using virt-manager65Press Forward to continue.Image files and SELinuxFor ISO image files and guest storage images it is recommended to use the /var/li
Chapter 8. Installing Red Hat Enterprise Linux 6 as a para-virtualized guest on Red Hat Enterprise Linux 566Press Forward to continue.MigrationLive an
Using virt-manager67Press Forward to continue.10. Memory and CPU allocationThe Memory and CPU Allocation window displays. Choose appropriate values fo
Chapter 8. Installing Red Hat Enterprise Linux 6 as a para-virtualized guest on Red Hat Enterprise Linux 568Press Forward to continue.11. Verify and s
Using virt-manager69Press Finish to start the guest installation procedure.12. Installing Red Hat Enterprise LinuxComplete the Red Hat Enterprise Linu
PrefaceviiiPress Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 toreturn to your X-Windows session.The first paragraph highlig
70
Chapter 9.71Installing a fully-virtualized WindowsguestRed Hat Enterprise Linux 6 supports the installation of any Microsoft Windows operating systema
Chapter 9. Installing a fully-virtualized Windows guest72ImportantAll image files should be stored in /var/lib/libvirt/images/. Other directory locati
Part III. ConfigurationConfiguring virtualization inRed Hat Enterprise Linux 6These chapters cover configuration procedures for various advanced virtu
Chapter 10.75Network ConfigurationThis page provides an introduction to the common networking configurations used by libvirt basedapplications. For ad
Chapter 10. Network Configuration76libvirt adds iptables rules which allow traffic to and from guests attached to the virbr0 devicein the INPUT, FORWA
Bridged networking with libvirt77Creating the bridgeCreate or edit the following two network configuration files. These steps can be repeated (with di
Chapter 10. Network Configuration785. Configure iptablesConfigure iptables to allow all traffic to be forwarded across the bridge.# iptables -I FORWAR
Chapter 11.79KVM Para-virtualized DriversPara-virtualized drivers are available for virtualized Windows guests running on KVM hosts. Thesepara-virtual
Pull-quote ConventionsixPublican is a DocBook publishing system.1.2. Pull-quote ConventionsTerminal output and source code listings are set off visual
Chapter 11. KVM Para-virtualized Drivers80NoteTo use the network device driver only, load the virtio, virtio_net and virtio_pcimodules. To use the blo
Using the para-virtualized drivers with Red Hat Enterprise Linux 3.9 guests81modprobe virtio_pciReboot the guest to load the kernel modules.Adding the
Chapter 11. KVM Para-virtualized Drivers8211.2. Installing the KVM Windows para-virtualized driversThis section covers the installation process for th
Installing the drivers on an installed Windows guest833. Select the device typeThis opens a wizard for adding the new device. Select Storage from the
Chapter 11. KVM Para-virtualized Drivers84Click the Forward button to proceed.4. Select the ISO fileSelect Select managed or other existing storage an
Installing the drivers on an installed Windows guest855. Finish adding virtual hardwarePress the Finish button to complete the wizard.
Chapter 11. KVM Para-virtualized Drivers866. RebootReboot or start the guest to begin using the driver disc. Virtualized IDE devices require a restart
Installing the drivers on an installed Windows guest872. Select the correct installation filesThere are four files available on the disc. Select the d
Chapter 11. KVM Para-virtualized Drivers88Press Install to continue.b. Confirm the exceptionWindows may prompt for a security exception.Press Yes if i
Installing the drivers on an installed Windows guest89c. FinishPress Finish to complete the installation.4. Install the network device drivera. Start
Commentaires sur ces manuels