Monday, May 11, 2009

Installing 64-bit VMware Workstation 6.5.2 on 64-bit Ubuntu 9.04

In 2008, I had gone through quite an ordeal to install VMware 6 on 64-bit Ubuntu. What a difference a year makes! By now, VMware was now up to 6.5.2, and Ubuntu was up to 9.04. Also, I had a much better idea of what I was doing. The installation was vastly easier as a result. After installing and configuring Ubuntu, I downloaded the latest version of 64-bit Workstation in .bundle form, copied it to /home/ray (where "ray" was my username), and installed by navigating to that location in Terminal and typing "sudo sh [filename].bundle." In this case, the filename was VMware-Workstation-6.5.2-156735.x86_64.bundle. (To uninstall, go to /home/[username] and type "sudo ./[filename].bundle -uninstall." Stop after the uninstallation portion of the program sequence.) I skipped the "Path to Eclipse directory" option. The installer ran. I got "Installation was successful." To configure Workstation, I typed "sudo /usr/bin/vmware." This opened Workstation as root administrator. I was then able to set Edit > Preferences. The next step was to set up virtual machines (VMs). I had two sources of VMs. First, I had a Windows XP installation that I wanted to convert to a VM. I had been using this installation every day for several weeks and had installed a bunch of software on it. Also, I had been having some weird freezes in Adobe Acrobat, and I wanted to see whether these were caused by the hardware on that particular computer. I figured that if I didn't get the crashes when I ran Acrobat on virtual hardware in a VM, then the physical hardware probably was the culprit. Second, I had some preexisting VMs that I had been using on my previous VMware installation. They had worked reliably, and they were also quite a bit smaller (and would therefore load and back up faster) than the 35GB I had allocated for this latest installation. So, first, to convert that WinXP installation, I booted into Windows, and downloaded, installed, and ran the latest version of VMware Converter. (At this point, that version was 4.0.0.) In this version, I clicked on "Convert Machine" to run it. The first time through, I then ran "Configure Machine" to make it bootable; but I don't believe I did run it when I tried again a second time. In both instances, I indicated that I was talking about VMware Workstation, not a VMware Infrastructure VM. In case it is indeed necessary to run the Configure Machine process, here are the steps in that processs. Configure Machine brought me a message that I needed Sysprep files. These came in different versions, depending on whether the computer had been updated for XP Service Pack (SP) 2 or SP3. (They were supposedly also available on the CD at \Support\Tools\ If you use the CD, remove it before proceeding with the following steps.) I had installed SP3, so I used the instructions for that service pack. For my purposes, the steps to install the Sysprep files were as follows:

(1) Save a copy of on the hard drive, so I wouldn't have to look for it if I didn't like my first VM and needed to recreate it. (2) Double-click on to open it up. (A .cab is a "cabinet," i.e., storage, file.) (3) Copy its files named sysprep.exe and setupcl.exe to a folder named C:\Sysprep. (4) In C:\Sysprep, double-click on sysprep.exe. Select "Don't reset grace period for activation" and set Shutdown mode to "Shut down." Then click Reseal. This should give you a "Sysprep is working" message. It didn't work right for me the first time, but after rebooting it did its deed in just a few seconds.
On the second run-through, I rebooted into Ubuntu, then continued with the following steps. I started Nautilus as root (i.e., "sudo nautilus") and changed the permissions (right-click > Properties) of the /home/ray/.vmware folder so that the user named ray (as distinct from root) had permission to create and delete files in that folder. Then I started the VM, but I got "Error: Cannot open file '/home/ray/.vmware/preferences': Permission denied. Unable to read user preferences." Fortunately, time heals all wounds. When I came back to the installation process at this point, a couple of weeks had gone by and I really had no idea what I was doing previously, but I could see that problem just described seemed to have gone away. So if this happens to you, the recommended solution would be to put your computer in a closet and go on vacation. When I got back to it, I had a new problem. The problem was that my CNN news report videos weren't playing. For this, the recommended solution was to install 64-bit Adobe Flash Player. I followed the instructions to download that. It was a tar.gz file, and this time, instead of using the "tar -zxf filename.tar.gz" command that I had used previously, I tried right-clicking and selecting "Open with Archive Manager." (Not sure if that option had existed in prevous versions of Ubuntu.) This showed me a file called I right-clicked and extracted it to the desktop. I used Synaptic to completely uninstall nsplugin. In File Browser (Nautilus), I enabled "Show hidden files" and moved to the .mozilla/plugins folder in my Home directory. That worked for many people, but not for me. I tried again as root (i.e., type "sudo" at the Terminal prompt before any other command -- in this case, "nautilus") and moved it instead to /usr/lib/mozilla/plugins, as one commenter on that instruction webpage suggested. I also tried "sudo killall firefox." Still no luck.
Here, for posterity, were a couple of random notes that I made while I was attempting this installation:
As root, set VM > Settings. As root, in the VMs, type "/dev/audio" in place of "Auto Detect" in VM > Settings > Hardware > Sound Card.
To install VMware Tools in a VM, first use VM > Install VMware Tools. Then, in Windows Explorer, go to drive D and run Setup. May have to insert WinXP CD in the physical CD drive during this process. Better if you've copied the WinXP CD's i386 folder to the VM previously; can just point there for some installation files.
At about this point, I gave up on trying to get VMware to work on that machine. I turned instead to the machine where I had been running Ubuntu 8.04 with VMware Workstation for the past year. I did an upgrade installation of Ubuntu 9.04 on that machine and installed Workstation 6.5.2 there. I used pretty much the approach described above. The upgrade type of installation seemed to save a lot of steps, though; I went right into using Workstation without much delay at all.
I did continue to have a problem, in the new setup, that I had had on that same machine in Ubuntu 8.04. The problem was that if I ran more than one VM at a time, the whole computer would crash when I tried to suspend or close on of them. On the new installation, I didn't get crashes, but VMware became nonworking all the same. I would just get a mostly blank white screen. I couldn't figure out a solution, so I posted a question on this problem.
While I was waiting for someone to suggest an answer, it occurred to me that maybe I could open a separate session of VMware Workstation for each of my VMs. In early testing, at this point, it appears that having eight sessions of Workstation open at once (even if nearly all of the VMs themselves are shut down or suspended) does degrade performance in any given VM. I will be experimenting with how many VMs I can have open without too much of a performance penalty. This approach does seem, so far, to solve the problem of Workstation crashing or becoming unresponsive.

Friday, May 8, 2009

Configuring 64-bit Ubuntu 9.04 (Jaunty Jackalope)

In a previous post, I described my experiences with upgrading from Ubuntu 8.10 to 9.04. The previous post also provides some cautionary notes on upgrading from the ext3 to ext4 filesystems. This post describes the process of configuring 9.04 from scratch, after downloading the ISO file and burning it to CD. (For future troubleshooting purposes, you may also want to download and burn the "alternate" ISO file.) The basic installation was pretty simple: insert the CD, boot the computer, and follow the instructions. The main exception was the partitioning step, especially if the machine had several partitions. I defer to other websites that provide details on the basic installation. In my first try, I started by installing and configuring Firefox extensions, but that was very time-consuming, so I decided to save that for later, in case I would have to re-do my installation. What had forced me to start over in my installation was related to compiz, so I decided to start there, this time, and make sure that part was OK before proceeding with the rest. The specific problem I had run into had come up when I was following the advice at 10 Tips for After You Install or Upgrade Ubuntu. The gist of it is that I tried installing fusion-icon, wound up with the black screen problem that lots of people seemed to be having, went through a whole hassle (documented elsewhere), and decided not to use fusion-icon. On my next try, I also decided not to use compiz, which was also causing unexpected behavior in my system. I also wasn't using wine. Therefore, the 10 Tips, modified for 9.04 and combined with some other tips, so as to do things in the best order, came out as follows:

System > Administration > Update Manager > Check. (This one would ideally be postponed until you've done a couple of these other steps, but it may insist upon being run early in the process, in which case you may want to repeat it later.) Install updates. Restart if advised, and then run Check again, until there's nothing left to update. Applications > Add/Remove > Show All Available Applications. Then search for "restricted extras." Check the box next to "Ubuntu restricted extras." Click Apply Changes > Apply. System > Administration > Hardware Drivers. I was using an nVidia graphics card, and here I saw that my system was not using nVidia drivers, and that I did have a couple options to choose from. I chose to activate the recommended driver. I had to reboot before it would take effect. System > Administration > Software Sources. Go to the Ubuntu Software tab > Download From > Other > Select Best Server > Choose Server. Also, go to the Third-Party Software tab and add other stable repositories. (On that webpage, under the "Install packages" heading, where it says "Display sources.list entries for" choose "The Jaunty Jackalope." Then copy the lines from the text box immediately below that heading. For instance, I copied and pasted these two lines, one at a time, into the dialog box that said,"Enter the complete APT line of the repository that you want to add as source":
deb jaunty main
deb-src jaunty main
(Those are each one-line commands.) I had to click "Add" after each one in order to be able to install the next one. Then click Close. This called for a reload of current software information. If you don't get a "Reload" option when you click Close, go back into Third-Party Software and unclick and then re-click some item and try again.
Remove Partition Icons from Desktop. A mere tweak, but while we're doing the 10 Tips, it's easy. Alt-F2 > gconf-editor > Run > apps/nautilus/desktop. Unclick volumes_visible. Close the Configuration Editor. System > Administration > Synaptic Package Manager. Search for each of these items and mark for installation when it comes up: cups-pdf; firestarter; flashplugin-installer; gparted; ntfs-config; p7zip-full; pysdm; and sun-java6-jre. (If numerous items come up in response to your search, click on the Package heading to sort them alphabetically. Also install other related packages, if given the option.) Some of these may ask if you want to "Mark additional required changes?" Click "Mark" and go on to the next one. Then click Apply. (I initially installed, but decided not to keep, compizconfig-settings-manager and emerald. They appeared to be generating multiple problems for others and were not functioning well on my machine.) Some of these programs may already be shown as being installed on your system. If so, no problem.
Next, I closed that and ran Update Manager once more. I went to System > Administration > Firestarter to configure the Firestarter firewall. I had second thoughts after installing it; it seemed that some people had problems with it. It was also said to be a security risk -- something for special needs, not like a Windows firewall that would be highly recommended for general use. I thought about removing it via Synaptic or the command line, but it didn't seem to be bothering me now, so I let it alone.
Then it was time to install some Ubuntu programs that weren't available, or didn't install well, via Synaptic. Installing these called for use of Ubuntu's command line -- which, if you are an accurate typist, can be manageable. These programs were of two kinds. First, there was the previously downloaded program that was too big to download again unless necessary. An example of this was my copy of VMware Workstation 6.5, which was 340MB and had cost me $189.
Downloads typically came in some kind of compressed format, so I had to decompress them before I could use them. To decompress them, I had to run Ubuntu's Places > Computer menu pick. This opened File Browser, which worked like Windows Explorer. In File Browser, I navigated to the folder where I had saved my downloaded .bin file. File Browser's Location field gave me the path for this folder. I copied that path into Ubuntu's Terminal program (Applications > Accessories > Terminal). (If you're used to using Ctrl-C and Ctrl-V to copy and paste, you may have better luck by using the right-click options instead.) Once I was in the right folder in Terminal, I typed "cd [pathname]" which, in my case, was as follows:
cd "/media/CURRENT/Miscellany/Ubuntu Programs"
About quotation marks: in this post (indeed, in my posts generally), don't type them if they just bracket the command. In the previous sentence, for example, you would type the quotation marks in the indented command (i.e., cd "/media/CURRENT etc.), but not the quotation marks in the "cd [pathname]" example. I had to use quotation marks in the indented example because that pathname contains a space (between "Ubuntu" and "Programs"); this space would confuse the CD command otherwise.
At this point, in Terminal, I typed "sudo -i" so that I could execute commands as root (i.e., as administrator). Then the commands I used to decompress these files were as follows:
BIN Files. (The example used here is GoogleEarthLinux.bin, although this program is regularly updated and not that big, and is therefore better installed by a different method that brings you the current version, as described below.) For BIN files, I used this procedure: (1) Type "chmod +x" followed by the .bin filename. Example: chmod +x GoogleEarthLinux.bin. (2) Type "./" followed immediately by the .bin filename. Example: ./GoogleEarthLinux.bin. (If "./" doesn't work, try "sh" -- with no space after ./ but a space after sh). (3) Designate "/home/ray" (with your own username in place of ray) as the installation directory.
BUNDLE Files. Same steps as BIN files.
DEB Files. Right-click on the filename and use GDebi. Click on its "Install Package" button. It seems to know already where it wants to install the files -- not necessarily in or under the directory where the .deb file itself is located.
TAR Files. To install a TAR.GZ file: Copy to /home/ray (replacing "ray" with your username), navigate there in Terminal, and then use this command format: tar -vxf filename.tar.gz (or possibly tar xvfz instead). To uncompress the files (or to get the files out of a tarball), use this format: tar xvf filename.tar. If you have a .tar.bz2 file, use this format: tar yxf filename.tar.bz2.
To install Google Earth, I didn't use a previous download (see above). Instead, I typed this:
sh GoogleEarthLinux.bin
(That "wget" is supposed to be on the same line as the URL that follows it.)
I got an error message when I tried to start Google Earth:
Google Earth detected an error while trying to authenticate. Please check the following:
- your network connection (can you get to - your firewall settings (are you blocking /opt/google-earth/googleearth-bin?) Error code: 29 For more information, visit:
That link didn't work for me. I did find advice to rename the file in the google-earth directory (which, by default, was /opt/google-earth) to something else, but that didn't solve the problem this time, so I changed it back to its original name. The solution, for me, was to type "sudo apt-get install lib32nss-mdns." The other problem was that I had to replace the entries in My Places in Google Earth; the ones that I had previously installed (which were still visible after the reinstallation) would cause the program to crash.
Next program: Firefox. Firefox was included with Ubuntu. Updating it depended on the situation. On one machine, I had wiped the partition and was installing Ubuntu from scratch. In that case, I had to fiddle with Firefox extensions. Before wiping and reinstalling, though, I had previously installed the InfoLister extension. This add-on had created an HTML file listing my currently installed extensions. I had kept a copy of that HTML file, and now I opened it. Although the HTML file contained links directly to webpages containing information and downloads for the various extensions, I had found that the fastest way to reinstall these extensions was just to open the Mozilla addons webpage and search for and install them one at a time. (It was not necessary to restart Firefox each time I marked an addon for installation.) I also went to the Categories > Plugins webpage, there at Mozilla, and downloaded the latest versions of the plugins I thought I would be needing. To get YouTube and other videos to play, I tried the alpha version of 64-bit Adobe Flash Player 10. One addon (Snap Links Plus) was available only in a manually installed .xpi form, so I went into Firefox and chose File > Open File and indicated that one for installation. To see what plugins I had installed, I typed "about:plugins" in the Firefox address bar (also accessible by Ctrl-L). I also had to configure the Preferences for a number of add-ons individually (Firefox Tools > Addons). On another computer, by contrast, I was installing Ubuntu 9.04 on top of 8.04, without first reformatting the partition. This kept a bunch of the things I had already installed, including my Firefox extensions. Some were not compatible with 9.04, but otherwise Firefox seemed to run pretty well.
Next, I wanted to make some adjustments to the system. First, I didn't want all those various prior Ubuntu kernels to be listed in the GRUB menu at startup. To edit this, I typed "sudo gedit /boot/grub/menu.lst" and put # symbols in front of each line that I didn't want to appear in the GRUB menu.
I also wanted Ubuntu to mount NTFS drives automatically at bootup. This involved a fair amount of screwing around, on the system where I had installed Ubuntu 9.04 without first uninstalling or formatting the partition where 8.04 was installed. I have detailed those efforts in a separate post.
That was pretty much it, for the update installation -- the one where I installed 9.04 on top of 8.04. For the installation from scratch, I had some additional problems. Here are some brief notes on those:
My dual-boot system was screwed up. When I booted, I got GRUB Error 12. The solution was to remove "makeactive" from the Windows XP entry in /boot/grub/menu.lst, and use GParted to give WinXP the boot flag.
If you may be rearranging your drive partitions (e.g., swapping hard drives), you may want to change the partition references in fstab to refer to UUIDs (which stay with the partition) rather than partition numbers (e.g., sda1) which will change when you rearrange partitions. To do this, open gparted (System > Administration > Partition Editor). Then, in Terminal, type "sudo blkid" to get UUID information for each drive. Type "sudo gedit /etc/fstab" to edit the fstab file. Change each line in fstab that refers to a fixed location, so that it refers to the device's UUID instead. For example, if fstab contains a line that begins with "/dev/sda5" and if blkid tells you that the UUID for that device is 500D33F91G01, then you might want to move the /dev/sda5 to a previous line as a comment, and replace it with the UUID. (Everything after the /dev/sda5 on that line would remain unchanged.) So the line that used to read like this:
/dev/sdaa5 /media/DRIVENAME ntfs-3g [etc.] might now look like this: # Entry for /dev/sdaa5 : UUID=500D33F91G01 /media/DRIVENAME ntfs-3g [etc.] Next: in Nautilus (i.e., File Browser), go to Edit > Preferences > Behavior and make sure the "Always open in browser windows" box is checked. I found a solution to a networking problem in which Ubuntu was unable to connect to the Internet. In one of my installation attempts, I also had to fix a keyboard problem. The solution was to use an alternate keymap code. Although I didn't actually use it, I got a tip that said I could designate programs to open automatically at startup by selecting System > Preferences > Sessions. In response to error: "Unable to lock the download directory," use "sudo pkill apt" OR "sudo killall dpkg."
There's no limit to the number of other things that can be installed and other tweaks that can be made. But the next big step, for me, was installing VMware.

Upgrading from Ubuntu 8.04 and 8.10 to 9.04

I had Ubuntu 8.04 (Hardy Heron) on one machine and 8.10 (Intrepid Ibex) on another. I discovered that 8.10 does, but 8.04 does not, permit an in-place update to 9.04 (Jaunty Jackalope). In other words, I would have to install 9.04 from scratch, using the installation CD, on the machine where 8.04 was installed; but I could update online, without doing a complete new installation with the CD, on the machine running 8.10. The online update was straightforward. Following advice, I took the following steps:

  1. Go to System/Administration/Update Manager
  2. Click the Check button to check for new updates.
  3. If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete.
  4. A message will appear informing you of the availability of the new release.
  5. Click Upgrade.
  6. Follow the on-screen instructions.
The difference here between 8.04 and 8.10 was that 8.04 would not give me that message informing me of the availability of the new release. That is, once you get as far as 8.10, all of your future updates can be done online. Note that the online installation process is much slower than the CD-based installation process. It tied up my machine for hours. By contrast, I was able to download and burn the ISO for the CD mostly in the background, while continuing to use the machine for other things. The advantage of the online upgrade is that you don't have to reinstall everything you had previously installed on Ubuntu. Websites advising on the upgrade process also provide information on upgrading from the ext3 to the ext4 filesystem. I did not thoroughly review this process before proceeding with that upgrade. It seemed to work fine, but then I was not able to reboot my system. I got Error 24. I tried reinstalling GRUB, but was not successful, and it looked like others had had the same experience. From what I could gather, it appeared that the upgrade causes problems only on the boot partition. Once I reinstalled from scratch, everything seemed OK; there did not seem to be any problems on any other newly upgraded ext4 partitions. There seemed to be two pieces of advice about upgrading from ext3 to ext4 on the boot partition: that it's not necessary, and that some programs are not yet ready for it. The next step for me was to install everything from scratch, now that I had wiped out my previous Ubuntu installation.