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
qcdavid
Contributor
Contributor

Thanks, WoodyZ!

The only problem I had was that I had to modify line 59 in your script:

tar zxpf /media/cdrom/*.tar.gz

to this:

tar zxpf /media/cdrom1/*.tar.gz

Reply
0 Kudos
WoodyZ
Immortal
Immortal

The only problem I had was that I had to modify line 59 in your script:

tar zxpf /media/cdrom/.tar.gz to this: tar zxpf /media/cdrom1/.tar.gz

Questions:

1. Was the Virtual Machine created using a normal install or was the Virtual Machine created using Linux Easy Install?

2. If created using a normal (non - Linux Easy Install) did you add a second CD/DVD manually prior to starting the install of Ubuntu 9.04 Desktop Edition?

=========

Note: I am, as I have time, writing a second version of the script that will have conditional statements and error checking to handle these scenarios however I do have other work to do so I put the first version up as is. Appreciate the feedback so I can modify the script and republish it to account for these issues that I expected to be reported. Thanks.

Reply
0 Kudos
qcdavid
Contributor
Contributor

  1. I'd like to help you but it's been quite a while since I set this up and I just can't remember which installation method I used.

  2. I don't recall ever adding an additional CD/DVD.

Do you know whether there is an installation log that would have this information. If so, I can check that and let you know.

Thanks again.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Don't worry about it however just so you know this first version of the shell script is really intended to be use on a newly created normal install (non - Linux Easy Install) where for the most part the defaults are being taken. I hope to have time this weekend to recode it to allow for other scenarios.

Reply
0 Kudos
maflynn
Enthusiast
Enthusiast

I really didn't pay attention but I thought I selected the simplified install with 9.04 and it seems to work. Of course the vmware tools are not installing and I/we need to wait until we get an update.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

I should have a recoded update later today that will preform conditional execution with error checking and if VMware Tools are already installed it will prompt for automatic removal/reboot or allow you to manually remove/reboot and then you would rerun the shell script.

Reply
0 Kudos
blacksmith_tb
Contributor
Contributor

@WoodyZ: a quick question. I've seen videos posted of people who've gotten unity working with Jaunty in a VM, but I don't seem to be having any luck. Your script ran without error, but it doesn't appear to have made any difference (with regards to unity, that is). Thoughts?

Reply
0 Kudos
WoodyZ
Immortal
Immortal

What version of Fusion are you using?

Did you reboot the Ubuntu 9.04 Desktop Edition Virtual Machine after running the shell script?

Do you have other Virtual Machines that Unity is supported on and do they work under Unity?

Unity is dependent on VMware Tools and I have no problems running Ubuntu 9.04 Desktop Edition in Unity after installing Ubuntu and running my shell script to patch and install VMware Tools. Did you save the output of the shell script and if yes archive it and attach the archived file to your original post using the Edit link.

Reply
0 Kudos
blacksmith_tb
Contributor
Contributor

Fusion 2.0.4 - I didn't save the output, so I re-ran your script, which revealed that I should have removed the existing vmware tools. I did, and ran the script again, and all is well - including unity. Thanks!

Reply
0 Kudos
cradouille
Contributor
Contributor

Hi,

Thank you for this great script ! Smiley Happy (I only modified it to use aptitude instead of apt-get)

Also, why do you install diff-doc ?

See you

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Thank you for this great script ! Smiley Happy

Your Welcome! Smiley Happy I enjoy doing a little coding now an again. I decided to script this because it just gets to be a little ridiculous having to gather up all the information from the various posts and then have to do this manually and while I regularly automate as much as possible that which will be done more then once I have to admit that another reason I wrote this is with Windows 7 RC being released and being a less problematic install then Ubuntu 9.04 I waned to make it easier for a Linux newbie to have an easier time using the latest Ubuntu release and in part may help to continue to chip away at the Goliath that is Microsoft. Don't get me wrong I've made a good living thanks to Microsoft but I don't want them to be the only 800 pound gorilla in the room so to speak. I'm all for boosting the the use of OS X and other products. Smiley Happy

(I only modified it to use aptitude instead of apt-get)

Yes I've read various discussions on aptitude vs apt-get and while there are/maybe pros/cons between them in a case like this I don't think is matters that much but to each their own.

Also, why do you install diff-doc ?

While diff-doc isn't an absolute dependency when installing patch it is suggested that it be installed with patch and will work either way and the only reason I included it is it was suggested.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Fusion 2.0.4 - I didn't save the output, so I re-ran your script, which revealed that I should have removed the existing vmware tools. I did, and ran the script again, and all is well - including unity. Thanks!

Saving the output of processes such as this is always a good thing especially because the output of VMware Tools has some good information plus I pipe a few thing to the Terminal that might be helpful in troubleshooting but also let you know what's going on.

BTW I have updated the shell script to include a preflight conditions check, one of which is for VMware Tools (mainly for the uses that used Linux Easy Install although good if just having to uninstall/reinstall VMware Tools for any reason) and will offer to automatically remove and reboot or give you directions on how to do it manually so you should download the new version of the shell script and get rid of the original one in case you do another Ubuntu 9.04 install or have to uninstall/reinstall VMware Tools for any reason.

Reply
0 Kudos
smaurstad
Contributor
Contributor

Will this work for VMware Workstation in the same way as VMware Fusion?

Best regards!

Reply
0 Kudos
WoodyZ
Immortal
Immortal

Will this work for VMware Workstation in the same way as VMware Fusion?

While I do use VMware Workstation as well as VMware Fusion I have not tested it under Workstation because the version of Workstation I'm using is older and the page.c file does not contain the same source code and I use differ distro of Linux too although under Fusion I do use Ubuntu.

So if the version of Workstation you're using contains the same version of VMware Tools as what is in Fusion 2.0.4 (and 2.0.2 or 2.03) then I would assume the page.c file needs to be patched however because I haven't take the time to review the source code in to page.c file in the most current release of Workstation I cannot say 100% however it would still run and still provide the update for the mouse and patch the /etc/fstab file and offer the ease of taking care of those issue, The bottom line is if you ran it it would not hurt because if the patch doesn't need to be made it would be rejected and continue forward in the execution of the shell script.

So since it couldn't hurt I'd give it a try. Also if I get the time, although this week is probably out of the question, I'll look at the VMware Tools in the latest release of Workstation although if anyone that is using the latest release of Workstation and would like to manually extract the page.c file and check the source code and let me know that would be nice as I just don't have the time right now to do it myself.

Also keep in mind this shell scrip is just meant to be a stop gap until VMware officially supports Ubuntu 9.04 at which point this should not be necessary however I am writing a second shell script based off of this one to act as a wrapper around installing/uninstalling VMware Tools and patching the /etc/fstab if VMware doesn't fix the VMware Tools install to properly modify the /etc/fstab file during the install of VMware Tools and that will be handy just because it will make it easier then having to do the process manually.

Reply
0 Kudos
smaurstad
Contributor
Contributor

Hi!

Thanks for swift reply!

Great having your help (all though I hope this will be easier in future since Ubuntu is becoming

a major OS releasefor users and developers).

Your script worked for me, and I run VMware workstation v6.5.2 build-156735

A minor glitch after I typed in my password (which it didn't hide) where it tried to use it as a variable in a path.

If you like, I could email you the output. Where would I find the file you're asking for?

Thanks alot, and keep it up!

Best regards:

Stian M

Reply
0 Kudos
WoodyZ
Immortal
Immortal

A minor glitch after I typed in my password (which it didn't hide) where it tried to use it as a variable in a path. If you like, I could email you the output. Where would I find the file you're asking for?

If you would archive it and attach it here that would be fine.

Also if you would run the attached shell script in Ubuntu and it will extract the target page.c from VMware Tools and place it on the Desktop zipped up and you could attach that too.

Note: You need to click Install VMware Tools again but not to worry it doesn't install them again, just follow the prompts in the script.

Thanks,

Woody

Reply
0 Kudos
fwRoller
Contributor
Contributor

Thanks WoodyZ!

Although your efforts are greatly appreciated, it would be nice to see VMware increase the automation of VMware Tools installation in Ubuntu, especially since it's such a popular Linux distribution. Providing prompt updates every six months to support each new Ubuntu version would also be welcomed.

Thanks again, and please continue to contribute to the community.

Reply
0 Kudos
ChipMcK
Hot Shot
Hot Shot

I have made some mistake, but I know not what.

I ran the file from '.flp' - floppy image.

Attached (I hope) is zip of copy-paste-to-txt of the install.

Reply
0 Kudos
WoodyZ
Immortal
Immortal

I just ran the shell script on a fresh clean install of Ubuntu 9.04 x64 and then diffed the output from mine and yours and cannot explain why your's failed and mine do not fail.

I do not know if this makes any difference but on yours in the output it shows "(Reading database ... 101421 files and directories currently installed.) and that a higher count then my clean install and from this in your output "0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded." that tell me that you probably have already run Update Manager prior to running the shell script and if you will confirm that I will try that scenario and see what happens. Aside from that and with the exception of things that should be different in the output from one user to another, like user names, computer names date/time stamps, then except for the HGFS message "Mounting HGFS shares: failed" and subsequent unmounting/mounting error all else was identical.

Other then that the only suggestion I can make at this moment is to run the shell script again which will uninstall VMware Tools, reboot, run the scrip again and see if HGFS fails again.

Reply
0 Kudos