Difference between revisions of "Xen"

From HoerupWiki
Jump to: navigation, search
(hoerup's custom xen install)
(hoerup's custom xen install)
Line 56: Line 56:
 
* /etc/ser2net.conf
 
* /etc/ser2net.conf
 
** 2001:raw:600:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS
 
** 2001:raw:600:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS
 +
 +
* chkconfig
 +
** chkconfig --level 345 smartd on
 +
** chkconfig --level 345 nfs on
 +
** chkconfig ser2net on

Revision as of 09:31, 3 May 2013

Accessing VNC Consoles

All the vm consoles on xenserver are per default only accessible via the http(s) interface, but with some few tricks you can access them directly:

All commands are done via SSH on xenserver

Warning - this bypasses a lot of xenservers security measures

  1. Allow VNC ports through firewall
    1. Append following line to /etc/rc.local
    2. iptables --insert INPUT -p tcp --dport 5900:5999 -j ACCEPT
  2. Set vncterm to listen on all interfaces instread of 127.0.0.1
    1. Edit /opt/xensource/libexec/vncterm-wrapper
    2. Alter the VNCTERM_LISTEN variable to "-v 0.0.0.0:1"

Autostart of VM's

The free xenserver doesn't allow to set a vm to autostart via xencenter, but there's a work-around that issue:

  1. edit /etc/rc.local
  2. add a line with "sleep 45" - to allow all the xen components to complete initialization (on more powerfull hardware the delay can be less than 45 seconds)
  3. add a line with xe vm-start vm=<vm-name> for each vm you want to auto start

Running XenCenter on linux - doesnt work

  1. Download Xencenter from 6.0 550
  2. Install wine > 1.2 (apt-get install wine1.3 or what ever you got)
  3. Download winetricks: wget http://winetricks.org/winetricks
  4. Use winetricks to install .net: sh winetricks dotnet2 Use winetricks to install mono: sh winetricsk mono210
  5. Install XenCenter from msi: wine start XenServer-6.0.0-XenCenter.msi
  6. use wine to launch mono and xencenter: wine "C:\\Program Files\\Mono-2.10.6\\bin\\mono.exe" "c:\\XenCenter\\XenCenterMain.exe"

Basic Centos admin

Enable standard repos in /etc/yum.repos.d/Centos-Base.repo (set enabled=1)

  • list installed packages: rpm -qa (filter with grep)
  • search packages: yum search
  • install packages: yum install
  • apache package is called httpd
    • make sure that it starts automatically: chkconfig --level 2345 httpd on
    • xapi uses port 80 so run apache from eg port 88 or 8080
    • remember to add a firewall rule (see accessing vnc)
    • make sure apache can navigate down from root folder: chmod 711 / (by default it is 700)

hoerup's custom xen install

  • basic xenserver install
  • rc.local
    • iptables --insert INPUT -j ACCEPT
  • installed packages
    • epel-release-5-4.noarch.rpm
    • yum install ser2net
    • yum install smartmontools
  • /etc/ssmtp/ssmtp.conf
    • rewriteDomain=xen.t-hoerup.dk
    • mailhub=rafiki
    • root=torben
  • /etc/ser2net.conf
    • 2001:raw:600:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS
  • chkconfig
    • chkconfig --level 345 smartd on
    • chkconfig --level 345 nfs on
    • chkconfig ser2net on