I have been using and recommending Xen for Full Virtualization for a while now. Yet, when I tried to install Xen on my old PC that ran on AMD’s Athlon XP processor, I was not able to enable Full Virtualization using Xen. I know that Xen uses technology that demands higher hardware specifications to provide full virtualization. Somehow, I wanted to make my old PC a fully virtualized machine. I evaluated a few virtualization applications to make that possible. A few of them were..
1. ‘VMware’ and
2. ‘Microsofts Virtual PC’ (it only supports MS-DOS, Windows, and OS/2).
I wanted to use this on Linux, therefore I opted for VMware.
Fortunately it worked like a charm. Now there are four different
Operating Systems are running concurrently on that old PC!.
NOTE : However I think XEN will be the right choice if your sole purpose is ‘Testing’ or you wish to implement Load balancing between the nodes.
Why ‘VMware’
1. Full virtualization is free of cost.
2. Transfer of one VMware node from one server to another is quite simple, just like copying a file.
3. Fewer system requirements than other full virtualization technologies.
4. Provides full virtualization on a wide variety of processors.
5. Free and robust node/server management tools.
6. Extremely faster on VT enabled processors.
7. Widest selection of Guest Operating Systems.
8. If you are not using the free version, there are several other reasons to choose ‘VMware’.
Tested on machines with following configuration
This configuration was based on tests performed on a local machine
and remote production server with the following configuration.
Processor “AMD Athlon XP
Number of Processors 1 No
OS Fedora Core 7
RAM 640 MB
Hard Disk 120 GB No of Nodes Created 4 nos (3 windows and 1 Linux)
Remote Server
Processor Intel(R) Xeon(R)
Number of Processors 3 Nos
OS Fedora Core 7
RAM 16 GB
Hard Disk 320 GB
No of Nodes Created 6 nos (3 windows and 3 Linux)
Configure ‘VMware’ on a remote server
Requirements
2. Pre-install steps
3. Install VMware server
NOTE : Read through the entire installation steps before start installing it on a remote server.
1. Requirements
Compatible Host Operating Systems
You can install VMware Server software on Microsoft Windows or Linux server. It is possible to install a wide variety of Guest Operating Systems on its virtual nodes.
Here we are going to use Fedora Core 7 Operating System for the VMware server on which we are going to create virtual nodes.
Compatible Processors
Intel : Pentium II, Pentium III, Pentium 4, Pentium M Xeon,and EM64T.(Dual-core processors are supported and counted as one processor for licensing.)
AMD : Athlon, Athlon MP, Athlon XP, AMD Opteron, AMD Athlon 64, Turion 64.
Experimental support for AMD Sempron.)
NOTE : Many of these processors are not supported by XEN for Full Virtualization!!! ‘VMware’ is amazing… right?
RAM requirement
It’s best to allocate at least 128 MB of RAM for each guest node.
Hard Disk Space requirement
Hard disk space really depends on the use. Better to provide at least 10 GB for each nodes.
2. Pre - Installation Steps
a. Log into remote server
Log into the server which you wish to make as VMware host server. You must have root access to the system for installing VMware.
b. Check the Kernel
If FC7 has been installed with the option ‘virtualization’ (tools for XEN), your system should have two kernels. Make sure that your system is running under the default FC7 kernel and not the kernel for XEN.
# uname -r
If you are using the XEN kernel the do the following steps.
1. Edit /etc/grub.conf to make the original FC7 kernel as the default kernel to run.
2. reboot the server.
3. Confirm using 'uname -r'
c. Development Support
The OS must have development tools. Use the following command to install them all.
# yum groupinstall "Development Tools"
#yum install gcc gcc-c++
You can also install them from the FC7 installation DVD/CDs.
d. Check whether the running kernel matches the kernel headers
# uname -r; rpm -q kernel-devel
If the versions are not matching run the following commands.
# yum -y upgrade kernel kernel-devel
# reboot
# uname -r; rpm -q kernel-devel (to make sure whether they matches)
If the kernel development tools are not installed currently, then perform the following commands.
# yum install kernel-devel
# uname -r; rpm -q kernel-devel (to make sure whether they matches)
e. Find the location for kernel headers
While installing ‘VMware’ you will be asked for the kernel headers location. You may find it by running the following command.
# ls -d /usr/src/kernels/$(uname -r)*/include
f. Install ‘xinetd’
# yum install xinetd
g. Download the latest VMware patch
Since VMware hasn’t been released for the new kernel version ‘2.6.21-1.3194.fc7′, we have to apply a patch as follows.
#mkdir /usr/src/vmware/ /usr/src/vmware/patch
#cd /usr/src/vmware/patch
#wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update113.tar.gz
# tar -zxvf vmware-any-any-update113.tar.gz
#cd vmware-any-any-update113
Do not run ‘./runme.pl’ now, we will do this later.
h. Obtain the free serial number from ‘VMware.com’
Use the link ‘http://register.vmware.com/content/registration.html’ and register for the free serial code. You have to paste the serial code while installing ‘VMware’. If not you will not be able to install guest OSs on the nodes though you can create virtual nodes.
3. Install VMware server
Installing VMware server is quite simple.
Step : 1
Through RPM
#wget http://download3.vmware.com/software/vmserver/vmware-server-1.0.3-44356.i386.rpm
#rpm -ivh vmware-server-1.0.3-44356.i386.rpm
Through Source
# wget http://download3.vmware.com/software/vmserver/vmware-server-1.0.3-44356.tar.gz
#tar -zxvf Vmware-server-1.0.3-44356.tar.gz
#cd vmware-server-distrib
# ./vmware-install.pl
While doing this you will be prompted for running the VMware configuration script ‘/usr/bin/vmware-config.pl’. Do not run this, we will do it in the next step.
Step : 2
# cd /usr/src/vmware/patch/vmware-any-any-update113
# ./runme.pl
This will patch the kernel and automatically call
‘/usr/bin/VMware-config.pl’.
Simply press ‘enter’ for selecting default values.
You will also have to enter the serial code for activating the software.
NOTE 1 : Remember the VMware port you used while installing VMware?
It’s required to manage the server remotely. I have used the port 902.
NOTE 2 : I would strongly recommend you to never open the VMware port over Internet. Restrict the access of this port from localhost only. Make sure that it is accessible via localhost, else we can’t manage the server via other machine
Create/manage Virtual Nodes
Now lets see how to create and manage nodes on the remote VMware host server. We can do this easily by installing the VMware Server Linux/Windows client package.
On the remote server, do these step
# mkdir /usr/src/vmware
#cd /usr/src/vmware
#wget http://download3.vmware.com/software/vmserver/vmware-server-linux-client-1.0.3-44356.zip
#unzip Vmware-server-linux-client-1.0.3-44356.zip
# rpm -ivh Vmware-server-console-1.0.3-44356.i386.rpm
Connect to the remote VMware server using VMware client
NOTE : The local system must be installed with the VMware Server Linux client package as shown above.
1. Set an ssh tunnel from local system to remote VMware server
Since VMware port ‘902′ on the remote server has been restricted for localhost access only, we are not able to connect to this port directly. Connect(via SSH) to the remote server to setup a tunnel between the systems. This way we can access the VMware port of the remote server via the local port 1902.
# ssh root@remoteserver -L :1902:127.0.0.1:902
or
# ssh root@remoteserver -L 127.0.0.1:1902:127.0.0.1:902
Enter root password to log into the remote VMware server. Make sure that VMware is running fine on this server.
# service vmware status
2. Start the VMware client from local machine<br Open another console on the local machine and type the following command, this will open a graphical window to connect to the remote server.
# vmware-server-console &
3. Connect to the remote server using the following details
Host name - 127.0.0.1:1902
Username - root
Password - [root password of remote VMware host]
This will open the window to manage your VMware server from the local machine.
If you haven’t blocked the port access over internet, you can ignore step 1 (but make sure that vmware is running fine on the remote server) and use Host Name as follows.
Host name - [remote server IP]:902
Username - root
Password - [root password of remote VMware host]
4. Create/manage nodes
It is quite easy to create, delete, or manage nodes on a VMware server through the client package. The application interface is self explanatory and you can easily use it.
5. Install the Guest Operating System
1. Insert the Windows/Linux CD/DVD in the CD/DVD drive.<br />2. Power on the virtual machine to start installing OS.<br />3. Follow the remaining installation steps as you would for<br />a physical machine.<br />You may also install it from network locations, ISO or from a OS template. You can also create a mirror of the existing node.
NOTE : If you click on the node window and the cursor disappears, you have to press ‘ctr’ + ‘alt’ keys to retrieve the cursor.
Acknowledgment
I would like to express my gratitude to Ajeesh T Vijayan, for helping me with this project.
References
1. http://www.vmware.com
2. http://www.howtoforge.com/vmware_server_fedora7
About the author:
Sibin C has worked for over a year in Bobcares as a System Administrator. His interests mainly lie in writing scripts that will ease the work of system administrators, securing and administrating Linux/Windows servers.
No comments:
Post a Comment