VMware Server Installation on Linux Hypervisor (Free Version) Choosing a Linux Distribution for the HOST (Hypervisor) Choose and install a Linux server distribution. I recommend using Debian Linux as it is a very clean and stable distribution which many other distributions are built on. If you learn how to configure a Debian system, you are learning how to configure Ubuntu, Knoppix, and Mepis among others. http://www.debian.org/misc/children-distros Using the recent Dell workstation equipment, I had to use Ubuntu as the stable version of Debian does not currently support the onboard NICs (Intel PCIe). Ubuntu is a very cutting edge distribution which is a modification of Debian and should be choosen if your hardware is very current. -------------------------------------------------------------------------------- Installing and Using Debian based Distributions The installation of Debian or Ubuntu should be straitforward, download the server CDROM, burn the ISO, boot to the CDR and install. If you have a dual or quad core machine, Ubuntu will automatically install the SMP kernel, Debian will not. If you don't feel comfortable changing kernels after a Linux distribution is installed, go ahead and choose Ubuntu regardless of your hardware's maturity. Synax Note: In the following commands, sudo is used each time to proceed a command that requires root privledges. If you want to change accounts to the root account and omit the sudo prefix each time you need to su root; in Ubuntu, type the following command: $ sudo su - When you see a command that has the $ prompt, this means non-privledged user, when you see the # prompt, this means privledged user, or root. Therefore you will usually see $ and sudo together for privledged commands and will not see the sudo command when a # prompt is used. # id uid=0(root) gid=0(root) groups=0(root) $ id uid=1000(user) gid=1000(user) Once you have your Debian based distirubion installed, you use "apt-get" to install packages. This is like Red Hat's RPM package manager. To install a package after the installation, first you need to update the apt database: $ sudo apt-get update This command uses /etc/apt/sources.list to find your package sources (CDROM) if inside the ISA firewall. This file should not require any modifications unless you understand why you are changing it. To install a package using apt-get, type the following as root (in this example, we are installing nmap): $ sudo apt-get install nmap # this is a random example -------------------------------------------------------------------------------- Installing VMware Server Before performing the following steps, please read and ensure that the VMware Prerequisite have been fulfilled. Download the free version of VMware server from vmware.com. Register your name and email address in order to receive the necessary registration keys (these keys are free but required). Copy the VMware server download to the Linux server. This can be done by burning the downloaded files to a CDROM and copying from a CDROM. Below are the commands to mount the CDROM device, copy the files, uncompress the files and install the VMware server files: $ sudo mount /cdrom $ sudo cp /cdrom/vmware-server-1.x.tgz /tmp $ sudo tar xvfz /tmp/vmware-server-1.x.tgz $ sudo cd /tmp/vmware-server-distrib/ $ sudo ./vmware-install.pl To configure VMware Server $ sudo vmware-config.pl You can configure the VMX guest OS files to be located anywhere you want. This decision will be based on how you formated your drive partitions. A good location is /home/vmware/vmx. The VMware configuration will create this location if it does not already exist. All VMX files need the executable bit configured: $ cd /home/vmware/vmx $ sudo chmod -R 755 *.vmx Important Note on Ubuntu VMware server does not work well if you choose the guest OS to have multiple processors. Choose to only use one. The VMware hypervisor will still use both cores while running the SMP kernel for execution of the VMware processes so you will still be getting the benefits of your dual or quad core architecture. Misc Notes cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1 cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0 -------------------------------------------------------------------------------- VMware Prerequisites (for an Ubuntu Distribution base install) sudo apt-get install gcc g++ make sudo apt-get install build-essential sudo apt-get install linux-headers-`uname -r` sudo apt-get install xinetd sudo apt-get install libx11-6 libxtst6 libxt6 libxrender1 --install vmware-- -------------------------------------------------------------------------------- VMware Management User Interface (MUI) (for an Ubuntu base install): VMware MUI Prerequisites $ sudo apt-get install xfsprogs libxi6 #--> ubuntu: worked for mui $ sudo ln -s -f /bin/bash /bin/sh #--> ubuntu: worked for mui (httpdx failed) VMware MUI Installation $ cp /cdrom/vmware-mui-x.x.tgz /tmp $ tar xvfz vmware-mui-x.x.tgz $ cd /tmp/vmware-mui-distrib $ sudo vmware-install.pl $ sudo vmware-config-mui.pl HTTP Connection to VMware Server MUI https://vmware.local.lan:8333/ -------------------------------------------------------------------------------- To install an FTP Server: $ sudo apt-get install vsftpd $ sudo nano /etc/vsftpd.conf anonymous_enable=NO local_enable=YES write_enable=YES $ sudo /etc/init.d/vsftpd restart -------------------------------------------------------------------------------- If you are running the AMD64 distribution port: apt-get install ia32-libs Debian Etch AMD64 Base Install packages: build-essential, linux-headers-`uname -r`, x-window-system-core, x-window-system, libx11-6, libxtst6, libx11-dev, xspecs, psmisc apt-get upgrade apt-get ia32-libs --install VMware Server-- -------------------------------------------------------------------------------- Misc Notes: Links: http://howtoforge.com/debian_etch_vmware_server_howto http://users.piuha.net/martti/comp/ubuntu/en/server.html http://www.linuxscrew.com/2007/08/21/vmware-server-ubuntu-feisty-fawn-704-linux/ Ubuntu Notes: sudo apt-get install ubuntu-desktop Install VMware Package (requires internet access): sudo apt-get install vmware-server vmware-tools-kernel-modules -------------------------------------------------------------------------------- Ubuntu SMP Notes: WMWare does not really work out of the box on Ubuntu. There is an issue concerning the ACPI, which makes the guest machine so slow that it is barely usable. If you do on your terminal: cat /sys/module/processor/parameters/max_cstate To have it set on boot, edit the /etc/init.d/acpid file. Add this line at the end of the function named load_modules(): echo 3 > /sys/module/processor/parameters/max_cstate -or- echo 1 > /sys/module/processor/parameters/max_cstate /etc/init.d/vmware restart -------------------------------------------------------------------------------- VMware Server and Guest Clock When you start a virtual machine, check if the clock is running too fast or too slow. My clock was running too fast. That's because VmWare-Server is not set to the correct speed of your CPU. I did so manually by adding to the /etc/vmware/config the following lines: host.cpukHz = 1830000 host.cpukHz = 2000000 hostinfo.noTSC = TRUE tools.syncTime = TRUE Try to set this value slighty above your real CPU frequency. For example instead of 2000000 try 2001000! -------------------------------------------------------------------------------- Ubuntu and VMware MUI If you receive a "starting httpd.vmware:-ne failed" error at the end of running vmware-config-mui.pl you will need to run the following command: sudo ln -s -f /bin/bash /bin/sh sudo vmware-config-mui.pl MUI: sudo apt-get install xfsprogs --> ubuntu: not sure sudo apt-get install libxi6 --> ubuntu: worked for mui ln -s -f /bin/bash /bin/sh --> ubuntu: worked for mui (httpdx failed) vmware-config-mui.pl starting httpd.vmware:-ne failed Ubuntu Packages (MUI): libxi6 I received the following error: "VMware Server must be installed on this machine for the VMware Management Interface to work Execution aborted." Type this "vmware -v" to see what lib is missing. The following solved that problem: sudo apt-get install libXi6 Then I had problems installing vmware-mui. It would not recognise the libdb.so.3. The following solved that: sudo apt-get install libdb2 sudo ln -s /usr/lib/libdb-4.3.so /usr/lib/libdb.so.3 sudo ln -s -f /bin/bash /bin/sh http://users.piuha.net/martti/comp/ubuntu/server.html The VMware Management Interface's startup scripts (/etc/init.d/httpd.vmware and /usr/lib/vmware-mui/src/lib/httpd.vmware) have a bug which makes the Apache server start fail after reboot. To fix the script apply the following patch: # cd /tmp ## two links, one may not work: # wget http://users.piuha.net/martti/comp/ubuntu/httpd.vmware.diff # wget http://www.iki.fi/kuparine/comp/ubuntu/en/httpd.vmware.diff # cd / # patch -b -p0 < /tmp/httpd.vmware.diff -------------------------------------------------------------------------------- Ubuntu VMware Checklist sudo apt-get install gcc g++ make sudo apt-get install build-essential sudo apt-get install linux-headers-`uname -r` sudo apt-get install xinetd sudo apt-get install libx11-6 libxtst6 libxt6 libxrender1 other people: libdb3 --install vmware-- sudo vmware-config.pl mui: sudo apt-get install xfsprogs libxi6 --install mui-- vmware-config-mui.pl ftp: sudo apt-get install vsftpd nano /etc/vsftpd.conf anonymous_enable=NO local_enable=YES write_enable=YES sudo /etc/init.d/vsftpd restart chmod 755 *.vmx -------------------------------------------------------------------------------- Ubuntu VMware Packages Needed: o The process exited with an error: /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries:\ libXtst.so.6: cannot open shared object file: No such file or directory /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory o Unable to view the virtual machine's screen: You need execute access in order to connect with the VMware Server Console. Access denied for config file: /home/vmware/vmx/dc1/win2k3sp1e.vmx --> chmod 755 *.vmx Ubuntu Packages (VMware Server): file --> package libX11.so.6 --> libx11-6 libXtst.so.6 --> libxtst6 libXt.so.6 --> libxt6 libXrender.so.1 --> libxrender1 apt-get install libx11-6 libxtst6 libxt6 libxrender1 Starting httpd.vmware:-ne failed After a fresh ubuntu 6.06 server install, I had to install the following libraries: $ sudo apt-get install libx11-6 libxtst6 libXt6 libXrender1 libXi6 $ sudo apt-get install libstdc++5 libssl0.9.7 libcrypto++5.2c2a So I basically ran ldd on every bin starting with vm. :) -------------------------------------------------------------------------------- USB devices not working, eh? Here the fix by having these lines uncommented: gksudo gedit /etc/init.d/mountdevsubfs.sh mkdir -p /dev/bus/usb/.usbfs domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644 ln -s .usbfs/devices /dev/bus/usb/devices mount --rbind /dev/bus/usb /proc/bus/usb Uncomment no. 42-45 lines starting with #mkdir -p /dev/bus/usb/.usbfs and then reboot. That should do it, if not get back here with us. -------------------------------------------------------------------------------- VMware on Debian (etch): apt-get update apt-get install libx11-6 libx11-dev libxtst6 xinetd wget apt-get install linux-headers-`uname -r` build-essential apt-get install binutils-doc make manpages-dev autoconf automake1.9 apt-get install libtool flex bison gdb libc6-dev-amd64 lib64gcc1 gcc-2.95-doc apt-get install gcc g++ -or- apt-get install linux-headers-`uname -r` libx11-6 libx11-dev apt-get install x-window-system-core x-window-system xspecs libxtst6 apt-get install psmisc build-essential Automatic start vmware at start update-rc.d vmware defaults 20 if you have a hard time loading your iso, and vmware giving lots of useless errors: in the directory /usr/lib/vmware/lib/libgcc_s.so.1/ remove the libgcc_s.so.1 /usr/lib/vmware/lib/libpng12.so.0/ remove the libpng12.so.0 sudo ln -s /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 sudo ln -s /libpng12.so.0 /usr/lib/vmware/lib/libpng12.s.so.0 I'd like to add that with my install of etch I had to additionally install the package 'psmisc' because I didn't have killall for some reason. I ran this to install all the packages I needed to get everything (including the MUI) installed: apt-get install x11-common libxtst6 libxi6 libxext6 lvm2 xfsprogs libx11-6 libxt6 libxrender1 -------------------------------------------------------------------------------- VMware on Ubuntu Desktop https://help.ubuntu.com/community/VMware/Workstation http://ubuntuforums.org/showthread.php?t=826624 http://ubuntuforums.org/showthread.php?t=779934 The any-any update is no longer required with VMWare Server 1.0.6