With this quick tip you can increase MTU size to get a better networking performance.
Virtualization is the latest buzz word. You may wonder computers are getting cheaper every day, why should I care and why should I use virtualization? Virtualization is a broad term that refers to the abstraction of computer resources such as:
- Platform Virtualization
- Resource Virtualization
- Storage Virtualization
- Network Virtualization
- Desktop Virtualization
This article describes why you need virtualization and list commonly used FOSS and proprietary Linux virtualization software.
Xen is one of the leading Virtualization software. You can use Xen virtualization to implement HA clusters. However, there are few issues you must be aware of while handling failures in a high-availability environment. This article explains configuration options using Xen:
The idea of using virtual machines to build high available clusters is not new. Some software companies claim that virtualization is the answer to your HA problems, off course that’s not true. Yes, you can reduce downtime by migrating virtual machines to another physical machine for maintenance purposes or when you think hardware is about to fail, but if an application crashes you still need to make sure another application instance takes over the service. And by the time your hardware fails, it’s usually already too late to initiate the migration.
So, for each and every application you still need to look at whether you want to have it constantly available, if you can afford the application to be down for some time, or if your users won’t mind having to relogin when one server fails.
=> Using Xen for High Availability Clusters [onlamp.com]
Virtualization is the process of abstracting computing resources such that multiple operating system and application images can share a single physical server, bringing significant cost-of-ownership and manageability benefits. Through its Oracle VM product, Oracle offers scalable, low-cost server virtualization for heterogeneous applications.
Oracle VM is free server virtualization software that fully supports both Oracle and non-Oracle applications, and is three times more efficient than other server virtualization products.
The xm command is the main command line interface for managing Xen guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains, enable or pin VCPUs, and attach or detach virtual block devices.
Please note that before running any one of the following command you must run xend ( Xen control daemon aka service) and must be run as privileged user. Running xm command as non root will return an error.
I hope following XEN status monitoring cheat sheet will save your time.
One of our regular reader asks:
I’m using CentOS Linux 5 server. How do I set up Xen on Linux ? How do I install guest VPS oses such as Fedora or Windows 2000 or Debian Linux inside XEN?
Xen is a free open source software virtual machine monitor for Intel / PowerPC architectures. It is software that runs on a host operating system and allows several guest operating systems to be run on top of the host on the same computer hardware at the same time (just like VMWare software). Luckily Installing and managing XEN is quite easy under CentOS 5 Linux.
Login as the root and type the following commands:
# yum install xen virt-manager kernel-xen
# chkconfig xend on
Make sure you boot CentOS server using XEN kernel.
How do I install NetBSD / any Linux distro / Windows 2000 inside XEN?
Simply use gui tool called virt-manager:
# virt-manager &
Now just follow on screen instructions to setup new guest operating systems (VPS oses). virt-manager is Xen Management Consoles software. It can perform the common tasks of administering a Xen host such as configuring, starting, monitoring and stopping of Xen guests oses. Please note that above instructions also works on
- RHEL 5
- Fedora Linux 7
Installing CentOS 5.3 guest using the Internet
virt-install is a command line tool for provisioning new virtual machines using the “libvirt” hypervisor management library. Type the following command to install CentOS v5.3 64 bit as guest operating system in /vm:
# mkdir /vm
If you are using SELinux, enter:
# semanage fcontext -a -t xen_image_t "/vm(/.*)?"
# restorecon -R /vm
# ls -dZ /vm
Above will provide security context of Xen images. Finally, install CentOS 5.3 using the Internet mirror:
# virt-install \
--name webserver01 \
--ram 512 \
--file /vm/webserver.nixcraft.com.img \
--file-size 10 \
Above will CentOS as a paravirtualized Xen guest, with 512 MB of RAM, a 10 GB of disk, and from a web server, in text-only mode. You need to just follow on screen instructions.
# xen list
Attach console to domain / guest called webserver01:
# xm console webserver01
See xm command cheat sheet.
Installing CentOS 5.3 guest using DVD
Install a CentOS guest, using LVM partition, virtual networking, booting from the host CDROM, using VNC server/viewer (insert DVD into drive):
# virt-install \
--connect qemu:///system \
--ram 500 \
--file /dev/HostVG/mailserver.cyberciti.biz \
--network network:default \
Note you need qemu and virt-viewer installed on the host system.
Installing Fedora guest using DVD iso image stored on hard disk
Install a Fedora Linux, with a real partition (/dev/sdc), using a local DVD ISO image:
# virt-install \
--name www2 \
--ram 1000 \
--file /dev/sdc \
--network bridge:eth1 \