Open your Server Console and login as root
During installation the kernel-headers package is required. So we start by first asking the system what kernel we are using, then we install the kernel headers for this kernel.
# uname –r
2.6.8-2-386
#apt-get install kernel-headers-2.6.8-2-386
The following extra packages will be installed:
kernel-headers-2.6.8-2 kernel-kbuild-2.6-3
The following NEW packages will be installed:
kernel-headers-2.6.8-2 kernel-headers-2.6.8-2-386 kernel-kbuild-2.6-3
0 upgraded, 3 newly installed, 0 to remove and 8 not upgraded.
Inst kernel-kbuild-2.6-3 (2.6.8-2 Debian:3.1r1/stable)
Inst kernel-headers-2.6.8-2 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Inst kernel-headers-2.6.8-2-386 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Conf kernel-kbuild-2.6-3 (2.6.8-2 Debian:3.1r1/stable)
Conf kernel-headers-2.6.8-2 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Conf kernel-headers-2.6.8-2-386 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Press Y(es) to continue
Now on your server Console go to: VM, Install VMWare Tools, Nothing will happen but the Linux VMWare Tools ISO is now mounted on your virtual machine.
Now mount the iso in your Debian box:
#mount /dev/cdrom
To see your mounted drives type:
#mount
My cdrom is mounted as cdrom0 so I type:
#cd /media/cdrom0
Let’s copy the tools to the debian box:
#cp vmware-linux-tools.tar.gz /root/.
#cd /root
Let’s unpack the VMWare tools and start the installation:
Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006
#tar zxf vmware-linux-tools.tar.gz
#cd vmware-tools-distrib
#./vmware-install.pl
After this command the setup will start, the setup does a proper job of selecting where to put what. I left everything default (just enter through the questions)
Creating a new installer database using the tar3 format.
Installing the content of the package.
In which directory do you want to install the binary files?
[/usr/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]
What is the directory that contains the init scripts?
[/etc/init.d]
In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
The path "/usr/lib/vmware-tools" does not exist currently. This program is going
to create it, including needed parent directories. Is this what you want?
[yes]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]
Unmounting the Tools ISO image cdrom .
The installation of VMware Tools 3.2.0 build-14497 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
Making sure services for VMware Tools are stopped.
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Trying to find a suitable vmhgfs module for your running kernel.
None of the pre-built vmhgfs modules for VMware Tools is suitable for your
running kernel. Do you want this program to try to build the vmhgfs module for
your system (you need to have a C compiler installed on your system)? [yes]
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.8-2-386/build/include]
Extracting the sources of the vmhgfs module.
Building the vmhgfs module.
Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
make -C /lib/modules/2.6.8-2-386/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernel-headers-2.6.8-2-386'
CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dev.o
CC [M] /tmp/vmware-config0/vmhgfs-only/driver.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/main.o
CC [M] /tmp/vmware-config0/vmhgfs-only/staticEscape.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
Building modules, stage 2.
MODPOST
CC /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
LD [M] /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/kernel-headers-2.6.8-2-386'
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
The module loads perfectly in the running kernel.
No X install found.
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Guest filesystem driver: done
DMA setup: done
Guest operating system daemon: done
The configuration of VMware Tools 3.2.0 build-14497 for Linux for this running
kernel completed successfully.
You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an XFree86 session.
Enjoy,
As you can see, the VMXNet adapter has not been compiled. I asked around on the VMWare forum and found out that the vmware-config-tools.pl for GSX differs from the one provided with ESX (Thanks to Petr from the VMWare forum).
Now shutdown your Debian Box:
#halt
After your debian box has halted, change your NIC hardware to now use the VMXNet adapter.
Now turn on your Debian Box.
After the system has booted, login as root and enter the following command: #vi /usr/bin/vmware-config-tools.pl
Now search for the string “class” and edit the following line: original line = if ($line =~ /class [0-9a-f]{4}: ...../) {
and change it to:
if ($line =~ /[0-9a-f]{4}: ...../) {
Save the file and let the compiling begin!
Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006
Enter the following command:
#./usr/bin/vmware-config-tools.pl
Just enter through the questions…if everything went ok, you’ll see the VMXNet adapter being compiled. Info looks like this: Extracting the sources of the vmxnet module.
Building the vmxnet module.
Do the following checks to insure the proper startup of the vmxnet adapter:
Check in /etc/modules.conf for the following line : # Added by VMware Tools alias eth0 vmxnet
#vi /etc/modutils/aliases
Edit /etc/modutils/aliases an add the following line:
alias eth0 vmxnet
#vi /etc/modules
then edit the /etc/modules and add: vmxnet to the bottom
Now the vmxdriver is loaded but the network is brought up before the vmxdriver has loaded. (so no nic is available until you do a network restart) vmwaretools is called at S06vmware-tools in rc2.d
I made it work like this: #/etc/rc2.d #ln -s /etc/init.d/networking S98networking
This command creates a link to the networking script and makes it run again at the end of the bootcycle. The vmxnet driver is then already loaded and will now be used
Time synchronization To enable proper time synch on your Debian box you enter the following command:
#vi /boot/grub/menu.lst and added the option: clock=pit nosmp noapic nolapic (check VMWare document 1420 for more info about this subject)
You also need to edit the .vmx file (after shutting down you VM)
Edit your .vmx file and edit the following line:
tools.syncTime = FALSE Change FALSE to TRUE!
And now you have successfully installed the GSX VMWare Tools on your Debian box!!
After rebooting you might get a message stating: “vmhgfs module taints kernel” error. I checked the message on the VMWare forum and it looks harmless so just ignore it.
My server now has a smooth power off when I use the VMWare power off script so I can make a good backup whenever I want to.
Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006
VMWare tools, the ESX-way Luckily the procedure for a installation of the tools in a ESX environment is much easier because the install script does a good job of detecting the VMXNet adapter. During installation the kernel-headers package is required. So we start by first asking the system what kernel we are using,then we install the kernel headers for this kernel.
# uname –r
2.6.8-2-386
#apt-get install kernel-headers-2.6.8-2-386
The following extra packages will be installed:
kernel-headers-2.6.8-2 kernel-kbuild-2.6-3
The following NEW packages will be installed:
kernel-headers-2.6.8-2 kernel-headers-2.6.8-2-386 kernel-kbuild-2.6-3
0 upgraded, 3 newly installed, 0 to remove and 8 not upgraded.
Inst kernel-kbuild-2.6-3 (2.6.8-2 Debian:3.1r1/stable)
Inst kernel-headers-2.6.8-2 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Inst kernel-headers-2.6.8-2-386 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Conf kernel-kbuild-2.6-3 (2.6.8-2 Debian:3.1r1/stable)
Conf kernel-headers-2.6.8-2 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Conf kernel-headers-2.6.8-2-386 (2.6.8-16sarge1 Debian:3.1r1/stable, Debian-Security:3.1/stable)
Press Y(es) to continue
Make sure you have met all system requirements because in a minute you won’t have access to the Internet anymore…. Now turn off you Virtual Debian server and change your NIC to use the VMXNet Adapter. Turn on the server and lets install the VMWare Tools!!!
Now on your server Console go to: VM, Install VMWare Tools, Nothing will happen but the Linux VMWare Tools ISO is now mounted on your virtual machine.
Now mount the iso in your Debian box:
#mount /dev/cdrom
To see your mounted drives type:
#mount
My cdrom is mounted as cdrom0 so I type:
#cd /media/cdrom0
Let’s copy the tools to the debian box:
#cp vmware-linux-tools.tar.gz /root/.
#cd /root
Let’s unpack the VMWare tools and start the installation:
#tar zxf vmware-linux-tools.tar.gz
#cd vmware-tools-distrib
#./vmware-install.pl Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006
After this command the setup will start, the setup does a proper job of selecting where to put what. I left everything default (just enter through the questions)
Because I selected the VMX Net adapter, I don’t have a ethernet connection, so I can’t provide the output.
But this is a good thing, because selecting the hardware to use the VMXNet adapter, makes the install script detect the VMXNet adapter and compile the VMXNet driver!!!
After the smoked has cleared. You should have the VMWare tools installed including the VMXNet driver! What remains is the time synch.
To enable time synch on your Debian box you enter the following command:
#vi /boot/grub/menu.lst and added the option: clock=pit nosmp noapic nolapic (check VMWare document 1420 for more info about this subject)
You also need to edit the .vmx file (after shutting down you VM)
Edit your .vmx file and edit the following line:
tools.syncTime = FALSE Change FALSE to TRUE!
And now you have successfully installed the ESX VMWare Tools on your Debian box!!
Good luck and cheers
Aleks
- - - - Installing VMWare Tools on a Linux Debian server without X
Version 2.0 © Aleks Nikolić 2005-2006


blog comments powered by Disqus

Published

2007-02-03

Categories


Tags