How to: Install and Setup XEN Virtualization Software on CentOS Linux 5

Posted on in Categories CentOS, High performance computing, Howto, Linux, Linux Virtualization, RedHat/Fedora Linux, xen last updated October 18, 2007

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.

How to: Upgrade VMWARE Server under Linux

Posted on in Categories CentOS, Howto, Linux Virtualization, RedHat/Fedora Linux, Suse Linux, Tips last updated September 25, 2007

Build 56528 is a release build of VMware Server 1.0.4. It is a maintenance bug fix release to address security issues. Upgrading VMWare server is a piece of cake under Redhat Enterprise Linux / CentOS Linux version 5.0.

Please note that following instructions are tested on RHEL 4.5, 5.0 and CentOS Linux 5.0 only. You can use tar ball based package to upgrade vmware under Debian Linux.

Find out current VMware server version

First find out current vmware server version, enter:
# vmware -v
Output:

VMware Server 1.0.3 build-44356

You can download the latest version from official site.

Shutdown all VMWARE guest oses / vps

Login to each running VM and bring down (halt) guest operating system. You can also use vmware server console or web based interface for the same purpose.
Stop VMWARE Server:
# /etc/init.d/vmware stop
Output:

Stopping VMware services:
   Virtual machine monitor                                 [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Virtual ethernet                                        [  OK  ]

Stop VMWARE Webbased interface:
# /etc/init.d/httpd.vmware stop
Output:

   Shutting down http.vmware:                              [  OK  ]

Download VMWARE Server

Use wget the ultimate command line downloader
# cd /tmp
# wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.4-56528.i386.rpm
# wget http://download3.vmware.com/software/vmserver/VMware-mui-1.0.4-56528.tar.gz

Upgrade VMWARE server

Use rpm command to upgrade VMWARE server, enter:
# rpm -Uvh VMware-server-1.0.4-56528.i386.rpm
Output:

Preparing...                ########################################### [100%]
   1:VMware-server          ########################################### [100%]

Reconfigure VMWARE Server

Just reconfigure Vmware server with old values/options:
# vmware-config.pl
Just accept accept the End User License Agreement and press CTRL+C. Now configure server with old values:
# vmware-config.pl -d
Output:

aking sure services for VMware Server are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Virtual ethernet                                        [  OK  ]

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.
...........
...
.....
*** Output truncated ***

Upgrade VMware Server Web-based management interface

The VMware Server Web-based management interface. Install on your VMware Server system to enable control from a Web browser. Untar and install the same:
# tar -zxvf VMware-mui-1.0.4-56528.tar.gz
# cd vmware-mui-distrib/
# perl vmware-install.pl

Just follow on screen instructions to install Web-based management interface. Finally just start all guest oses.

Linux kernel enable the IOMMU – input / output memory management unit support

Posted on in Categories High performance computing, Howto, Linux, Linux distribution, Linux Virtualization last updated September 11, 2007

One of our regular reader asks:

How do I turn on IOMMU (Linux kernel Calgary patch) DMA support under Linux?

Most modern Linux has support for IOMMU. An IOMMU is a device that will support mapping memory addresses. There is currently high-end branded server hardware that support this, but no desktop machines support IOMMU, AFAIK. An example IOMMU is the AGP and PCI Express graphics cards.

More about IOMMU

According to wikipedia:

The IOMMU or input/output memory management unit is a computer memory management unit (MMU) that connects a DMA-capable I/O bus to the primary storage memory. Like the CPU memory management unit, an IOMMU takes care of mapping virtual addresses (also called device addresses or I/O addresses) to physical addresses and some units guarantee memory protection from misbehaving devices.

Comparison of the I/O memory management unit (IOMMU) to the memory management unit (MMU).
[ Image: Comparison of the I/O memory management unit (IOMMU) to the memory management unit (MMU) ]

The advantages of having an IOMMU, compared to direct physical addressing of the memory, include:

  1. Large regions of memory can be allocated without the need to be contiguous in physical memory – the IOMMU will take care of mapping contiguous virtual addresses to fragmented physical addresses. Thus, the use of vectored I/O (scatter-gather lists) can sometimes be avoided.
  2. Memory protection from malicious or misbehaving devices \u2013 a device cannot read or write to memory that hasn’t been explicitly allocated (mapped) for it.
  3. Virtualized guest operating systems can safely be granted direct access to hardware.
  4. In general, the IOMMU provides isolation (memory protection) and address translatio

Turn on IOMMU

In order to turn on IOMMU, you need to pass following parameter to boot kernel (assuming that support is compiled into running kernel – most modern Linux kernel / distro has support, for e.g. Fedora / CentOS / RHEL / Suse etc):
iommu=calgary
Open /etc/grub.conf or /boot/grub/menu.lst file
vi grub.conf
Append above string to kernel line:
kernel /boot/vmlinuz-2.6.17-10-generic root=UUID=317464f6-8be2-4f54-88e3-694dcc8cd3c4 ro quiet splash iommu=calgary
Save and close the file. Reboot the server.

A note about IOMMU support

Please note that you need hardware and software to support IOMMU. Above instructions will just turn on Linux kernel software support. Since current hardware support is limited to high-end expensive server most Linux distro does not enable calgary DMA address mapping with memory protection by default.

See also:

=> AMD I/O Virtualization Technology (IOMMU) Specification