XEN




Durante mucho tiempo he probado muchas técnicas diferentes de virtualización, Xen , VMWare , Microsoft y VM. Until now I'm able to conclude that all of them are usable on my desktop machine, but both VMWare and Microsoft's VM are more sluggish that Xen . Hasta ahora estoy en condiciones de concluir que todos ellos se pueden usar en mi máquina de escritorio, pero ambos VMWare y la máquina virtual de Microsoft son más lentos que Xen . This weekend I deployed my first server based on the upcoming Ubuntu and Xen . Este fin de semana he desplegado mi primer servidor basado en la próxima Ubuntu y Xen . Everything worked out of the box Todo salió de la caja ;)

Here is what I did to install Xen on Ubuntu : Aquí está lo que hice para instalar Xen en Ubuntu :

sudo aptitude install ubuntu-xen-desktop bridge-utils

Boot into the newly installed Xen enabled Ubuntu Linux kernel Inicio del recién instalado Ubuntu Xen habilitado kernel de Linux

sudo reboot

Then adjusted the network settings in /etc/xen/xend-config.sxp. Luego ajustar la configuración de red en / etc / xen / xend-config.sxp. Enabling the network bridge: Habilitación del puente de red:

(network-script network-bridge)

Install xen-tools: Instale xen-tools:

apt-get install xen-tools

Xen tools is a collection package containing different tools related to Xen, a virtual machine creator etc. herramientas de Xen es un paquete de colección que contiene diferentes herramientas relacionadas con Xen, un creador de la máquina virtual, etc

Edit adjust the kernel and initrd parameters in /etc/xen-tools/xen-tools.conf to match the ones on your system: Editar ajustar el kernel y los parámetros initrd en / etc / xen-tools / xen-tools.conf para que coincida con los de su sistema:

Find out what the kernel image and initrd is named by: Averigüe cuál es la imagen del núcleo y el initrd es nombrado por:

ls /boot/vmlinuz*
/boot/vmlinuz-2.6.19-4-generic

and y

ls /boot/initrd* ls / boot / initrd *
/boot/initrd.img-2.6.19-4-generic / Boot/initrd.img-2.6.19-4-generic

Adjust the lines Ajuste las líneas

#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.19-4-generic
initrd = /boot/initrd.img-2.6.19-4-generic

Further adjust the xen-tools.conf to this settings: Más ajustar el xen-tools.conf a esta configuración:

dir = /home/xen
debootstrap = 1
size = 4Gb # Disk image size.
memory = 128Mb # Memory size
swap = 128Mb # Swap size
fs = ext3 # use the EXT3 filesystem for the disk image.
dist = edgy # Default distribution to install.
image = sparse # Specify sparse vs. full disk images.

Create a home for all the coming virtual Xen guests: Crear un hogar para todos los próximos virtuales Xen:

mkdir /home/xen
mkdir /home/xen/domains

Y entonces estará listo para crear una máquina virtual - resultados, simplemente por:

xen-create-image -hostname=mailserver -ip=10.0.0.21 -netmask=255.255.255.0 -gateway=10.0.0.1 -passwd

Afterwards I was able to fire up the newly created virtual machine with: Después tuve la oportunidad de arrancar la máquina virtual creado recientemente con:

xm create mailserver.cfg

If an error like this shows up Si un error como este se presenta

Error: Device 0 (vif) could not be connected. Backend device not found.

You should check your that you have enabled the network bridge, “(network-script network-bridge)”, in /etc/xen/xend-config.sxp and restarted the xen deamon by /etc/init.d/xend restart Usted debe verificar su que ha habilitado el puente de red "(red de redes-script-puente)", en / etc / xen / xend-config.sxp y reiniciar el demonio xen por / etc / init.d / xend reiniciar

When up and running either “xm list” or “xentop” can be used to get an overview of what instance are currently running Cuando en marcha cualquiera de las listas xm "o" xentop "se puede utilizar para obtener una visión general de lo que instancia se está ejecutando

ray:# sudo xm list Radiografía de tórax: # sudo lista xm
Name ID Mem(MiB) VCPUs State Time(s) Nombre ID Mem (MiB) Tiempo VCPU Estado (s)
Domain-0 0 874 1 r----- 657.9 Domain-0 0 874 1 r ----- 657,9
mailserver 3 128 1 -b---- 8.0 servidor de correo 3 128 1-b ---- 8,0

Comentarios