XEN Server Status Monitoring Command Cheat Sheet

by Vivek Gite · 5 comments

The xm command is the main command line interface for managing Xen guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains, enable or pin VCPUs, and attach or detach virtual block devices.

Please note that before running any one of the following command you must run xend ( Xen control daemon aka service) and must be run as privileged user. Running xm command as non root will return an error.

I hope following XEN status monitoring cheat sheet will save your time.

Displays uptime for a domain

xm uptime

Monitors a host and its domains in real time

xm top

Displays domain information

xm list

Displays host information

xm info

Lists domain virtual processors

xm vcpu-list

Lists domain virtual network interfaces

xm network-list

Displays node information

virsh nodeinfo

Displays domain virtual processor information

virsh vcpuinfo

Displays the xend log

xm log

Displays domain information

virsh dominfo

Reads the xend daemon’s message buffer just like dmesg

xm dmesg

Further readings

=> Read xm and virsh command man page.

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 5 comments… read them below or add one }

1 unixfoo 12.17.07 at 5:47 pm
2 Surekha 01.21.08 at 6:38 am

Hi,

Some basic commands from me also :-

1. Create a node

xm create xyz.com -c

2. Switch to the node

xm console xyz.com

3. destroy node

xm destroy xyz.com

3 ilango 02.04.09 at 12:25 pm

hi
command for find the ip address of all powered on virtual machines.

4 djtremors 04.20.09 at 11:06 am

Finding the IP address is not that simple since every guest can be configured internally without a care from the dom0 since it usually only knows the mac address and has MAC rules in iptables for each of the guests, not their IP addresses. BUT, if they are all in the same subnet and are (eg) DHCP clients, you could run nmap -sP 192.168.1.0/24 and ping sweep the network then match what the dom0 knows as the MAC address against the results of the ping sweep. crude yes but why get yourself into an issue like this in the first place?

5 Cloi 08.30.09 at 9:39 pm

Hi all,

Please, I need to use php scripting to exectute xm command for example: xml list, in php I need see all virtual machines that is running and show in screen using php.

Cheers.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: