Chapter 17. Managing Virtual Machines Using xm

Chapter 17. Managing Virtual Machines Using xm

Chapter 17. Managing Virtual Machines Using xm

17.1. xm Configuration File
17.2. Creating and Managing Domains with xm
17.3. Monitoring and Diagnostics
17.4. Displaying Uptime
17.5. Displaying VCPU Information
17.6. Displaying Domain Information
17.7. Displaying TPM Devices
17.8. Displaying the xend Log
17.9. Displaying the Message Buffer
17.10. Displaying ACM State Information
17.11. Displaying Vnets
17.12. Displaying Virtual Block Devices
17.13. Displaying Virtual Network Interfaces
17.14. Creating a New Virtual Network Device
17.15. Terminating a Virtual Network Device
17.16. Creating a New Vnet
17.17. Terminating a Vnet
17.18. Creating a Domain Security Label
17.19. Testing the Domain Resources
17.20. Displaying System Resources
17.21. Configuring Credit Scheduling
17.22. Creating a New Virtual Block Device
17.23. Terminating a Virtual Block Device
17.24. Security

The xm application is a robust management tool that allows you to configure your Red Hat Virtualization environment. As a prerequisite to using xm, you must ensure that the xend daemon is running on your system.

17.1. xm Configuration File

The operating parameters that you must modify reside within the xmdomain.cfg file, which is located in the etc/xen directory. Here are the parameters you can enable or disable in the xmdomain.cfg configuration file:

Item Description

kernel

Determines the fully qualified path to the kernel image

ramdisk

Determines the fully qualified path to initrd for the initial ramdisk

memory

Determines the amount of RAM (in MB) to allocate for the domain when it starts

name

Determines the unique name for a domain

root

Determines the root device for a domain

nic

Determines the number of network interface cards for a domain (default is 1)

disk

Determines the arrays of device block stanzas — the three stanzas are:

· mode - device access mode

· backend-dev - the backend domain that exports to the guest domain

· frontend-dev - determines how the device appears in a guest domain

vif

Determines arrays of virtual interface stanzas (each stanza represents a set of name=value operations).

builder

Determines the builder that constructs the domain (default is linux)

cpu

Determines the CPU count for the domain to start on. 0 indicates the first CPU, 1 the second, etc. (default is -1)

cpus

Determines which CPUs the domain's VCPU are executable

extra

Determines the additional information to append to end of the kernel parameter line

nfs_server

Determines the NFS server IP address to use for the root device

nfs_root

Determines the root directory as a fully qualified path for the NFS server

vcpus

Determines the number of virtual CPUs to allocate to a domain (default is 1)

on_shutdown

Determines the domain shutdown parameter to trigger a graceful shutdown (or xm shutdown) from inside DomU

on_reboot

Determines the domain shutdown parameter to trigger a graceful reboot (or an xm reboot) from inside DomU

on_crash

Determines the domain shutdown parameter that trigger DomU crashes.

Table 17.1. The xmdomain.cfg Configuration File

17.1.1. Configuring vfb

A vfb is a virtual frame buffer that is defined as a 'stanza'. The stanza represents a set of name = value options, which when integrated into the xmdomain.cfg.5 file, must be separated by commas. The vfb entry in your configuration file resembles:

vfb = [ "stanza" ]  "name1=value1, name2=value2, " 

You can further configure your vfb environment by the incorporating the options shown in Table 16.2:

Item Description

type

The vnc type option initiates a VNC Server session that connects to an external VNC viewer. The sdl option initiates the internal viewer.

vncdisplay

Determines the VNC display number to use (defaults to the domain ID value). The VNC server listens on port 5900 + the display number.

vnclisten

The VNC server's listening address (defaults to 127.0.0.1).

vncunused

Determines the numerical value and if non-zero, enables the VNC server to listen for the first unused port over 5900.

vncpasswd

Overrides the default password configured by Xend.

display

Enables the display for the internal viewer to use (defaults to environment variable DISPLAY).

xauthority

Enables the authority file for the internal viewer to use (defaults to environment variable XAUTHORITY.

Table 17.2. The vfb Configuration Options