VMware Communities
WoodyZ
Immortal
Immortal

Installing Ubuntu 9.04 Desktop Edition with full support of VMware Tools - Simplified!

At the present time Ubuntu 9.04 is not a supported OS with VMware products however it certainly can be installed and with a few tweaks even VMware Tools will work normally.

The purpose of this discussion thread is to provide a shell script to facilitate the necessary patching of and then installing VMware Tools along with some other modifications that need to be made in order to have a complete and successful install. I wrote this shell script to bring together all the bits and pieces of information that have already been placed out into the community by others and a referencing credit section is included below.

Note: This shell script was originally intended only to be used on a normal manual install (non Linux Easy Install) of Ubuntu 9.04 Desktop Edition in VMware Fusion 2.0.2, 2.0.3 or 2.0.4 however I have now modified the original shell script to handle being used in either type of install. If you did use Linux Easy Install then VMware Tools must be uninstalled first and this shell script will detect that and offer to automatically remove and reboot or give you directions on how to do it manually. The new version of the shell script does a preflight conditions check and employs the necessary error handling which means basically you just execute the shell scrip by double-clicking it and select Run in Terminal and it will tell you if something isn't ready to go. Smiley Happy

This shell script, "Patch_and_Install_VMware_Tools_for_Ubuntu_9_04.sh", brings together the necessary steps to patch and install VMware Tools to have full functionality and make additional changes to easily resolve other issues so after the install of Ubuntu 9.04 Desktop Edition and running this script you’ll be set and ready to go without having to gather up all the information that has been spread about and make the necessary changes one at a time as you find all the various resolutions to the issues at hand which are issues with the Mouse, patching the VMware Tools Install to enable VMware Shared Folders and editing the /etc/fstab file to enable access to the VMware Shared Folders HGFS Shares.

The attached zip archive "Patch_and_Install_VMware_Tools_for_Ubuntu_9_04.zip" contains a Read Me First.txt file and three additional files which contain the shell script packaged three different ways for ones choice of placing it on the Ubuntu 9.04 Desktop Edition's User's Desktop to be able to run the shell script. You can download this directly to the Ubuntu Desktop and use the enclosed "Patch_and_Install_VMware_Tools_for_Ubuntu_9_04.sh.zip" file and extract and run the shell script or you can download it to the Mac Desktop and use the ISO Image or Floppy Disk Image to enable access to the shell script from the Ubuntu 9.04 Desktop Edition's Desktop. It shouldn't be needed to say however I'll say it anyway, read the Read Me First.txt file.

======================

How to use the Shell Script

1. Install Ubuntu 9.04 Desktop Edition in VMware Fusion 2.0.2, 2.0.3 or 2.0.4

2. After the install and upon reboot to the Desktop mount the VMware Tools linux.iso file by clicking Install VMware Tools on the Virtual Machine menu and then close the cdrom0 - File Browser windows that opens on the Desktop as the rest is then handled by my shell script.

3. Double-click the Patch_and_Install_VMware_Tools_for_Ubuntu_9_04.sh shell script and select Run in Terminal and follow the prompts in the shell script as you normally would.

Note: When the shell script is double-clicked if for some reason it just opens in Text Editor then just close it and set the executable permission via a right-click > Properties > Permissions tab > and then check the Execute: Allow executing file as program check box then click the Close button.

4. With the exception of typing your password when prompted and selecting the Screen Resolution and or which uninstall type (automatic or manual) the remaining prompts can be responded to by pressing the Enter key thus accepting the default answer to these prompts. Once the shell script is finished the Terminal window will remain open for you to copy and paste the output to a text file for later review and reference after you reboot the Virtual Machine when done running the script enabling changes to take place.

Note: Once you have copied and pasted the output to Text Editor and have saved it you can press Enter for it to automatically reboot or you can just close the Terminal window and manually restart Ubuntu 9.04 Desktop Edition.

======================

For those not familiar with installing VMware Tools in a Linux Virtual Machine from the Command Line with the Tar Installer understand that it can appear that nothing is happening after you’ve responded to various prompts however be patient as things are happening and the next prompt will appear shortly. You will also notice activity on the hard drive icon on the Status Bar to show that things are moving along between those prompts that don’t return immediately once having pressed Enter.

The entire process of using this shell script only takes around five minutes or a bit longer if you’re a slow reader.

=================

Referencing Credits

Information regarding accessing the HGFS Shared Folders issue under Linux came from 's . Note that this is not because Ubuntu 9.04 isn't officially supported at this time but with Fusion and Linux Virtual Machines in general. I consider this a bug in the VMware Tools Installer under Linux in that it doesn't properly modify the fstab file to begin with.

Information regarding getting HGFS to work by patching the page.c source file in VMware Tools came from a link in a post by , . This issue would be due to Ubuntu 9.04 being official supported at this time.

Information regarding the Mouse issue came from reading 's post, . This issue would be due to Ubuntu 9.04 being official supported at this time.

=================

My shell script address these issues and while it may be able to be used on Ubuntu 9.0.4 Desktop Edition running under other VMware products note that I have only tested it under Ubuntu 9.04 Desktop Edition ( both x86 and x64) running under VMware Fusion 2.0.4 and have verified by diffing the target in the VMware Tools included in Fusion 2.0.2 and 2.0.3. The contents of the page.c file in the VMware Tools in Fusion 2.0.0 and 2.0.1 did not have the target line and therefore those versions are not supported by my shell script. That said, I make no assumptions for use with any other VMware product because I just do not have the time to test/verify on other products.

Message was edited by: WoodyZ - Updated Shell Script and Original Discussion Thread Content.

Reply
0 Kudos
52 Replies
tregnabm
Contributor
Contributor

This was a great service, thank you for taking the time to make this easy

-Michael

Reply
0 Kudos
wondertrout
Contributor
Contributor

I have spent many, many hours trying to get this to work manually. I just came across this posting and it just worked. THANK YOU!!!

Reply
0 Kudos
SteinMaster
Contributor
Contributor

I am having difficulty running the script. When I double click on the unzipped script file, it opens in a text editor. I changed the zip file permissions as instructed and it did not work. When I double click on it, it opens in a text edit window. I do not see where I select a run command in terminal. Terminal is not even opened. I am a newbie to Linux so I am basically lost.

Reply
0 Kudos
TShepstone
Contributor
Contributor

I was able to run the shell script by copying it into a terminal window, but it keeps telling me the "The VMware Tools installation disc is not mounted when it is mounted. I can see it on the desktop but the script doesn't recognize it.

Finding a way to get these tools installed has proven to be one of the biggest challenges of my career! Every solution suggested on the web seems to come to a dead end. I had high hopes for yours but here I am again, with no effective knowledge of unix or linux, hopelessly lost and trying to understand why this is happening. Please help!!

P.S. I have installed Ubuntu 9.04 in my Virtual Library on a MacBook Pro. Windows was so easy but linux is a nightmare!

Reply
0 Kudos
smaurstad
Contributor
Contributor

I wish and thought VMware would give Ubuntu more respect and attention and solve this issue in a more profesional manner.

It should have "just worked" by a default install and there would have been nice to have vmware upgrades as different major OS'es get's released.

So, please take this a bit more serious in future.

Thanks with the effort with the script anyway, but still!

Best regards: Stian

Reply
0 Kudos
Yang_Guizi
Contributor
Contributor

I ran WoodyZ's script to install VMware Tools for Ubuntu 9.04, because Fusion 2.0.4 did not support Ubuntu 9.04.

Then VMware released Fusion 2.0.5, which does support Ubuntu 9.04. I was unable to install VMware Tools on my VM under Fusion 2.0.5. The installation process kept saying it could not find the uninstall script, and then terminating.

Luckily, I had taken a manual snapshot of my VM before running WoodyZ's script and had not installed any Ubuntu software in the VM after running that script. So I was able to revert to the old snapshot, update to Fusion 2.0.5, and then install VMware Tools.

TShepstone, if you have such an old snapshot, I suggest you do the same.

Reply
0 Kudos
CaptainHaddock
Contributor
Contributor

I used your script fine which worked fine (vs. errors I had seen with other versions), but I have still not been able to get a finer screen resolution I desire despite selecting a finer resolution during vmware-config-tools.pl prompting. I selected the 1400x1050 option and I see that associated values in my xorg.conf. I restarted my guest, but from the "Display Preferences" I do not see the 1400x1050 resolution as an option (instead I see 1180x885 as the finest resoltion and "Unknown" as the monitor).

Below is the generated xorg.conf contents (less header).

Can you think what I'm missing .. do I need some setting on the VMware side of things (e.g. http://communities.vmware.com/thread/167759 .. although I am using ESX 4) .. I don't have rights to change the .vmx file so I have not tried that yet.

I do note that when I select System -> Preferences -> Display it shows the display as unknown .. should it have shown something else given the xorg.conf below (yes sorry VMware/Ubuntu newbie .. just trying to get off Windows!!!!).

Section "Device"

Identifier "VMware SVGA"

Driver "vmware"

EndSection

Section "Screen"

Identifier "Default Screen"

Device "VMware SVGA"

Monitor "vmware"

  1. Don't specify DefaultColorDepth unless you know what you're

  1. doing. It will override the driver's preferences which can

  1. cause the X server not to run if the host doesn't support the

  1. depth.

Subsection "Display"

  1. VGA mode: better left untouched

Depth 4

Modes "640x480"

ViewPort 0 0

EndSubsection

Subsection "Display"

Depth 8

Modes "1400x1050"

ViewPort 0 0

EndSubsection

Subsection "Display"

Depth 15

Modes "1400x1050"

ViewPort 0 0

EndSubsection

Subsection "Display"

Depth 16

Modes "1400x1050"

ViewPort 0 0

EndSubsection

Subsection "Display"

Depth 24

Modes "1400x1050"

ViewPort 0 0

EndSubsection

EndSection

Section "InputDevice"

Driver "vmmouse"

Identifier "VMware Mouse"

Option "Buttons" "5"

Option "Device" "/dev/input/mice"

Option "Protocol" "IMPS/2"

Option "ZAxisMapping" "4 5"

Option "Emulate3Buttons" "true"

EndSection

Section "Monitor"

Identifier "vmware"

VendorName "VMware, Inc"

HorizSync 1-10000

VertRefresh 1-10000

EndSection

Reply
0 Kudos
Vinkaw
Contributor
Contributor

When I click the Install Vmware tools, I get the following error on the guest ubuntu machine,

Cannot mount volume.

The volume 'CDROM' is not supported by your system.

I am new to VMware and linux systems, and dont know workaround for this.

And then I get the following error when I run the script.

The VMware Tools Disc is not mounted.

Can WoodyZ or someone help me solve this please?

Regards,

Vink

Reply
0 Kudos
WoodyZ
Immortal
Immortal

If you are using VMware Fusion 2.0.5 then you do not need to use this script because it is my understanding the Ubuntu 9.04 is supported in 2.0.5.

So do a Linux Easy Install using Fusion 2.0.5 and Ubuntu 9.04.

Reply
0 Kudos
IzeHouze
Contributor
Contributor

I know it is brand new and steaming still off of the presses, but have you tried anything yet with 9.10? Even with your scripts compiling fails on vmhgfs, vmxnet, vmxnet3, vmblock...

Oh, this is for VMware ESXi 4.0.0 server

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Ubuntu 9.10 is still in beta and wouldn't be supported anyway. Also the script that I wrote was really specifically meant to be used with Fusion 2.0.4 and Ubuntu 9.04 as it was not tested with nor really written for use with any other VMware product. in other words it was strictly meant to be a stopgap for Fusion 2.0.4 users to install Ubuntu 9.04 as it was not supported at that time.

Reply
0 Kudos
IzeHouze
Contributor
Contributor

Had to ask. Smiley Happy

Reply
0 Kudos
UscAshish
Contributor
Contributor

Success!!! (though like WoodyZ said... still untested so try not to use these steps or the beta release in a production system)

Got this to work on a 9.10 Desktop beta VM running on Fusion 2.06

Post install I ran the following. Not sure if I needed Steps 2-4 but it took all of 15sec and doesn't seem to have any adverse effects.

1. firefox apt://build-essential

2. sudo /etc/init.d/gdm stop

3. sudo Xorg -configure

4. Moved the created xorg.conf to /etc/X11/xorg.conf

5. Reboot

6. Downloaded and ran this script

btw root partition was ext4 formatted.

Reply
0 Kudos