Sunday, March 15, 2009

Ubuntu and VMware: Cannot Install This Hardware

This situation arose while I was in a previously described process of installing Windows XP SP2 and SP3 in VMware Workstation 6.5 on Ubuntu Linux 8.10 (Intrepid Ibex). See that previous post for more background information. At this point, matters had developed as follows: VMware had been unable to run the WinXP virtual machine (VM) that I had created, using VMware Converter, from a preexisting Windows installation. In other words, I had installed Windows on my computer as usual; I had used Converter to convert a copy of that Windows installation into a VM; I had rebooted into Ubuntu and had tried to run that VM within VMware; and it didn't work. The system really never got past loading Windows, giving me a BSOD (blue screen of death), and rebooting, in an eternal recurrence. So I went back to the Windows installation and tried again. That previous attempt had involved a Windows XP SP2 (service pack 2) installation, and that had made it difficult to run the System File Checker (sfc /scannow) program in Windows. I thought that might be helpful, and I came across a deal, so I got a WinXP SP3 CD and tried again. (Could also have slipstreamed SP2 with SP3 to create an SP3 CD.) Then I started over with a new WinXP installation, using this new SP3 CD. This time, unlike last time, I installed only a partial (but large) selection of my Windows programs and utilities. These were programs that I wanted every one of my VMs to have, so it made sense to install them once and then make clones of the resulting VM. For purposes of conserving disk space, backup space, and system load time, I wanted all this to fit within a 20GB rather than 30GB VM. So I left out some big, space-consuming programs. I figured I would add those later to one larger, 30GB VM. Installing numerous programs before running VMware Converter was a different approach from the one I had taken previously, when I had installed VMware Workstation on Ubuntu 8.04 (Hardy Heron). That approach had worked pretty well: the VM had run successfully in VMware on Ubuntu, and I had then added most of my Windows programs to it after doing the conversion. This time around, as noted above, an alternate approach had failed. This time, I had tried to add all of my programs to my WinXP installation before creating the VM, and that 30GB VM had failed to boot, as just described. So in this second try, I had (1) upgraded to WinXP SP3 and (2) installed only a selection of Windows programs, to a 20GB partition, before running VMware Converter to create a 20GB VM. So that's the situation we begin with. This 20GB VM did succeed in running in VMware Workstation, but it was very slow. It seemed that part of the problem was that it was not succeeding in installing the virtual "hardware" that Workstation pretends to be using. That is, my real, partial installation had been on a system with a Foxconn motherboard and an AMD CPU; but now VMware Workstation was trying to run that installation on a virtual system with a generic, virtual motherboard and CPU supplied by VMware. But at least it did run, so apparently the crucial difference between running and not running was due to (1) the use of SP3 rather than SP2 and/or (2) the elimination of one or more installed programs that had made it impossible for the 30GB VM to load and run. What was happening, at this point, was that the WinXP VM would give me the "Found New Hardware" wizard; I would tell it to go ahead and install itself; and it would then give me a "Cannot install this hardware" error message. It seemed that VMware Workstation, itself, was not supplying the drivers that its own generic virtual hardware needed. The more successful approach would have been to do as I did before: set up just a basic WinXP installation in my Windows dual-boot, create a VM from that, and then install additional programs on the VM. I didn't want to do it that way because I wanted to have a Windows native boot that was more or less the same as my Windows VMs, and I didn't want to have to invest twice the time in installing and configuring all those various programs, add-ins, etc. So, to go through it more carefully, here's what would happen in this VM. The VM booted. It loaded the programs I had installed in my Startup folder. It gave me various messages (e.g., "30 days left for activation. To activate Windows now, click here."). I ran Windows Explorer and verified that the Internet connection was active. I went into Control Panel > System > Hardware > Device Manager. There, I saw a yellow circle with a black exclamation mark in it, next to "Other devices - Video Controller (VGA Compatible)." I right-clicked on that and chose "Update driver." This gave me, "Welcome to the Hardware Update Wizard." As before, I chose "Install the software automatically (Recommended)," and after a short pause, that gave me "Cannot Install this Hardware." I did a Google search and found that there didn't seem to be many people having this problem. Actually, I was one of the few. In a previous post, I had apparently found that I was supposed to be looking for a driver for a "VMware SVGA II" video adapter, which was more than Device Manager had been willing to tell me. In Device Manager, I right-clicked on the yellow-exclamation-marked "Video Controller" item and chose Properties > General > Reinstall Driver > Install from a list or specific location > Next > Don't search. That gave me a list of hardware items, but none of them had names beginning with "VMware." I chose Display Adapters > Next, but this gave me, "Unable to find any drivers for this device." One poster said s/he had gotten relief from this problem after, among other things, proceeding to install the mouse drivers. I thought maybe just skipping the problem on this boot would give VMware a chance to install other hardware drivers to adjust to this new setup, so I canceled out of Device Manager and waited for the system to identify and install some more hardware. But nothing happened. Everything else was installed already, as I now recalled from what I had just seen in Device Manager. Lacking other ideas, I decided to reboot. Things were unchanged. I did another Google search. One post said something about needing a minimum of 128MB RAM for the VM. That wasn't a problem, but maybe the opposite was: I saw that VMware was allocating over 3GB to this VM. I wanted it to get a maximum of 1GB. I had to start VMware as root in order to change it. I went to Ubuntu's Terminal and typed "sudo vmware." Then, in VMware, I went to Edit > Preferences. I didn't change anything there, but I did notice the option of setting hardware compatibility to previous versions of VMware. That seemed like one possible solution; I had seen one post where somebody had found a working video driver in an older version of Workstation (5.5.3). Still in Workstation as root, I next went to VM > Settings > Hardware and changed the Memory setting to 1024MB. Also, although I was running a triple-core processor, I thought I might as well try changing the Processors setting to One instead of Two; maybe VMware would let other VMs use the other cores. For the Display setting, I changed from "Use host settings for monitors" to "Specify settings for monitors," and I specified a maximum resolution of 1280 x 1024. I also checked the "Accelerate 3D graphics" box. In the Options tab, I set Shared Folders to "Always enabled" and I changed Guest Isolation to be "Enable VM communication interface (VMCI)." I saved those changes, quit Workstation, and restarted it the normal way (i.e., Ubuntu's Applications > System Tools > VMware Workstation option), and then started this VM. It started slowly, like before. But this time, when the Found New Hardware wizard came up, it was concerned with a different piece of hardware: not the virtual VGA graphics, but rather the Base System Device, whatever that was. I guessed that it went on to this problem because the wizard dialog box added a checkmark by default to the "Don't prompt me again to install this software" option, so apparently the system just went on to the next thing in that case. I went into Device Manager as above, and now saw I had not one, but two "Other devices" with the yellow exclamations: the Video Controller, and now this. I told the Found New Hardware Wizard to install automatically, but once again, it was not able to do so. In Device Manager, I right-clicked on these two items and chose Uninstall. I then chose VM > Install VMware Tools. I restarted the VM. The video and Base System hardware wizard installations failed again. I unchecked the "Don't prompt" option in each case and continued. Nothing else seemed to be happening, so I fired up Internet Explorer and went to Windows Update. It needed to validate my copy of Windows, and to do that it needed to activate it. It seemed like I had already activated it on the native WinXP installation; if so, apparently the VMware hardware was sufficiently different as to trigger Microsoft's anti-piracy sensors. So I activated. Now Microsoft Update told me there was just one update, an optional hardware update for my sound hardware, so I installed that. I re-ran it and there were no further updates. Device Manager still had the same two yellow exclamation items. I was stuck. I rebooted the VM and did another Google search. This time, when the Found New Hardware Wizard came up for the VGA, I chose "Install from a list or specific location" > "Don't search. I will choose the driver to install" > "Sound, video and game controllers." Unfortunately, that gave me only three game port options, so that wasn't the solution. I backed up and, instead of sound and video, I said "Show All Devices." The list of manufacturers that eventually came up didn't have any entries for VMware, SVGA, video, or graphics. It seemed I was in the wrong place, so I backed up one step. Ah! In the list of "Common hardware types," I had overlooked "Display adapters." I went with that, but it didn't make any difference. I got a message, "Unable to find any drivers for this device." I found a webpage where I could download a driver for SVGA II. It claimed to be version It was actually an EXE file, and when I ran it, it said something about unplugging my USB Ethernet adapter. Apparently it was a driver for some kind of device I didn't have. It ended by saying the system would install it automatically. Whatever. I clicked Cancel on this and also on the Base System wizard. In the latter case, at least, I did it without unchecking the "Don't prompt me" option. This gave me a balloon: "Found New Hardware. A problem occurred . . . ." I restarted the VM. The VGA thing still didn't install; same Found New Hardware and Cannot Install This Hardware dialogs as before. I found another download page, a more official CNET one, for a driver for SVGA II version that was dated September 30, 2001. But that just redirected me to the VMware download page, and they didn't have drivers, only complete Workstation packages. I went into Device Manager and decided to try updating the driver for the Base System Device. The update option led me to the "Common hardware types" dialog box again. This time, I selected "System devices." It showed only a "Compaq Deskpro Thermal Sensor." What? Well, OK; I clicked on Next. But the system gave me a warning, "Installing this device driver is not recommended because Windows cannot verify that it is compatible with your hardware." So forget that. I posted a question in a VMware forum. In a day or two, I had what looked like an answer. The explanation seemed to be that I was getting those yellow exclamation circles because VMware Tools were not actually installed. After clicking VM > Install VMware Tools, I was supposed to see VMware Tools listed in Windows Explorer as my new drive D -- as, in other words, a virtual CD drive. Sure enough, there it was. (It sounded like this could vary somewhat if I had received VMware Workstation on a CD. I didn't. I got it as a download. So this was just a virtual CD drive.) The advice was to run Setup.exe there. I did. It thought it was just taking an unbelievably long time to run, but then I decided to scroll around the screen and see what was going on. In other words, I couldn't see my whole Windows desktop at once, because VMware Tools was not yet installed. The resolution was too big. So now, when I scrolled to the top of the screen, I saw a dialog that said, "Please insert the Compact Disc labeled 'Windows XP CD-ROM' into your CD-ROM drive (D:) and then click OK." I did that. It started installing stuff -- including, I noticed, the SVGA driver. Along the way, it asked for the locations of various files. I had copied the I386 folder from the WinXP CD to my hard drive C before running Converter to create the VM, so for the most part I just had to point these dialogs to C:\I386 and they found what they were looking for there. Installation completed, and I got a dialog telling me I needed to reboot, which I did. Device Manager now showed no yellow exclamation circles. Everything was working normally. So that was the answer.