Installing VMWare on Gentoo
This article covers how to install VMWare on Gento Linux if you are getting errors like the "/etc/init.d/vmware: line 919: [: -: integer expression expected"
error when trying to configure the VMWare options.
VMWare is a company specializing in virtualization products which allows guest “virtual machines” to run inside a host operating system. They have a number of products including the free VMWare Player and VMWare Server applications, and paid for applications such as VMWare Workstation.
I have been using VMWare Workstation since 2003 to run Microsoft Windows XP inside my Linux host computer so I can continue to run applications such as Adobe Photoshop and test websites with Internet Explorer and Mozilla Firefox on a native Windows platform. It’s also extremely useful for testing out Linux distributions without having a dedicated computer to install them onto.
I returned to using Windows in 2008 but continued to use VMWare for testing IE and running my development Linux web server; from 2010 I switched to OSX and continue to virtualize Windows for testing web applications on Internet Explorer.
This article covers how to install VMWare on Gento Linux if you are getting errors like the "/etc/init.d/vmware: line 919: [: -: integer expression expected"
error when trying to configure the VMWare options.
VMWare Fusion on Mac OSX allows you to shrink virtual disks easily for Windows virtual machines right from the graphical interface (Virtual Machine -> Settings -> General -> Clean Up Virtual Machine) but there isn’t the same option to do this with Linux, so you need to do it from the command line.
I recently replaced my Windows Vista desktop/host machine with Windows 7 Release Candidate and switched from VMWare Server version 1 to VMWare Server version 2. Version 2 uses a web based management interface and each virtual machine can be accessed in a separate remote console.
I needed to connect a USB printer to one of the virtual machines and was surprised to not see any USB devices shown in the “Devices” drop down box in the remote console. This is shown in the first screenshot below where you can see the virtual CD/DVD devices and network adapter but no USB devices:
For some reason these don’t show up under the devices drop down box so you have to go into the web management console and connect the USB device there. This is shown in the screenshot below where the red arrow (added for the screenshot) shows the USB device drop down box.
Click the USB button and it shows the devices that can be connected. This isn’t the most convenient way of connecting a USB device (it would be easier if the USB devices were shown in the device drop down in the remote console) but at least it can be done.
I use VMWare Server on several different computers to run virtualized Linux webservers for developing websites and for testing various versions of Internet Explorer. I recently needed to reduce the size of a Linux virtual disk to fit it onto a USB stick to copy to another machine but simply deleting files does not reduce the size of the disk image. This post links to another article offsite which shows how to do this and adds a couple of notes about it.
I’ve just set up a new VMWare virtual machine with Kubuntu 8.04 and the scroll wheel on my mouse didn’t work. The steps to correct this are pretty simple and are covered in this post. This should work for any Ubuntu/Kubuntu variant when running in VMWare.
In a terminal session open the /etc/X11/xorg.conf file. The following command illustrates doing this with the “nano” text editor:
sudo nano /etc/X11/xorg.conf
Locate the section labelled “InputDevice” which, by default, should look like this:
Section "InputDevice" Identifier "Configured Mouse" Driver "vmmouse" Option "CorePointer" Option "Device""/dev/input/mice" EndSection
Add the following to it:
Option"Protocol""ImPS/2" Option"Buttons""5" Option"ZAxisMapping""4 5"
so it now looks like this:
Section "InputDevice" Identifier "Configured Mouse" Driver "vmmouse" Option "CorePointer" Option "Device""/dev/input/mice" Option"Protocol""ImPS/2" Option"Buttons""5" Option"ZAxisMapping""4 5" EndSection
Then save the file, save any stuff in the applications you have open and log out. From the Kubuntu login screen, either do Ctrl+Alt+Backspace to restart the X Server and for the settings to apply, or click the little menu button and select the “Restart X Server” option as shown in the screenshot below. The menu option you need to click has a black arrow pointing at it in the screenshot below.
After the X Server has restarted, the login screen will appear again so log in and the scroll wheel on your mouse should now work.
VMWare Server 1.0 doesn’t support the same set of features as the more recent versions of VMWare Workstation and VMWare Player, so you may not be able to open virtual machines created with more advanced features. However by simply modifying the configuration file you may be able to start up the virtual machine anyway, as …