Changeset 473

Show
Ignore:
Timestamp:
05/22/08 11:49:28 (8 months ago)
Author:
mbailey
Message:

xen recipes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/deprec/recipes/xen.rb

    r453 r473  
    7979      # xm create -c /etc/xen/x1.cfg 
    8080       
     81      desc "Start Xen" 
     82      task :start do 
     83        send(run_method, "/etc/init.d/xend start") 
     84      end 
     85 
     86      desc "Stop Xen" 
     87      task :stop do 
     88        send(run_method, "/etc/init.d/xend stop") 
     89      end 
     90 
     91      desc "Restart Xen" 
     92      task :restart do 
     93        send(run_method, "/etc/init.d/xend restart") 
     94      end 
     95 
     96      desc "Reload Xen" 
     97      task :reload do 
     98        send(run_method, "/etc/init.d/xend reload") 
     99      end 
     100       
     101      task :list do 
     102        sudo "xm list" 
     103      end 
     104       
     105      task :info do 
     106        sudo "xm info" 
     107      end 
     108       
     109       
     110       
     111       
    81112    end 
    82113  end 
     
    112143# (xend-unix-server yes) 
    113144 
     145 
     146 
     147# 
     148# Install xen on ubuntu hardy 
     149# 
     150# ref: http://www.howtoforge.com/ubuntu-8.04-server-install-xen-from-ubuntu-repositories 
     151# 
     152 
     153 
     154# Install Xen packages  
     155# apt-get install ubuntu-xen-server 
     156  # 
     157  # Installs these: 
     158  #  
     159  # binutils binutils-static bridge-utils debootstrap libasound2 libconfig-inifiles-perl libcurl3 libdirectfb-1.0-0 libsdl1.2debian 
     160  # libsdl1.2debian-alsa libtext-template-perl libxen3 libxml2 linux-image-2.6.24-16-xen linux-image-xen 
     161  # linux-restricted-modules-2.6.24-16-xen linux-restricted-modules-common linux-restricted-modules-xen 
     162  # linux-ubuntu-modules-2.6.24-16-xen linux-xen nvidia-kernel-common python-dev python-xen-3.2 python2.5-dev ubuntu-xen-server 
     163  # xen-docs-3.2 xen-hypervisor-3.2 xen-tools xen-utils-3.2 
     164   
     165  # before/after 'uname -a' 
     166  # 
     167  # Linux bb 2.6.24-16-server #1 SMP Thu Apr 10 13:15:38 UTC 2008 x86_64 GNU/Linux 
     168  # Linux bb 2.6.24-16-xen #1 SMP Thu Apr 10 14:35:03 UTC 2008 x86_64 GNU/Linux 
     169#  
     170# Stop apparmor # XXX investigate why 
     171# /etc/init.d/apparmor stop 
     172# update-rc.d -f apparmor remove 
     173 
     174# mkdir /home/xen 
     175 
     176# edit /etc/xen-tools/xen-tools.cfg 
     177 
     178# create image with xen-tools 
     179# xen-create-image --hostname=x1 --size=2Gb --swap=256Mb --ide --ip=192.168.1.51 --memory=256Mb --install-method=debootstrap --dist=hardy  
     180 
     181# update /etc/xen/<domain>.cfg 
     182# 
     183# disk        = [ 
     184              #     'tap:aio:/home/xen/domains/xen1.example.com/swap.img,hda1,w', 
     185              #     'tap:aio:/home/xen/domains/xen1.example.com/disk.img,hda2,w', 
     186              # ]