-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi All, I am starting with Xen (comparing it with VMware), but I am a bit stumped with the remote management. I use Debian stable as Dom0 (a customized version on USB of the liveCD), and in /etx/xen/xend-config.sxp I have: (logfile /var/log/xen/xend.log) (loglevel DEBUG) (xend-http-server yes) (xend-unix-server yes) (xend-tcp-xmlrpc-server yes) (xend-unix-xmlrpc-server yes) (xend-relocation-server yes) #(xen-tcp-xmlrpc-server-address '''') #(xen-tcp-xmlrpc-server-address ''localhost'') (xen-tcp-xmlrpc-server-address "xenhost.mydomain.com") #(xen-tcp-xmlrpc-server-address ''192.168.1.73'') (xen-tcp-xmlrpc-server-port 8006) (xend-port 8000) (xend-relocation-port 8002) (xend-address ''192.168.1.73'') #(xend-address localhost) Some lines are commented out, but I tried all above combinations. I cannot get XEN listening on another IP then localhost! No matter what syntax/version I use, Restarting XEN always gives in the log: [2009-10-26 18:28:32 8767] INFO (XMLRPCServer:149) Opening Unix domain socket XML-RPC server on /var/run/xend/xen-api.sock; authentication has been disabled for this server. [2009-10-26 18:28:32 8767] INFO (XMLRPCServer:127) Opening TCP XML-RPC server on localhost:8006. [2009-10-26 18:28:32 8767] INFO (XMLRPCServer:149) Opening Unix domain socket XML-RPC server on /var/run/xend/xmlrpc.sock. And a: telnet localhost 8006 gives me a connection, but a: telnet xenhost.mydomain.com 8006 or a: telnet 192.168.1.73 8006 Gives me a connction refused. Yes, I did set /etc/hosts correctly: 127.0.0.1 localhost 192.168.1.73 xenhost.mydomain.com xenhost When I change /etc/hosts to: 127.0.0.1 localhost2 192.168.1.73 xenhost.mydomain.com xenhost localhost Then the log still shows "Opening TCP XML-RPC server on localhost:8006", but now I am able to connect to both xenhost.mydomain.com and 192.168.1.73 This is as expected, but I am afraid a lot of things will break (localhost no longer being 127.0.0.1). How do I fix this? I am running Xen3.2-1, Dom0 = linux kernel 2.6.26-2-xen-amd64, on Debian (using standard packages from Debian mirror). It is a live distro (using the live scripts, slightly modified for my hardware), from USB, with persistence set (snapshot on USB-partition ''live-rw'') Anyone with good ideas/pointers? TIA, Marcel - -- - --------------------------------------------------------------- ing. Marcel van Dorp (CCDP, CCNP, CCSP) WiWo Support http://www.wiwo.nl Postbus 1098 tel. 071-523 77 91 2340 BB Oegstgeest gsm 0653-50 77 76 - --------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkrmw/gACgkQIA1+xqauveq1PACfSt9VRpfxgQ2rj60BzFYmZPvi xVoAn2O83O4R7ppo5l9BrZW3bTYN2b0E =OlhU -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
SOLVED
This script helps me. Is suitable for xen 3.2 on debian. i find them in
conventure-tools
after them rpc server listen on 0.0.0.0:8006
#!/bin/bash
#
# This script modifies the xend configuration file: xend-config.sxp
# to allow xmlrpc access over tcp and to allow domain relocation
# (migration) to all hosts.
#
#
# Author - Haphazard
# Copyright (c) 2007 Convirture Corporation
#
#
# This software is subject to the GNU Lesser General Public License (LGPL)
# available at: http://www.fsf.org/licensing/licenses/lgpl.txt
#
ORIGCONFIG="/etc/xen/xend-config.sxp"
XEN_VER="3.2"
if [ "$1" != "" ]; then
XEN_VER="$1"
XEN_VER=${XEN_VER:0:3} # major.minor is enough
fi
if [ "$XEN_VER" != "3.2" ]; then
echo "Only Xen 3.2 supported."
exit 1
fi
USE_SSL=""
# check if SSL setup needs to be done or not.
if [ "$2" == "SSL" ]; then
USE_SSL="SSL"
fi
OPENSSL=openssl
if [ "$USE_SSL" == "SSL" ]; then
python -c "import OpenSSL" &> /dev/null
if [ "$?" != 0 ]; then
echo "pyOpenSSL not found. Please make sure that pyOpenSSL is
installed."
exit 1
fi
echo "Setting up self signed certificates"
$OPENSSL version &> /dev/null
if [ "$?" != 0 ]; then
echo "$OPENSSL not found. Please make sure that openssl is installed
and is in path."
exit 1
fi
# create a respose file for ssl certificate creation
# Modify the certificate params for deployment details on response
# is as follows
# Country Name (2 letter code)
# State or Province Name (full name)
# Locality Name (e.g. city)
# Organization Name (eg, company)
# Organizational Unit Name (eg, section)
# Common Name (eg, your name or your server''s hostname)
# Email Address
# A challenge password
# An optional company name
SSL_TEMP_FILE=`mktemp -t open_ssl.res.XXXXXXXXXX`
cat < $SSL_TEMP_FILE
US
CA
SF
Test Corp
.
$HOSTNAME
.
.
.
EOF
KEY=/etc/xen/xmlrpc.key
CSR=/etc/xen/xmlrpc.csr
CRT=/etc/xen/xmlrpc.crt
$OPENSSL genrsa -out $KEY 1024
$OPENSSL req -new -key $KEY -out $CSR < $SSL_TEMP_FILE
$OPENSSL x509 -req -in $CSR -signkey $KEY -out $CRT
rm $SSL_TEMP_FILE
fi
# Adjust the regexp for the config file
SPACE=" "
if [ "$USE_SSL" == "SSL" ]; then
SPACE=""
fi
# make the necessary configuration changes to
# enable xml-tcp-rpc and domain relocation.
sed "
# Enable tcp-xmlrpc
/xend-tcp-xmlrpc-server$SPACE/ {s/^#//;s/no/yes/}
/xen-tcp-xmlrpc-server-/ {s/^#//;s/xen-tcp/xend-tcp/;s/localhost//}
# Enable relocation server and addresses
/(xend-relocation-port/ s/^#//
/(xend-relocation-server/ {s/^#//;s/no/yes/}
/(xend-relocation-address/ s/^#//
# Allow relocation to any host.
/(xend-relocation-hosts-allow '''')/ s/^#//
/^(xend-relocation-hosts-allow.*localhost/ s/^/#/
# for ubuntu fix the bridge entry ???
/(network-script / s/network-dummy/network-bridge/
" < "$ORIGCONFIG" > "$ORIGCONFIG.new"
if [ "$3" != "true" ]; then
sed "
#enable public network bridge setup with custom script
/^#(network-script[ ]*network-bridge)/
{s/^#//;s/network-bridge)/convirt-xen-multibridge)/}
/^(network-script[ ]*network-bridge)/
{s/network-bridge)/convirt-xen-multibridge)/}
/^#(vif-script[ ]*vif-bridge)/ s/^#//
/^(network-script[ ]*network-route)/ s/^/#/
/^(vif-script[ ]*vif-route)/ s/^/#/
/^(network-script[ ]*network-nat)/ s/^/#/
/^(vif-script[ ]*vif-nat)/ s/^/#/
" < "$ORIGCONFIG".new >
"$ORIGCONFIG.new.withbridge"
fi
# swap the new and original configurations
mv $ORIGCONFIG $ORIGCONFIG.orig.`date +"%Y%m%d.%H%M%S"`
if [ -a "$ORIGCONFIG.new.withbridge" ]; then
mv $ORIGCONFIG.new.withbridge $ORIGCONFIG
rm $ORIGCONFIG.new
else
mv $ORIGCONFIG.new $ORIGCONFIG
fi
echo "Modified xend-config successfully"
## THIS IS NOT REQUIRED and DOES NOT WORK.
## TYPO IN xend-config.sxp is fixed through regexp above
# patch XMLRPCServer
#sh ./patch_XMLRPCServer XMLRPCServer.py-$XEN_VER-diff
# restart xend for the new config to take effect.
#/sbin/service xend restart
/etc/init.d/xend restart
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
--
View this message in context:
http://old.nabble.com/TCP-XMLRPC-tp26078732p27499138.html
Sent from the Xen - User mailing list archive at Nabble.com.
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users