23.8. Managing Virtual Machines

Virtual machines are managed from the VM Server desktop using the xm command in a terminal window. VMs running in full virtualization mode can be accessed using VNC and SDL viewer technologies.

Table 23.1. Tasks and Commands for Managing Virtual Machines

Task

Command

To view a list of parameters available for the xm command

xm help

To view a list of all running virtual machines

xm list

To start and view a VM (paravirtual)

(The VM starts and displays in the terminal window)

xm create /etc/xen/vm/vm_name -c

To start and view a VM (fully virtual)

(The VM starts and displays in a separate SDL viewer window)

xm create /etc/xen/vm/vm_name

To view the console of an already-running VM (paravirtual)

xm console vm_name

To change the memory available to a VM (paravirtual)

xm mem-set vm_name MB_Memory

To do a normal shutdown of the VM’s operating system (paravirtual)

xm shutdown vm_name

To do a normal shutdown of the VM’s operating system (fully virtual)

Access the operating system’s console. Complete the steps to shut down the system.

To terminate a VM immediately

xm destroy vm_name

To terminate a VM immediately (fully virtual)

Close the SDL viewer window.

SDL is the default viewer for fully virtual VMs, but you might want to change to VNC. Although SDL is faster for viewing desktops on the same computer, VNC is faster for viewing desktops over the network.

Table 23.2. Changing Viewer Preferences

Task

Command

To set the default viewer to be VNC instead of SDL (fully virtual)

Edit the /etc/xen/vm/vm_name file. Add or change lines to the following:

vnc=1 vncviewer=1 sdl=0

To use VNC to view the console of an already-running VM (fully virtual)

vncviewer vm_server_ip_address:vm_id

To set the default viewer back to SDL (fully virtual)

Edit the /etc/xen/vm/vm_name file. Add or change lines to the following:

vnc=0 vncviewer=0 sdl=1

[Note]Note

Closing the VNC viewer window does not terminate the VM.