Diferencia entre revisiones de «Xen»

De gacq wiki
Saltar a: navegación, buscar
Línea 2: Línea 2:
 
==Debian Etch installation==
 
==Debian Etch installation==
 
===Packages install===  
 
===Packages install===  
  sudo aptitude install linux-image-2.6-xen-amd64 xen-hypervisor-3.0.3-1-amd64 xen-linux-system-2.6.18-5-xen-amd64 xen-tools
+
  sudo apt-get install linux-image-2.6-xen-amd64 xen-hypervisor-3.0.3-1-amd64 \\
 +
xen-linux-system-2.6.18-5-xen-amd64 xen-tools
  
 
===Network config===
 
===Network config===
Línea 17: Línea 18:
 
;reboot
 
;reboot
  
===Tools config===
+
 
 +
===xen-tools===
 +
;(optional) to install latests version from project repository add to sources.lists
 +
#
 +
#  Steve Kemp's repository:  Etch
 +
#
 +
deb    http://apt.steve.org.uk/etch etch main non-free contrib
 +
deb-src http://apt.steve.org.uk/etch etch main non-free contrib
 +
 
 +
sudo apt-get install xen-tools
 +
 
 +
;xen-tools config
 
in /etc/xen-tools/xen-tools.conf
 
in /etc/xen-tools/xen-tools.conf
  
Línea 36: Línea 48:
 
   
 
   
 
  mirror = http://ftp.us.debian.org/debian/
 
  mirror = http://ftp.us.debian.org/debian/
 
  
 
=Administration=
 
=Administration=

Revisión del 08:50 16 ene 2008

Installation

Debian Etch installation

Packages install

sudo apt-get install linux-image-2.6-xen-amd64 xen-hypervisor-3.0.3-1-amd64 \\
xen-linux-system-2.6.18-5-xen-amd64 xen-tools

Network config

Before the reboot, a small change in /etc/xen/xend-config.sxp should be done.

Replace

(network-script network-dummy)

with

(network-script 'network-bridge netdev=eth0')
reboot


xen-tools

(optional) to install latests version from project repository add to sources.lists
#
#  Steve Kemp's repository:  Etch
#
deb     http://apt.steve.org.uk/etch etch main non-free contrib
deb-src http://apt.steve.org.uk/etch etch main non-free contrib
sudo apt-get install xen-tools
xen-tools config

in /etc/xen-tools/xen-tools.conf

lvm = vg0
debootstrap = 1

size   = 10Gb      # Disk image size.
memory = 256Mb    # Memory size
swap   = 256Mb    # Swap size
fs     = ext3     # use the EXT3 filesystem for the disk image.
dist   = etch    # Default distribution to install.
image  = sparse   # Specify sparse vs. full disk images.

dhcp = 1

kernel = /boot/vmlinuz-2.6.18-5-xen-amd64
initrd = /boot/initrd.img-2.6.18-5-xen-amd64

mirror = http://ftp.us.debian.org/debian/

Administration

Create image

xen-create-image --hostname vserver1.mydomain
or use with options
xen-create-image --hostname=vm1.domain.com --size=5Gb --swap=256Mb --ide \
--ip=192.168.0.101 --netmask=255.255.255.0 --gateway=192.168.0.1 --force \
--dir=/vserver --memory=32Mb --arch=i386 --kernel=/boot/vmlinuz-2.6.18-xenU \
--debootstrap --dist=etch --mirror=http://ftp2.de.debian.org/debian/ --passwd

Boot

xm create /etc/xen/vserver1.mydomain.cfg

Console connect

xm console vserver1.mydomain

Other common commands

xm shutdown <name> - Stop a virtual machine.
xm destroy <name> - Stop a virtual machine immediately without shutting it down. It's as if you switch off the power button.
xm list - List all running systems.
xm help - List of all commands.


Tools

Images

References