Installing VMware Server on Linux

For the Linux lovers – whom I belong to :)
It’s our turn today to learn the steps for installing VMware Server on a Linux OS

Note: I’m going to copy parts from my previous article “Installing VMware Server on Windows”; it’s the parts that should be common

Because we don’t want to be sent to jail, or lose our jobs – because you might get the idea of testing your knowledge against live networks, right? :) And because we want to practice our hacking techniques, so we have to start with creating a VIRTUAL lab :)

First we’ll create a virtual machine using VMware Server, which is free software that can be downloaded from here http://www.vmware.com/download/server/

A virtual machine is a simulated computer that runs on a real physical computer but acts as if it is a separate computer, so you can have your PC or laptop that has one of the Linux distributions installed and at the same time you can run various Operating systems without the need to format or dual boot.



Here for example, my computer is running Windows, but I was able by using VMware to create a Virtual Machine that has various operating systems installed like Apple, Solaris, and Linux…
Almost any operating system can be installed

In this lab we will learn how to install VMware server on a Linux Fedora Core 8, which is the latest version at the moment of typing :)

Prerequisites:
But before we start downloading and installing VMware, there are some prerequisites needed:
1- Development Libraries
2- Development Tools
3- Kernel-Devel
4- Xinetd



1- The 4 packages needed can be installed in one step which is through the “Add/Remove Software”, but I will do it in more steps using the “Add/Remove Software” and the “Terminal” (for the Terminals lovers) :)
Go to “Applications”, and then from the menu choose the “Add/Remove Software”



2- To install these packages you need to have the ROOT privilege (it’s like ADMINISTRATOR for Windows users)
So, if you are logged as a normal user, you will be prompted to enter a “root” password, but if you are logged already as a “root” then you will go directly to the “Package Manager”



3- In the “Package Manager”, from the “Browse” tab, highlight “Development” and choose from the listed packages:
a- Development Libraries
b- Development Tools

These development packages are required because we’ll need to compile few pieces of the VMware Server package.
Click “Apply” to complete installing the packages.


4- To install the Kernel-Devel and the Xinetd, we need to open a Terminal and type the following commands
a- su (This su command is required if you are logged in as a normal user and not a root, and you will be prompted afterwards to enter the “root” password)



b- yum install kernel-devel (“yum” is an automatic updater and package installer and it stand for “Yellowdog Updater Modified”)
Kernel-devel is required because it includes of the compatible C language headers needed for compiling few pieces of the VMware server package



c- yum install xinetd (“xinetd” is an eXtended Internet service Daemon, and it’s needed to be able to deal with running network services)



Now we are ready for starting the VMware server installation process.



1- On the Download page of VMware Server, click the “Download Now” button, this will take you to the “End User License Agreement” or EULA.
EULA is very important to read because it gives you a general idea about the software you are about to download or install, it also includes your rights and your responsibilities; it tells what you are allowed to do with this piece of software and what you are not allowed to do.
And I’m sorry, but if you want to download or install VMware Server on your machine, then you have to accept the EULA (Take it or leave it)



2- At the bottom of the EULA page, you will see 2 buttons; “Yes” and “No”, to be taken to the download links you have to click the “Yes” button



3- We can see 2 binaries for the Linux OS; “.tar.gz” and “.rpm”
TAR stands for “Tape Archive”, GZ stands for “GNU Zip”, while RPM stands for “Redhat Package Manager”
Both the “tar gz” and the “rpm” are package management systems for Linux, windows users can consider it as a zipped exe (it’s not exactly like that, but it’s the closest to make it clear for windows users)

I’m going to choose the “.tar.gz”, because this is compatible with all Linux distros and Unix OS



4- You will be prompted for the download location, save the file wherever you like.

5- Write the commands as follow:
a- su
b- tar xvfz ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’ (Where the multi X line represents the path of the “.tar.gz” file)
tar is the command used to extract or zip
The x option is to “extract”
The v option is to verbose; to output the name of each file extracted
The f option is to specify the name of the file
The z option is used when you are extracting gzip files



c- ls (this command is just to list the contents of a directory, and I just typed it to check the name of the extracted folder)
d- cd vmware-server-distrib (cd stands for “Change Directory”)
e- ls
f- ./vmware-install.pl (this is the command that will start the VMware Server installation)
The installer will ask a lot of questions; choose the defaults always by hitting the “Enter” button.



Because at this moment, VMware Server is not ready for the latest Linux Kernel (the kernel I’m doing my lab is 2.6.1-42.fc8), you might get this error when it comes to the part of building the vmmon module:
“Unable to build the vmmon module”



Now, we need to solve this problem by installing a patch file.

5- The patch file is called vmware-any-any-updatexxx, where xxx is 115 at the moment. This file can be downloaded from http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz
The command used is:
Wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz



6- We’ll use the tar command to extract the zipped file
tar xvfz vmware-any-any-update115.tar.gz



f- Change directory to the vmware-any-any-update115 and run the runme.pl file
a- cd vmware-any-any-update115
b- ./runme.pl



The patch will start updating the non compatible VMware modules.
Then it will start the process of completing the VMware Server installation which failed before. You will get a lot of questions; all you have to do is accept the defaults by hitting the “Enter” button













Now we are done successfully :) and VMware is installed successfully as well.
To start your VMware console, go to “Applications”, “Other”, and from the submenu select “VMware Server Console”







And to start creating your first virtual machine, all you have to do is to read another article :)
The article is “Creating you first virtual machine

I hope I made the steps in an easy way that everyone can follow, and please if you have any recommendations or comments don’t hesitate to contact me.
Also don’t forget to update us all if anything is changed :)

Till next article,
Take care.

0 comments: