# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 669b6252deeef90a0026a18d950feb0852df0df1
# Parent 8e74f2cf985ed5ba10b11f9713ffe35be6ec2af5
# Parent 7d7973a21a3d28aaf63829259acc6558c0a7c317
Merged.
diff -r 8e74f2cf985e -r 669b6252deee docs/src/user.tex
--- a/docs/src/user.tex Thu Dec 8 12:13:06 2005
+++ b/docs/src/user.tex Thu Dec 8 12:14:33 2005
@@ -905,14 +905,21 @@
\section{\Xend\ }
\label{s:xend}
-The Xen Daemon (\Xend) performs system management functions related to
-virtual machines. It forms a central point of control for a machine
-and can be controlled using an HTTP-based protocol. \Xend\ must be
-running in order to start and manage virtual machines.
-
-\Xend\ must be run as root because it needs access to privileged system
-management functions. A small set of commands may be issued on the
-\xend\ command line:
+
+The \Xend\ node control daemon performs system management functions
+related to virtual machines. It forms a central point of control of
+virtualized resources, and must be running in order to start and manage
+virtual machines. \Xend\ must be run as root because it needs access to
+privileged system management functions.
+
+An initialization script named \texttt{/etc/init.d/xend} is provided to
+start \Xend\ at boot time. Use the tool appropriate (i.e. chkconfig) for
+your Linux distribution to specify the runlevels at which this script
+should be executed, or manually create symbolic links in the correct
+runlevel directories.
+
+\Xend\ can be started on the command line as well, and supports the
+following set of parameters:
\begin{tabular}{ll}
\verb!# xend start! & start \xend, if not already running \\
@@ -929,9 +936,62 @@
where available. Once \xend\ is running, administration can be done
using the \texttt{xm} tool.
-As \xend\ runs, events will be logged to \path{/var/log/xend.log}
-and \path{/var/log/xend-debug.log}. These, along with the standard
-syslog files, are useful when troubleshooting problems.
+\subsection{Logging}
+
+As \xend\ runs, events will be logged to \path{/var/log/xend.log} and
+(less frequently) to \path{/var/log/xend-debug.log}. These, along with
+the standard syslog files, are useful when troubleshooting problems.
+
+\subsection{Configuring \Xend\ }
+
+\Xend\ is written in Python. At startup, it reads its configuration
+information from the file \path{/etc/xen/xend-config.sxp}. The Xen
+installation places an example \texttt{xend-config.sxp} file in the
+\texttt{/etc/xen} subdirectory which should work for most installations.
+
+See the example configuration file \texttt{xend-debug.sxp} and the
+section 5 man page \texttt{xend-config.sxp} for a full list of
+parameters and more detailed information. Some of the most important
+parameters are discussed below.
+
+An HTTP interface and a Unix domain socket API are available to
+communicate with \Xend. This allows remote users to pass commands to the
+daemon. By default, \Xend does not start an HTTP server. It does start a
+Unix domain socket management server, as the low level utility
+\texttt{xm} requires it. For support of cross-machine migration, \Xend\
+can start a relocation server. This support is not enabled by default
+for security reasons.
+
+Note: the example \texttt{xend} configuration file modifies the defaults and
+starts up \Xend\ as an HTTP server as well as a relocation server.
+
+From the file:
+
+\begin{verbatim}
+#(xend-http-server no)
+(xend-http-server yes)
+#(xend-unix-server yes)
+#(xend-relocation-server no)
+(xend-relocation-server yes)
+\end{verbatim}
+
+Comment or uncomment lines in that file to disable or enable features
+that you require.
+
+Connections from remote hosts are disabled by default:
+
+\begin{verbatim}
+# Address xend should listen on for HTTP connections, if xend-http-server is
+# set.
+# Specifying 'localhost' prevents remote connections.
+# Specifying the empty string '' (the default) allows all connections.
+#(xend-address '')
+(xend-address localhost)
+\end{verbatim}
+
+It is recommended that if migration support is not needed, the
+\texttt{xend-relocation-server} parameter value be changed to
+``\texttt{no}'' or commented out.
\section{Xm}
\label{s:xm}
@@ -992,7 +1052,7 @@
\end{quote}
The \path{xm list} command also supports a long output format when the
-\path{-l} switch is used. This outputs the fulls details of the
+\path{-l} switch is used. This outputs the full details of the
running domains in \xend's SXP configuration format.
diff -r 8e74f2cf985e -r 669b6252deee tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py Thu Dec 8 12:13:06 2005
+++ b/tools/python/xen/xend/XendClient.py Thu Dec 8 12:14:33 2005
@@ -256,12 +256,13 @@
{'op' : 'save',
'file' : filename })
- def xend_domain_migrate(self, id, dst, live=0, resource=0):
+ def xend_domain_migrate(self, id, dst, live=0, resource=0, port=0):
return self.xendPost(self.domainurl(id),
{'op' : 'migrate',
'destination': dst,
'live' : live,
- 'resource' : resource })
+ 'resource' : resource,
+ 'port' : port })
def xend_domain_pincpu(self, id, vcpu, cpumap):
return self.xendPost(self.domainurl(id),
diff -r 8e74f2cf985e -r 669b6252deee tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py Thu Dec 8 12:13:06 2005
+++ b/tools/python/xen/xend/XendDomain.py Thu Dec 8 12:14:33 2005
@@ -390,7 +390,7 @@
raise XendError(str(ex))
return val
- def domain_migrate(self, domid, dst, live=False, resource=0):
+ def domain_migrate(self, domid, dst, live=False, resource=0, port=0):
"""Start domain migration."""
dominfo = self.domain_lookup(domid)
@@ -398,7 +398,8 @@
if dominfo.getDomid() == PRIV_DOMAIN:
raise XendError("Cannot migrate privileged domain %i" % domid)
- port = xroot.get_xend_relocation_port()
+ if port == 0:
+ port = xroot.get_xend_relocation_port()
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((dst, port))
diff -r 8e74f2cf985e -r 669b6252deee tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Thu Dec 8 12:13:06 2005
+++ b/tools/python/xen/xend/server/SrvDomain.py Thu Dec 8 12:14:33 2005
@@ -90,7 +90,8 @@
[['dom', 'int'],
['destination', 'str'],
['live', 'int'],
- ['resource', 'int']])
+ ['resource', 'int'],
+ ['port', 'int']])
return fn(req.args, {'dom': self.dom.domid})
def op_pincpu(self, _, req):
diff -r 8e74f2cf985e -r 669b6252deee tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py Thu Dec 8 12:13:06 2005
+++ b/tools/python/xen/xm/migrate.py Thu Dec 8 12:14:33 2005
@@ -38,6 +38,10 @@
fn=set_true, default=0,
use="Use live migration.")
+gopts.opt('port', short='p',
+ fn=set_int, default=0,
+ use="Use specified port for migration.")
+
gopts.opt('resource', short='r', val='MBIT',
fn=set_int, default=0,
use="Set level of resource usage for migration.")
@@ -56,4 +60,4 @@
opts.err('Invalid arguments: ' + str(args))
dom = args[0]
dst = args[1]
- server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource)
+ server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource,
opts.vals.port)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|