1.1. Xend
The Xen daemon is responsible for providing the interface between the rest of the user space tools and the kernel interface. One of the most obvious responsibilities of xend is access control. On the local machine, this is managed by setting the permissions on the socket used to connect to the daemon as you would any other file, allowing access to be granted to specific users and groups. For remote administration, access can be granted to specific SSL client certificates. Furthermore, xend performs system management functions related to virtual machines and must be running in order to start and manage virtual machines (domU guests). To start xend at boot time, an initialization script named ‘/etc/init.d/xend’ is provided. We can manually start xend by running:
root@dom0$ /etc/init.d/xend start
Also, we can stop xend by running:
root@dom0$ /etc/init.d/xend stop
Additionally, we can see the status of xend by running:
root@dom0$ /etc/init.d/xend status
As xend runs, events will be logged to ‘/var/log/xend.log’ and sometimes to ‘/var/log/xend-debug.log’.
Xend is written in Python. At startup, it reads its configuration information from the file ‘/etc/xen/xend-config.sxp’. You can see the section 5 man page ‘xend-config.sxp’ for a full list of parameters and more detailed information about configuring xend.
1.2. Xm
The xm (Xen Master) tool is the simplest way of managing Xen. Xm has many subcommands including create, destroy, and list. The point is that xm is a client application that sends its commands to xend which then issues the commands to the Xen hypervisor. The general format of an xm command is:
$ xm command [switches] [arguments] [variables]
The available switches and arguments are dependent of the command chosen. The variables may be set using declarations of the form ‘variable=value’. To get a list of supported commands we can run:
root@dom0$ xm help
Below, we will summarize some useful xm commands:
- xm list: Lists all the domains running and includes some useful information about each running domain like its name, its assigned memory, the number of virtual CPUs it has and its state.
- xm create <domain-conf>: Creates a new domain based on <domain-conf> configuration file.
- xm console <domain>: Attaches to the <domain>’s console.
- xm destroy <domain>: Terminates the <domain> immediately.
- xm save <domain>: Save the state of <domain> to restore later.
- xm resume <domain>: Resumes the saved state of <domain>.
- xm shutdown/reboot/pause <domain>: Shuts down/reboots/pauses the <domain>.
- xm migrate <domain>: Migrates a domain to another machine. You can append the ‘--live’ switch if you prefer live migration.
No comments:
Post a Comment