≡ Menu

Linux Virtualization

Intel has just released source code for Fibre Channel over Ethernet (FCoE). It provides some Fibre Channel protocol processing as well as the encapsulation of FC frames within Ethernet packets. FCoE will allow systems with an Ethernet adapter and a Fibre Channel Forwarder to login to a Fibre Channel fabric (the FCF is a "gateway" that bridges the LAN and the SAN). That fabric login was previously reserved exclusively for Fibre Channel HBAs. This technology reduces complexity in the data center by aiding network convergence. It is targeted for 10Gps Ethernet NICs but will work on any Ethernet NIC supporting pause frames. Intel will provide a Fibre Channel protocol processing module as well as an Ethernet based transport module. The Open-FC module acts as a LLD for SCSI and the Open-FCoE transport uses net_device to send and receive packets.

This is good news. I think one can compare bandwidth and throughput for copper and fiber Ethernet. If you are going to use copper you need to stay within 15m of the switch. This solution will try to bring down cost. One can connect to 8-10 server to central database server with 10G and there could be few more applications.

=> Open FCoE project home page

Download of the day: Oracle VM

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.
[click to continue…]

If you hit CTRL+ALT+Delete your host will go down under CentOS Linux 5.x. The solution is hit CTRL key thrice. Now it will disable CTRL+ALT+Del for host. Next just hit alt+del to complete guest CTRL+ALT+Del cycle.

Alternatively, you can type the following on host to shutdown vps:
xm shutdown myGuestVpsOsName

XEN Server Status Monitoring Command Cheat Sheet

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.
[click to continue…]

RHEL / CentOS Support 4GB or more RAM ( memory )

If you have 4 GB or more RAM use the Linux kernel compiled for PAE capable machines. Your machine may not show up total 4GB ram. All you have to do is install PAE kernel package.

This package includes a version of the Linux kernel with support for up to 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
The non-PAE kernel can only address up to 4GB of memory. Install the kernel-PAE package if your machine has more than 4GB of memory (>=4GB).

How Do I Install PAE kernel?

To install PAE kernel, use yum command:
# yum install kernel-PAE
Output:

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel-PAE to pack into transaction set.
kernel-PAE-2.6.18-8.1.15. 100% |=========================| 207 kB    00:00
---> Package kernel-PAE.i686 0:2.6.18-8.1.15.el5 set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel-PAE              i686       2.6.18-8.1.15.el5  updates            12 M
Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): kernel-PAE-2.6.18- 100% |=========================|  12 MB    00:12
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: kernel-PAE                   ######################### [1/1]
Installed: kernel-PAE.i686 0:2.6.18-8.1.15.el5
Complete!

Just reboot the server and make sure you boot with PAE kernel i.e. 2.6.18-8.1.15.el5PAE:
# reboot

RHEL 5.1 has been released. Redhat announced the availability of Red Hat Enterprise Linux 5.1, with integrated virtualization. This release provides the most compelling platform for customers and software developers ever, with its industry-leading virtualization capabilities complementing Red Hat's newly announced Linux Automation strategy. It offers the industry’s broadest deployment ecosystem, covering standalone systems, virtualized systems, appliances and web-scale "cloud" computing environments.

Besides supporting Linux virtual machines, RHEL 5.1 will also support Windows XP, Windows 2000, Windows Server 2003 and the forthcoming Windows 2008, Crenshaw said. RHEL 5.1 uses Xen for its virtualization.

How do I upgrade to RHEL 5.1?

Login as the root user and simply type the command to fetch all updates via RHN:
# yum update
Depend upon your network condition and software configuration it may take anywhere between 5-20 minutes. Once completed, just reboot the server:
# reboot
Verify that everything is working fine:
# netstat -tulpn
# netstat -nat
# tail -f /var/log/messages
# egrep -i 'error|warn' /var/log/messages
# egrep -i 'error|warn' /path/to/apps/log

Community driven enterprise CentOS Linux users should expect update soon too. You can apply above commends to upgrade your CentOS box.

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
# reboot

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 &

CentOS XEN Virtual machine manager

CentOS XEN Virtual machine 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 \
--paravirt \
--name webserver01 \
--ram 512 \
--file /vm/webserver.nixcraft.com.img \
--file-size 10 \
--nographics \
--location http://mirrors.kernel.org/centos/5.3/os/x86_64/

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.

Fig.01: Centos Xen Virtualization Installation

Fig.01: Centos Xen Virtualization Installation


Once installed you can use xm command to list, start, stop and manage xen vps:
# 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 \
--name mailserver
--ram 500 \
--file /dev/HostVG/mailserver.cyberciti.biz \
--network network:default \
--accelerate \
--vnc \
--cdrom /dev/cdrom

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 \
--cdrom /tmp/fedorabootdvd.iso

Further readings: