Difference between revisions of "Managing and Monitoring RHEL 6 based KVM Guest Systems"
m (Text replacement - "<table border="0" cellspacing="0"> " to "<table border="0" cellspacing="0" width="100%">") |
|||
Line 44: | Line 44: | ||
[[Image:rhel6_kvm_vm_overview_settings.jpg|The overview page of the KVM virtual machine details screen]] | [[Image:rhel6_kvm_vm_overview_settings.jpg|The overview page of the KVM virtual machine details screen]] | ||
− | + | <htmlet>rhel6</htmlet> | |
The details screen consists of a list of categories on the left hand side and the settings corresponding to the currently selected category in the main panel. The panel on the left allows the currently displayed category to be changed. For example, to change the memory assigned to the guest system, select the ''Memory'' option and change the settings as required, clicking the ''Apply'' button to commit the new settings: | The details screen consists of a list of categories on the left hand side and the settings corresponding to the currently selected category in the main panel. The panel on the left allows the currently displayed category to be changed. For example, to change the memory assigned to the guest system, select the ''Memory'' option and change the settings as required, clicking the ''Apply'' button to commit the new settings: | ||
Latest revision as of 19:50, 17 June 2019
Previous | Table of Contents | Next |
Managing KVM on RHEL 6 using the virsh Command-line Tool | Adding a New Disk Drive to an RHEL 6 System |
You are reading a sample chapter from the RHEL 6 Edition book. Purchase the fully updated Red Hat Enterprise Linux 8 (RHEL 8) Edition of this publication in eBook ($9.99) or Print ($36.99) format Red Hat Enterprise Linux 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 250 pages |
In the previous chapters we covered the steps necessary to configure the Red Hat Enterprise Linux 6 operating system to act as a KVM host system and created, installed and ran a KVM guest system.
In this chapter we will explore the use of the virt-manager tool to manage the KVM guest operating systems.
Starting and Stopping KVM Guest Systems
When a KVM virtual guest system has been configured it will appear in the list of systems when the virt-manager is loaded. The virt-manager tool is launched either by selecting Applications -> System Tools -> Virtual Machine Manager or from the command-line by running virt-manager. If virt-manager shows the host system as being disconnected, connect to it either by double clicking on the host in the list or right click on it and select Connect from the resulting menu.
The following screenshot shows the virt-manager tool running on an RHEL 6 system. It lists one connected host system (localhost), and four guest virtual systems, only one of which (named Windows7) is currently running:
To launch a guest virtual OS right click on the system in the list and select Run from the context menu. Alternatively, select the virtual machine and press the “play” button in the toolbar. To access the console window of running the guest, click on the Open toolbar button.
To stop a virtual machine running a guest OS it is not sufficient to simply close the Virtual Machine Console and Virtual Machine Manager windows. Doing so only closes the manager and console, leaving the guest operating system running in the background. To shutdown a guest OS, either shut it down using the operating system's own shut down mechanism, select an option from the Virtual Machine Console Virtual Machine -> Shutdown menu, or right click on the guest OS from the list in the virt-manager main screen and select Shutdown.
Pausing a KVM Guest Operating System
KVM provides the ability to pause and resume a running guest operating system. To pause a running system, either select Pause in the Virtual Machine Console Virtual Machine menu, or right click the operating system in the virt-manager main screen and select Pause.
A paused guest OS may then be resumed either by clicking again on the Pause menu option in the Virtual Machine Console, or right clicking the operating system in the virt-manager main screen and selecting Resume.
Note that a paused guest system instance will not survive the reboot of the host operating system and continues to use system memory in the paused state. In the event that the host operating system is rebooted, the guest operating system will need to be restarted and cannot be resumed from its paused state.
Changing KVM Virtual Guest System Settings
During the initial configuration of the guest OS in virt-manager a number of resources such as memory allocation and CPU usage were defined. It is common to discover after the guest OS starts running that these settings need to be changed. Fortunately, virt-manager makes it easy to change these settings.
Settings are changed from within the Details screen of the Virtual Machine console window. If this window is not currently visible it can be accessed by launching virt-manager and double clicking on the virtual machine for which the configuration settings are to be changed. Once the viewer is visible, select View -> Details or click on the blue information button on the toolbar to display the screen illustrated in the following figure: <google>RHEL6BOX</google>
You are reading a sample chapter from the RHEL 6 Edition book. Purchase the fully updated Red Hat Enterprise Linux 8 (RHEL 8) Edition of this publication in eBook ($9.99) or Print ($36.99) format Red Hat Enterprise Linux 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 250 pages |
Note that changes to memory for a currently running guest will not take effect until the guest is rebooted.
Additional disks and other devices may be added by clicking on the Add Hardware button at the bottom of the hardware category list, selecting Storage from the Hardware type menu and clicking on Forward. Specify either a disk partition, or a file location to act as the new disk.
Monitoring Virtual Machine Performance
The virt-manager tool provides information on CPU and memory usage together with disk and network I/O activity for each guest operating system. To view the performance graphs, display the viewer window (double click on the guest in the virt-manager window), select the Details option from the View menu and click on the Performance entry in list in the left hand panel. The performance screen will display real-time graphs showing the performance statistics for the selected guest:
To enable monitoring of disk and network I/O, select the Edit -> Preferences menu option from the main virt-manager screen, select the Stats tab and set the check boxes next to Disk I/O and Network I/O listed under Enable Stats Polling.
In addition, the virt-manager main window displays smaller CPU graph scale next to each guest OS.
Monitoring Performance of the RHEL 6 Host
The overall performance of the host system may be monitored from the virt-manager main window by selecting the Edit -> Host Details menu option and selecting the Overview tab:
You are reading a sample chapter from the RHEL 6 Edition book. Purchase the fully updated Red Hat Enterprise Linux 8 (RHEL 8) Edition of this publication in eBook ($9.99) or Print ($36.99) format Red Hat Enterprise Linux 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 250 pages |
Previous | Table of Contents | Next |
Managing KVM on RHEL 6 using the virsh Command-line Tool | Adding a New Disk Drive to an RHEL 6 System |