Xen XCP 1.0

Xen XCP 1.0

Guideline

  1. What is Xen ?
  2. What is Xen XCP ?
  3. Who makes Xen XCP ?
  4. Who is using Xen XCP ?

 

1. What is  Xen ?

The Xen hypervisor is a layer of software running directly on computer hardware replacing the operating system thereby allowing the computer hardware to run multiple guest operating systems concurrently. Support for x86, x86-64, Itanium, Power PC, and ARM processors allow the Xen hypervisor to run on a wide variety of computing devices and currently supports Linux, NetBSD, FreeBSD, Solaris, Windows, and other common operating systems as guests running on the hypervisor.

The Xen.org community develops and maintains the Xen hypervisor as a free solution licensed under the GNU General Public License.

 

2. What is Xen XCP ?

The meaning about XCP = Xen Cloup Plattform

Features

  • Is an open source enterprise-ready server virtualization.
  • Is a cloud computing platform.
  • Consolidates server workloads.
  • Enables power-saving.
  • Enables cooling-saving.
  • Decrease management costs.
  • Hardware optimization.
  • Improve IT realibility

Architecture

 

2. Who makes Xen XCP ?

Xen XCP use the Citrix Xen Hypervisor. Xen was developed by Citrix. Xen XCP is an open server virtualization powered by Citrix. You can use it as free there is not necesary any license.

 

3. Who is using Xen XCP ?

  • Cloud providers
  • Hosting services
  • Data centers

 

 

Pictures from Xen XCP ISO Installation

Easy to install.

IMG_3043

IMG_3042 [640x480]

IMG_3043 [640x480]

IMG_3044 [640x480]

IMG_3046 [640x480]

IMG_3047 [640x480]

IMG_3049 [640x480]

IMG_3050 [640x480]

IMG_3052 [640x480]

IMG_3053 [640x480]

IMG_3054 [640x480]

IMG_3055 [640x480]

IMG_3056 [640x480]

IMG_3057 [640x480]

IMG_3058 [640x480]

IMG_3059 [640x480]

IMG_3060 [640x480]

IMG_3062 [640x480]

IMG_3063 [640x480]

IMG_3065 [640x480]

IMG_3066 [640x480]

 

IMG_3042IMG_3042

 

 

Setup a local network name server using Bind9

Bind9 Configuration files to deploy a local network name server alias "thor.loc":

/etc/bind/named.conf.local

zone "thor.loc" {
        type master;
        file "/etc/bind/db.thor.loc";
};


zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.1.168.192";
};

 

/etc/bind/db.thor.loc

$TTL 24h
thor.loc.                 IN      SOA     DNS-01.thor.loc. root.thor.loc. (
                                1               ; Serial
                                3h              ; Refresh
                                30m             ; Retry
                                7d              ; Expire
                                3h)             ; Minimum TTL
; Nameservers
thor.loc.                           IN      NS    192.168.1.103.

; Hosts
Web-01.thor.loc.           IN      A       192.168.1.100
Sql-01.thor.loc.              IN      A       192.168.1.101
File-01.thor.loc.             IN      A       192.168.1.102
DNS-01.thor.loc.           IN      A       192.168.1.103
Mail-01.thor.loc.            IN      A       192.168.1.104
Gateway-01.thor.loc.    IN      A       192.168.1.105
Debian-01.thor.loc.      IN      A       192.168.1.200

 

/etc/bind/db.1.168.192 

$TTL 24h

1.168.192.in-addr.arpa. IN SOA DNS-01.thor.loc. root.thor.loc (
                                                          1             ; serial number
                                                          3h          ; refresh time
                                                          30m      ; retry time
                                                          7d         ; expire time
                                                         3h)        ; negative caching ttl


; Nameservers

1.168.192.in-addr.arpa.               IN        NS        192.168.1.103.

; Hosts
100.1.168.192.in-addr.arpa.       IN        PTR      Web-01.thor.loc.
101.1.168.192.in-addr.arpa.       IN        PTR      Sql-01.thor.loc.
102.1.168.192.in-addr.arpa.       IN        PTR      File-01.thor.loc.
103.1.168.192.in-addr.arpa.       IN        PTR      DNS-01.thor.loc.
104.1.168.192.in-addr.arpa.       IN        PTR      Mail-01.thor.loc.
105.1.168.192.in-addr.arpa.       IN        PTR      Gateway-01.thor.loc.
200.1.168.192.in-addr.arpa.       IN        PTR      Debian-01.thor.loc.

 

/etc/resolv.conf

search thor.loc
nameserver 192.168.1.103

 

/etc/network/interfaces

# The primary network interface
auto eth1
iface eth1 inet static
     address 192.168.1.103
     network 192.168.1.0
     netmask 255.255.255.0
     broadcast 192.168.0.255
     gateway 192.168.1.1
     dns-nameservers 192.168.1.103

Syncronize files using rsync between ssh servers ssh-keygen id_dsa id_dsa.pub

The objective is syncronize files between a production and a development Webservers.

Connect to que production and development SSH Servers and make the public and the private keys.

shell@local> ssh x@X.mialojamiento.es

shell@X.mialojamiento.es> ssh-keygen -tdsa

shell@local> ssh y@Y.dyndns.org

shell@Y.dyndns.org> ssh-keygen -tdsa

 

Production and development systems makes two different files id_dsa and id_dsa.pub. id_dsa.pub is the public key.

Now copy the public key from the production server to the development server and viceversa. Use the autorized_keys file about your user that you can locate in the ~/.ssh directory.

shell@X.mialojamiento.es> cat id_dsa.pub | ssh y@Y.dyndns.org "cat – >> /home/y/.ssh/authorized_keys"
shell@Y.dyndns.org> cat id_dsa.pub | ssh x@X.mialojamiento.es "cat – >> /home/x/.ssh/authorized_keys"

 

Test the configuration

shell@X.mialojamiento.es> ssh -l y Y.dyndns.org

shell@Y.dyndns.org> ssh -l x X.mialojamiento.es

 

Syncronize files and directories

shell@Y.dyndns.org> rsync -e ssh -avzn x@X.mialojamiento.es:/home/x /var/www/

 

Its done 

Using the Debian apt-cacher package (caching .deb and source packages) to deploy a local network APT repository

The objective is that my Debian servers pool can share a same cached package repository downloaded from a official Debian repository.

It is not a mirror repository, apt-cacher only save the most frequently and necessary packages downloaded. For example updates about the base system.

Download one time a package and before share it with all common distribution servers available in the farm.

shell> apt-cache show apt-cacher

Package: apt-cacher

Priority: optional

Section: net

Installed-Size: 308

Maintainer: Mark Hindley <mark@hindley.org.uk>

Architecture: all

Version: 1.6.12


Description: Caching proxy for Debian package and source files

Apt-cacher performs caching of .deb and source packages which have been

downloaded by local users. It is most useful for local area networks with slow

internet uplink.

.

When a package is requested, the cache checks whether it already has the

requested version, in which case it sends the package to the user immediately.

If not, it downloads the package while streaming it to the user at the same

time. A local copy is then kept for use by other users.

.

Apt-cacher has been optimized for best utilization of network bandwidth and

efficiency even on slow low-memory servers. Multiple ways of installation are

possible: as a stand-alone HTTP proxy, as a daemon executed by inetd or as a

CGI program. Client machines are configured by changing APT’s proxy

configuration or modification of access URLs in sources.list.

.

The package includes utilities to clean the cache (removing obsolete package

files), generate usage reports and import existing package files. Experimental

features include a simple package checksum verification framework, optional

IPv6 support and pre-fetching of new packages (upgrade candidates).

.

Apt-cacher can be used as a replacement for apt-proxy, with no need to modify

client’s /etc/apt/sources.list files (and even reusing its config and cached

data), or as an alternative to approx.

 

shell> apt-install apt-cacher

 

apt-cache configuration file (/etc/apt-cacher/apt-cacher.conf)

“Default directory to save downloaded packages. The first runtime apt-cacher will populate the defined directory.”

cache_dir=/master/apt-cacher

“Disable the automatic cleaning. By default apt-cacher clean repository each 24 hours”.

clean_cache=0

 

apt-cacher repository directory permissions

“If you use a different directory remember update the permission before work with it”

shell>chown www-data:www-data -R /master/apt-cacher

 

apt-cache configuration file (/etc/default/apt-cacher)

"Enable the start up daemon at operating system boot time"

AUTOSTART=1

 

apt-proxy configuration file (/etc/apt/apt.conf.d/01proxy)

“Define the use of apt-cacher en each server that are present in the Debian server pool . If the file directive is not present create it.”

Acquire::http::Proxy “http://hostname:3142″;

 

apt-cacher daily usage report

“Check the use of apt-cacher in the URL. Data is updated every 24 h by default.”

http://hostname:3142/report

“Sample 24 h report”

 

 

 

 

 

 

 

 

 

The usb-Microsoft_Microsoft®_Nano_Transceiver_v1.0-mouse crash the X start up.

I detected the problem looking the /var/log/Xorg.0.log X log file. For start up the X I changed the /etc/X11/xorg.conf X config file to disable the Discovering and Add devices Server Flag that came from enable by default in the X configuration file. This section was no present then i added it in the default configuration file.

 

Section “ServerFlags”

option “AutoAddDevices” “off”

EndSection

 

In the Mouse “InputDevice” section I changed all Options except “ZaxisMappin”

 

Section “InputDevice”

# generated from default

Identifier “Mouse0″

Driver “mouse”

Option “Buttons” “5″

Option “Device” “/dev/input/mouse2″

Option “Name” “PS/2 Mouse”

Option “Protocol” “explorerps/2″

Option “ZAxisMapping” “4 5″

EndSection

 

I found the device checking the /dev/input/by-id directory

usb-Logitech_USB_Keyboard-event-if01 -> ../event4

usb-Logitech_USB_Keyboard-event-kbd -> ../event3

usb-Logitech_USB_Keyboard-event-mouse -> ../event5

usb-Logitech_USB_Keyboard-mouse -> ../mouse1

usb-Microsoft_Microsoft®_Nano_Transceiver_v1.0-event-kbd -> ../event2

usb-Microsoft_Microsoft®_Nano_Transceiver_v1.0-event-mouse -> ../event1

usb-Microsoft_Microsoft®_Nano_Transceiver_v1.0-kbd -> ../js0

usb-Microsoft_Microsoft®_Nano_Transceiver_v1.0-mouse -> ../mouse0

usb-PIXART_USB_OPTICAL_MOUSE-event-mouse -> ../event6

usb-PIXART_USB_OPTICAL_MOUSE-mouse -> ../mouse2

 

There was present two mouse devices and my X was trying to use the ../mouse0 device that did not work.

I checked about two device files and /dev/input/mouse2 seems like work when I moved a few the mouse. /dev/input/mouse0 did not work.

shell> cat /dev/input/mouse2

����8��8��8���8��8��8��8��8��8��(�(�(�(�(�(�8������8��8��8������������������^C

Howto compile a custom Linux Kernel from Kernel.org sources

Preliminary Linux kernel version

shell>uname -rp

2.6.37.6-0.7-desktop x86_64

Get the Kernel sources from www.kernel.org. I downloaded the Linux Kernel 2.6.37.6. x64 bits architecture

I have followed this procedure to compile, deploy and install a new kernel version into my box.

Get root privileges

shell> su -

Copy the downloaded linux kernel sources .tar.gz to /usr/src

shell> cp /home/simonalsa/Download/Kernel/linux-2.6.37.6.tar.gz /usr/src

Enter in /usr/src path

shell> cd /usr/src

Untar and unpack the linux kernel sources .tar.gz

shell> tar -xvvzf linux-2.6.37.6.tar.gz

Make a symbolic link to the new linux kernel sources.

shell> ln -s /usr/src/linux-2.6.37.6 /usr/src/linux

Enter in new directory / symbolic directory link

shell> cd /usr/src/linux

Clean trash from before compilations. Not necessary in the first compilation.

shell> make clean

Clean config files. Not necessary in the first compilation.

shell> make mrproper

I have used the .config file that came from with the compiled linux kernel package located in the /boot directory.

shell> cp /boot/config-2.6.37.6-0.7-default .config.0

Import the configured .config file and make some others changes in the kernel configuration.

shell> make menuconfig

Make the dependencies. Not necessary in the first compilation.

shell> make dep

Make the bzImage. Compile the linux kernel sources.

shell> make bzImage

Make the modules. Compile the modules.

shell> make modules

Install the modules. Deploy the new modules in /lib/modules

shell> make modules_install

Check the new compiled Kernel

shell> ls -la /usr/src/linux/arch/x86/boot/bzImage

Deploy the Kernel in the /boot

shell> cp /usr/src/linux/arch/x86/boot/bzImage /boot/bzImage-2.6.37.6-custom

Deploy the System.map in the /boot

shell> cp /usr/src/linux/System.map /boot/System.map-2.6.37.6-custom

Generate a new initrd file and deploy it in the /boot

shell> makeinitrd -k /boot/bzImage-2.6.37.6-custom -i /boot/initrd-2.6.37.6-custom

Backup the linux kernel sources from /usr/src/linux to /usr/src/linux-2.6.37.6-custom. Not necessary. As you like and want.

shell> cp -a linux-2.6.37.6-0.7 linux.2.6.37-custom

Edit the boot looader. Grub. Add the new kernel to the /boot/grub/menu.lst

### custom kernel

title custom kernel — opensuse 11.4 – 2.6.37.6

root(hd0,1)

kernel /boot/bzImage-2.6.37.6-custon root=/dev/disk/by-id/ata-WDC_WD15EARS-00Z5B1_WD-WMAVU3168940-part2 resume=/dev/disk/by-id/ata-WDC_WD15EARS-00Z5B1_WD-WMAVU3168940-part1 splash=silent quiet showopts vga=0x31a

initrd /boot/initrd-2.6.37.6-custom

Reboot the box

shell> reboot

Check the new kernel

shell> uname -rp

2.6.37.6-custom x86_64

The new kernel works well after the reboot now its time for tuning and custom it.

 

WordPress Themes