Virtualization Guide5.1Red Hat Enterprise LinuxVirtualization_GuideISBN: N/APublication date: January 2008
The output displays:flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dtacpi mmx fxsr sse sse2 ss ht tm syscall nx mmtext fxsr_opt
It is a good idea to enable NAT in domain0 so that domU can access the public net. This way,even wireless users can work around the Red Hat Virtualiza
must modify the symbolic links that resides in /etc/xen/auto . This file points to the guestconfiguration files that you need to start automatically.
serial --unit=0 --speed =115200 --word=8 --parity=no --stop=1terminal --timeout=10 serial consoletitle Red Hat Enterprise Linux Server (2.6.17-1.2519.
21. Cloning the Guest Configuration FilesYou can copy (or clone) an existing configuration file to create an all new guest. You mustmodify the name pa
However there are some additional modifications that you must do to the xend-configconfiguration file. This example identifies the entries that you mu
Domain-0 NewMemSize" to check memory.You receive the following error:wrong kernel image: non-PAE kernel on a PAEThis message indicates that you a
This happens when the virt-manager application fails to launch. This error occurs when there isno localhost entry in the /etc/hosts configuration file
[2006-11-14 15:08:09 xend.XendDomainInfo 3875] DEBUG (XendDomainInfo:1449)XendDomainInfo.destroy: domid=2[2006-11-14 15:08:09 xend.XendDomainInfo 3875
http://www.libvirt.org [http://www.libvirt.org/]• virt-manager Project Home Pagehttp://virt-manager.et.redhat.com [http://virt-manager.et.redhat.com/]
Additional ResourcesTo learn more about Red Hat Virtualization, refer to the following resources.1. Useful Websites• http://www.cl.cam.ac.uk/research/
Hardware SupportRed Hat Virtualization supports multiprocessor systems and allows you to run Red HatVirtualization on x86 architectured systems with a
104
Appendix A. Lab 1Xen Guest InstallationGoal: To install RHEL 3, 4, or 5 and Windows XP Xen guests.Prerequisites: A workstation installed with Red Hat
3. Type rhel5b2-pv1 for your virtual machine name.4. Type 500 for your RAM allocation.5. Type /xen/rhel5b2-pv1.img for your disk (guest image).6. Type
For this lab, you must determine if your system supports Intel-VT or AMD-V hardware. Yoursystem must support Intel-VT or AMD-V enabled CPUs to success
5. Type /xen/rhel5b2-fv1.img for your disk (guest image).6. Type 6 for the size of your disk (guest image).7. Type yes to enable graphics support.8. T
1. The same instructions for Lab Sequence 6 applies here.Lab Sequence 8: Installing RHEL4 Xen fully virtualized guest using virt-managerFor this lab,
15.In the Virtual Machine Manager window, select the winxp Xen guest and click Open.16.The Virtual Machine Console window appears. Proceed as normal a
Appendix B. Lab 2Live MigrationGoal: To configure and perform a live migration between two hosts.Prerequisite: Two workstations installed with Red Hat
3. Restart xend:service and xend restart.Sequence 2: Exporting a shared storage via NFSFor this lab procedure, you will configure NFS and use it to ex
5. Click Movie, then Open Location. Enter http://guest:8888/TruthHappens.ogg.Sequence 4: Performing live migration1. Run the TruthHappens.ogg file on
The following output displays:flags : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 mmx fxsr ssesyscall mmtext 3dnowext 3dnow up tsIf your outp
Red Hat Virtualization SystemRequirementsThe items listed below are required by the Red Hat Virtualization system:• A working Red Hat RHEL 5 Linux dis
Booting the SystemAfter installing the Red Hat Virtualization components, you must reboot the system. When theboot completes, you must log into your s
10
Configuring GRUBGNU Grand Unified Boot Loader (or GRUB) is a program which enables the user to selectwhich installed operating system or kernel to loa
dom0_memThis limits the amount of memory that is available for domain0.dom0_max_vcpusThis limits the amount of CPUs visible to domain0.acpiThis switch
Booting a Guest DomainYou can boot guest domains by using the xm application. You can also use virsh and theVirtual Machine Manager to boot the guests
This Guide contains information on configuring, creating and monitoring guest operatingsystems on Red Hat Enterprise Linux 5.1, using virsh, vmm, and
14
Starting/Stopping a Domain at BootTimeYou can start or stop running domains at any time. Domain0 waits for all running domains toshutdown before resta
Configuration FilesRed Hat Virtualization configuration files contain the following standard variables. Configurationitems within these files must be
18
Managing CPUsRed Hat Virtualization allows a domain's virtual CPUs to associate with one or more host CPUs.This can be used to allocate real reso
Migrating a DomainMigration is the transferal of a running virtual domain from one physical host to another. RedHat Virtualization supports two variet
22
Configuring for Use on a NetworkIntegrating Red Hat Virtualization into your network architecture is a complicated process anddepending upon your infr
Virtualization Guide: Red Hat Enterprise LinuxCopyright © 2008 Red Hat, Inc.Copyright © 2008 Red Hat, Inc. This material may only be distributed subje
Securing Domain0When deploying Red Hat Virtualization on your corporate infrastructure, you must ensure thatdomain0 cannot be compromised. Domain0 is
StorageThere are several ways to manage virtual machine storage. You can export a domain0 physicalblock device (hard drive or partition) to a guest do
28
Managing Virtual Machines withvirshYou can use the virsh application to manage virtual machines. This utility is built around thelibvirt management AP
virsh suspend [domain-id | domain-name |domain-uuid]When a domain is in a suspended state, it still consumes system RAM. There will also be nodisk or
You can control the behavior of the rebooting virtual machine by modifying the on_shutdownparameter of the xmdomain.cfg file.9. Rebooting a Virtual Ma
You can use virsh to convert a domain name to a UUID:virsh domuuid [domain-id | domain-uuid]14. Displaying Virtual Machine InformationYou can use virs
ID Name State————————————————0 Domain0 running1 Domain202 paused2 Domain010 inactive3 Domain9600 crashedHere are the six domain states:running lists d
Virtualization Guide
Note that the new count cannot exceed the amount you specified when you created the VirtualMachine.20. Configuring Memory AllocationYou can use virsh
virsh net-dumpxml [vnet name]This displays information about a specified virtual network in XML format:[root@domain ~]# virsh net-dumpxml vnet1<net
36
Managing Virtual Machines UsingxendThe xend node control daemon performs certain system management functions that relate tovirtual machines. This daem
Item Descriptionserver (default is no)xend-unix-server Enables the unix domain socket server (asocket server is a communications endpointthat handles
You can use xend to restart the daemon:service xend restartThe daemon starts once again.You check the status of the xend daemon.service xend statusThe
40
Managing Virtual Machines withVirtual Machine ManagerThis section describes the Red Hat Virtualization Virtual Machine Manager (VMM) windows,dialog bo
Figure 17.1. Virtual Machine Manager Connection window3. Virtual Machine Manager WindowThis main window displays all the running virtual machines and
4. Virtual Machine Details WindowThis window displays graphs and statistics of a guest's live resource utilization data availablefrom the Red Hat
1. Red Hat Virtualization System Architecture ... 12. Operating System Support ...
Figure 17.4. Graphical Console windowYour local desktop can intercept key combinations (for example, Ctrl+Alt+F11) to prevent themfrom being sent to t
Figure 17.5. Starting the Virtual Machine Manager7. Creating a New Virtual MachineThe Virtual Machine Manager (virt-manager) is the desktop applicatio
Procedure 17.1. Creating a Guest Operating System1. From the Applications menu, select System Tools and then Virtual Machine Manager.The Virtual Machi
Figure 17.7. Selecting a New MachineThe Creating a new virtual system wizard appears.3. Click Forward.Figure 17.8. Creating a New Virtual System Wizar
4. Enter the name of the new virtual system and then click Forward.Figure 17.9. Naming the Virtual System5. Enter the location of your install media.
Figure 17.10. Locating the Installation Media6. Install either to a physical disk partition or install to a virtual file system within a file.NoteThis
Figure 17.11. Assigning the Storage Space7. Select memory to allocate the guest and the number of virtual CPUs then click Forward.Chapter 17. Managing
Figure 17.12. Allocating Memory and CPU8. Select Forward to open a console and the files start to install.Creating a New Virtual Machine51
Figure 17.13. Allocating Memory and CPU9. Complete your installation in the window provided.Chapter 17. Managing Virtual Machines with Virtual Machine
Figure 17.14. Installation Begins...WarningWhen installing Red Hat Enterprise Linux 5.1 on a fully virtualized guest, do notuse the kernel-xen kernel.
8. Restoring A Saved Machine ...549. Displaying Virtual Machine Details ...
on the guest in the Virtual Machine Manager and choose Open to open a virtual console.Figure 17.15. Red Hat Enterprise Linux 5.1 (guest)11. Enter user
Figure 17.16. Restoring a Virtual Machine2. The Restore Virtual Machine main window appears.Figure 17.17. Selecting Saved Virtual Machine SessionResto
3. Navigate to correct directory and select the saved session file.4. Click Open.The saved virtual system appears in the Virtual Machine Manager main
Figure 17.19. Selecting Virtual Machine to Display2. From the Virtual Machine Manager Edit menu, select Machine Details (or click the Detailsbutton on
Figure 17.21. Displaying Virtual Machine Details Overview3. On the Virtual Machine Details window, click the Hardware tab.The Virtual Machine Details
Figure 17.22. Displaying Virtual Machine Details Hardware4. On the Hardware tab, click on Processor to view or change the current processor memoryallo
Figure 17.24. Displaying Memory Allocation6. On the Hardware tab, click on Disk to view or change the current hard disk configuration.Figure 17.25. Di
Figure 17.26. Displaying Network Configuration10. Configuring Status MonitoringYou can use the Virtual Machine Manager to modify the virtual system St
Figure 17.28. Configuring Status Monitoring3. From the Consoles area, specify how to open a console and specify an input device.11. Displaying Domain
Figure 17.29. Displaying Domain-IDs2. The Virtual Machine Manager lists the Domain ID's for all domains on your system.Displaying Domain ID63
Red Hat Virtualization SystemArchitectureA functional Red Hat Virtualization system is multi-layered and is driven by the privileged RedHat Virtualiza
Figure 17.30. Displaying Domain-IDs12. Displaying Virtual Machine StatusTo view the status of all virtual machines on your system:1. From the View men
Figure 17.32. Displaying Virtual Machine Status13. Displaying Virtual CPUsTo view the amount of virtual CPUs for all virtual machines on your system:1
Figure 17.33. Displaying Virtual CPUs2. The Virtual Machine Manager lists the Virtual CPUs for all virtual machines on your system.Chapter 17. Managin
Figure 17.34. Displaying Virtual CPUs14. Displaying CPU UsageTo view the CPU usage for all virtual machines on your system:1. From the View menu, sele
Figure 17.36. Displaying CPU Usage15. Displaying Memory UsageTo view the memory usage for all virtual machines on your system:1. From the View menu, s
Figure 17.37. Displaying Memory Usage2. The Virtual Machine Manager lists the percentage of memory in use (in megabytes) for allvirtual machines on yo
Figure 17.38. Displaying Memory Usage16. Managing a Virtual NetworkTo configure a virtual network on your system:1. From the Edit menu, select Host De
Figure 17.40. Virtual Network Configuration3. All available virtual networks are listed on the left-hand box of the menu. You can edit theconfiguratio
Figure 17.41. Virtual Network ConfigurationThis will open the Create a new virtual network menu. Click Forward to continue.Chapter 17. Managing Virtua
Figure 17.42. Creating a new virtual network2. Enter an appropriate name for your virtual network and click Forward.Creating a Virtual Network73
virtual ethernet internet cards (VNICs). These network interfaces are configured with apersistent virtual media access control (MAC) address. The defa
Figure 17.43. Naming your virtual network3. Enter an IPv4 address space for your virtual network and click Forward.Chapter 17. Managing Virtual Machin
Figure 17.44. Choosing an IPv4 address space4. Define the DHCP range for your virtual network by specifying a Start and End range of IPaddresses. Clic
Figure 17.45. Selecting the DHCP range5. Select how the virtual network should connect to the physical network.Chapter 17. Managing Virtual Machines w
Figure 17.46. Connecting to physical networkIf you select Forwarding to physical network, choose whether the Destination should beNAT to any physical
Figure 17.47. Ready to create network7. The new virtual network is now available in the Virtual Network tab of the Host Detailsmenu.Chapter 17. Managi
Figure 17.48. New virtual network is now availableCreating a Virtual Network79
80
Red Hat VirtualizationTroubleshootingThis section covers potential issues you may experience in the installation, management, andgeneral day-to-day op
• xen-hotplug-log is the logfile that contains data from hotplug events. If a device or anetwork script does not come online, the event appears here.•
This section summarizes the System Administrator applications, the networking utilities, and theAdvanced Debugging Tools (for more information on usin
Operating System SupportRed Hat Virtualization's paravirtualization mode allows you to utilize high performancevirtualization on architectures th
xenbr0 8000.feffffff no vif13.0xenbr1 8000.ffffefff yes pddummy0xenbr2 8000.ffffffef no vif0.0# brctl showmacs xenbr0port-no mac-addr local? ageing ti
The other log file, xend-debug.log , is very useful to system administrators since it containseven more detailed information than xend.log . Here is t
xm console [domain name or number]Where domain100 represents a running name or number. You can also use the Virtual MachineManager to display the virt
The output should resemble the following:[root@devices] # scsi_id -g -s /block/sdc*3600a0b80001327510000015427b625e*This long string of characters is
alias oramp2}multipath {wwid 3600a0b80001327510000015427b625ealias oramp3}multipath {wwid 3600a0b80001327510000015427b625ealias oramp4}This defines 4
# kpartx -a /dev/xen/guest1#vgscanReading all physical volumes . This may take a while...Found volume group "VolGroup00" using metadata type
File "/usr/lib/python2.4/site-packages/xen/xend/image.py" , line30, in ?xc = xen.lowlevel.xc.xc ()RuntimeError: (2, 'No such file or di
serial --unit=1 --speed=115200title RHEL5 i386 Xen (2.6.18-1.2910.el5xen)root (hd0, 8)kernel /boot/xen.gz-2.6.18-1.2910.el5 com2=115200, 8n1module /bo
network-script network-xen-multi-bridgeMake sure to uncomment the line that states:network-script network-bridgeIf you want to create multiple Xen bri
use by Red Hat Virtualization. WiFi cards are not the ideal network connection method sinceRed Hat Virtualization uses the default network interface.T
Komentáře k této Příručce