Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts

Monday, January 3, 2011

Windows 7 as Host: Choosing a Virtualization Program

I had previously used VMware Workstation to run Windows XP in a virtual machine (VM) on Ubuntu Linux.  Now I was switching from Ubuntu to Windows 7.  I had found that WinXP was actually more stable in a VM than when running natively.  I also didn't want to go cold-turkey from WinXP; that is, I wanted to continue to have access to my familiar programs and other arrangements until Win7 felt natural.

I couldn't use my Linux-based copy of Workstation on Win7, so I would have to come up with a new virtualization tool.  I didn't want to shell out for another copy of Workstation.  I wondered if there were good free alternatives that would let me run WinXP in a VM on Win7.  I did a search, viewed some random remarks, and came up with some comparisons of several leading virtualization products.  These comparisons confirmed my sense that the main free contenders were Microsoft Virtual PC, Sun Virtual Box, and VMware Player.

Looking first at comparisons against Virtual PC, one reviewer suggested that Virtual PC was easiest for a purely Windows setup like mine, Virtual Box was more oriented toward Linux hosts, and Player was the most popular.  Another reviewer said that VirtualBox and VMware Workstation (not necessarily Player) had more advanced customization options, such as unity mode, snapshots, USB drive support, the ability to move VMs, and the option of allocating two CPU cores.  Another reviewer, comparing VirtualBox and Virtual PC, found that Virtual PC had the advantage of presumably greater Microsoft compatibility, better disk technology, a free WinXP license, support for Win7 and Vista guests, lower resource consumption on host, and easier physical drive configuration.  He favored VirtualBox nonetheless, though, because he found that VirtualBox supported more operating systems (especially Linux and Mac), supported 64-bit guests and multiple processor cores (i.e., better performance) as well as multiple kinds of virtual disks, and offered snapshots, unity mode, remote display, and 3D support.  Another reviewer, offering a video demonstration, said Virtual PC was better in supporting Aero, automatic login, USB device sharing, and integration into Windows Explorer (which he actually disliked), but favored VirtualBox for running on multiple operating systems and for other reasons stated by some of the other reviewers.  In short, there seemed to be some consensus that Virtual PC was the worst of the three.  I did a quick search to see if perchance Microsoft had upgraded it recently.  It didn't seem to have done so.

At about this point, I realized that probably I could continue to use my copy of VMware Workstation for Linux to make virtual machines containing WinXP, and use those in Player on a Win7 host.  So I wasn't sure if I should be comparing VirtualBox against VMware Player or Workstation.  I found both sorts of comparisons.  In what were probably the most professional reviews I saw, PCMag rated Workstation 6.0 (I was now using 7.1) at 4.5 stars, versus 3.5 for Virtual Box.  (At this writing, Workstation was on sale for $142 (with a free copy of VMware ThinApp Starter Edition thrown in) instead of its usual $189.)  One of the reviewers cited above encountered freezes in VirtualBox, and found that Workstation was the best performer.  She reported large differences in size between Workstation (~500MB) and the other two (~40MB), presumably reflecting more sophistication but also more resource demands in the former.  Another reviewer also compared VirtualBox against VMware Player.  He found VirtualBox faster in the guest, less burdensome for the host, and better in snapshots; but inferior in networking, and in support for Windows Aero, USB, 64-bit CPUs, and hardware virtualization.  Another reviewer favored VirtualBox because (s/he claimed) it was free, open source, more frequently patched, used fewer resources, ran faster, resumed faster, and was able to use its competitor's VMs.  The remark (above) that VirtualBox was more oriented toward Linux hosts was echoed in my own previous look at VirtualBox, where I cited a source indicating that VIrtualBox did far better in Linux hosts.

It seemed that VMware was ahead of the game or at least a solid contender in most ways, but that it was not a clear and obvious winner, especially when price was considered.  Having already played with VirtualBox a bit, and having learned VMware's approach, it seemed that I should start with whatever I could pull together from Workstation and Player.  If I ran into performance issues with a Windows host as I had with an Ubuntu host, maybe then it would be time -- especially before investing another $140-190 in VMware -- to give VirtualBox a more extended look, and that might also be true if I reached the point of having to build another WinXP VM from scratch.  I could do that in VirtualBox, and in that event might find it a relatively problem-free alternative.

Before proceeding to try VMware Player in a Windows host with my existing VMware VMs that I had created using Workstation on a Linux host, I looked into the recollection that VMware Server was also free.  Posts in one thread said that Server could create VMs too, but was not as fast as Player and did not have as many capabilities for an already existing VM.  I found EasyVMX.com and gathered that there were other ways to make VMs as well, though there didn't seem to be a point in doing so unless if I had been short of system resources to run Server.

I discovered at this point that VMware offered another free virtualization product, called the VMware vSphere Hypervisor, or ESXi for short.  This one differed from the others in being a "bare metal" hypervisor -- that is, not requiring a host at all.  In other words, I would install this first, before installing the operating system, and then I could install one or more operating systems, each in its own VM, without devoting resources to non-virtualization services being provided by the host (though it began to sound like ESXi would only run one operating system at a time).  In the long run, this sort of thing could be the end of dual-booting, and I could have Ubuntu, Win7, WinXP, and any other operating systems ready to run as needed, including those already packaged in free VMware appliances.  ESXi was said to offer better performance than Server.  It wasn't clear that it could be made to work on a PC as distinct from a dedicated server, though.  VMware's Hardware Compatibility Guide was not going to provide information for my puny little AMD Athlon (as distinct from Opteron or Xeon) CPU.  Another source made it sound like a home PC could run it, though.  Managing ESXi seemed to be the sticking point; for example, VMware's ESXi Management Kit cost $995.  Veeam offered a free ESXi manager, but there appeared to be a network administrator type of learning curve involved here.  Some people seemed to be using a minimal Linux to manage it.  It also sounded like there might be an ESXi manager within ESXi itself.  Apparently part of the reason Server was slower was that it was more user-friendly.  The purpose of the free ESXi seemed to be to get new system administrators into the VMware world and ready to upgrade to more powerful VMware server products.  Apparently there were ways to run ESXi in Workstation in Windows 7, but this seemed like the opposite of a bare-metal approach.  Basically, I liked the idea of a bare-metal hypervisor, but the sparse results I was getting on my searches told me that I was looking into something that was not happening for end users, at least not yet.  It could be done, but servers remained something that other people used for other purposes.

I wasn't quite ready to give up on the idea of a bare-metal hypervisor for home use, so I did another searchBrad Maltz gave me a nice chart to compare the options.  His bottom line:  "You can expect plenty of hurdles and years for perfecting this technology, but the client-side hypervisor is the catalyst to many greater things to come."  My goal for the coming months, it seemed, would be to continue to focus on the usual multi-layered host-virtualization-guest scenario.  For that purpose, I would start with VMware Player and my existing VMs.  If I needed to adjust them, I would try to do so in either Workstation for Linux or Server.  If I had to build a new VM, I would consider doing it in VirtualBox as an alternative to Workstation or Server.

Wednesday, September 22, 2010

Installing Windows XP SP3 in VMware Workstation 7.1 on Ubuntu 10.04

I had decided to stay with VMware Workstation 7.1 for a while longer, adopting a wait-and-see strategy toward VirtualBox and whatever other virtualization developments might be underway.  A couple of years had passed since I had first installed Windows XP on VMware Workstation in Ubuntu.  My old virtual machines (VMs) were creaking and malfunctioning.  It was time to create a new WinXP VM.

I had obtained mixed results from efforts to use VMware Converter to build VMs from existing WinXP installations or other sources.  I decided to build a fresh installation, installing XP within a newly created VM.  I had already installed VMware Workstation.  Now I started it as root user by typing "sudo vmware," and then I went into Ubuntu's Applications > Accessories > Terminal.  In Workstation, I went into Edit > Preferences and adjusted the settings that would apply to all VMs, some of which could only be set by root.  In the Preferences > Workspace tab, I went with the default settings for the most part.  For the default location of my VMs, I chose a partition on a separate hard drive for better performance.  In the Display tab, I selected the three Autofit options.  I selected all of the Updates options.  In the Memory tab, I left about 1.5GB of RAM for the system; the rest was for VMs.

When I was done with the settings, I killed that session and restarted VMware as a normal user.  I created a new VM with these characteristics:

  • I started with a 40GB independent, persistent SCSI VM, but ran into some problems when I tried to shrink it, and ultimately had to start over.  Since it was easier to grow a VM than to shrink it, I decided on 20GB to start.  Although I initially created this as a preallocated space, it seemed that clones (which I made from time to time as backup, as the installation and tweaking process went along) would default to being non-preallocated, and I decided that was actually better until things got settled, because non-preallocated drives were smaller and therefore easier to clone and to back up.
  • A 4GB independent, persistent IDE virtual drive, within this VM, for the paging file (VM > Settings > Hardware > Add).  This, I discovered, was best created after WinXP was installed.  Otherwise, WinXP was quite capable of brainlessly installing itself into this little partition and leaving the 20GB partition unused, thereby providing yet another reason to start over from the beginning.  Also, this drive was best created when the VM was powered down; only a SCSI (not preferred) drive could be created while the machine was powered up.  Note also that, as soon as you start down this path, Workstation may create a miniature version of a file for such a hard drive, even if you then abort the process -- in which case your later attempts to create that file may trigger strange results, until you investigate and delete any such runt file.
  • 1.5GB RAM.  I had opted for 32-bit Ubuntu and WinXP after numerous previous hassles with 64-bit systems.  The discovery of PAE-enabled kernels meant I could go above the ordinary 32-bit limit of 4GB of RAM, so I was comfortable with this 1.5GB allocation for a single VM.  I could have gone higher, but I had almost never reached the point of using even this much.
  • One single-core CPU.
  • Based on my own usage, I set "Don't automatically connect" for floppy, USB devices,  or printer.
  • Power:  enter full screen mode after powering on; close after powering off.
  • Shared folders:  always enabled, map as network drive, make read/write only those that needed to be written to in Windows.
  • No AutoProtect.
  • Guest isolation:  enable drag and drop; enable copy and paste; don't enable VMCI.
  • VMware Tools Updates:  use application default (currently update automatically).
Then I inserted the Windows XP CD and installed Windows XP, using a slipstreamed CD with Service Pack 3 (SP3) on it.  In my first attempt at this, I had to deal with the problem of making the VM boot from the CD.  I had just learned how to do this.  First, in Ubuntu's Terminal, I typed "sudo gedit [path][filename].vmx," for the .vmx file pertaining to this VM, and then I went to the end of that file and added bios.bootDelay = "10000" and saved the edited file.  This gave me a ten-second delay on VMware's splash screen.  So then I had time, on reboot, to read the options and choose F2 for BIOS setup.  In BIOS setup, I chose Boot, moved the CD-ROM drive up to be first in the boot sequence, and then hit F10 to save and close.  Then I installed WinXP.  The process was completely automatic, this time; apparently the latest version of VMware Workstation was able to detect my settings from the underlying Ubuntu installation.

Once WinXP was done with its basic installation process, I right-clicked on the VMware Tools icon in the system tray (i.e., the lower-right-hand corner of the WinXP desktop), chose "Open VMware Tools," and selected all three items in the Options tab, and then closed that.  To get the Windows desktop to stretch all the way across the monitor, I used VMware's View > Stretch Guest (using the menu at the top of the screen), and then returned it to View > Autofit Guest, and for some reason that did it.  I had to map my network drives after listing them in Workstation's VM > Settings > Options > Shared Folders.  Then I turned to the process of tweaking my WinXP installation.  There are some additional VM-related notes in my post on that.  When I tried to open a PDF file from within the VM, I got a Default Host Application error message.  Another post discusses that problem.

I wanted to use Acronis TrueImage to make periodic images throughout the installation process, so as to capture each working state of the system in a single snapshot.  On a standalone WinXP installation, that would have been just a matter of inserting the Acronis CD and making the backup to a separate partition.  In the VM context, though, Acronis was only willing to recognize only those partitions that were defined as part of the VM.  What I did instead, then, was to power down the VM, use Nautilus to copy the entire VM's folder to an NTFS drive, boot Acronis, and make an image of that VM folder.  (I also made a .zip of it in 7zip, just in case.)

To get the system to pause before loading Windows within VMware, so that I would have time to make a decision to adjust the BIOS or choose boot devices, I edited the individual virtual machine as described in a previous post.  Basically, I set Workstation's VM > Settings > Hardware tab > CD/DVD > "Connect at power on" and "Use a physical device" (though I was intrigued by the "Use ISO image" option).  In Terminal, I typed "sudo gedit [path][filename].vmx," for the .vmx file pertaining to this VM; and at the end of that file I added a line that said this:

    bios.bootDelay = "10000"

and that bought me ten seconds instead of one or two, when that vmware logo came up.

*** NOTE ***

At this point, I stopped developing this post.  Several other system issues had to be taken care of first, and those were superseded by non-system tasks.  When I returned to this post several months later, my purpose was just to close it down.  I had decided, by that time, to stop working on VMware within Ubuntu.  The following fragments are the other notes I had left over, in incomplete form, when I ceased working on this post.

Fragmentary notes continue as follows:

*  *  *  *  *


At some point in the process, I started getting an error message when I was trying to shut down the WinXP VM:
End Program - VMwareUser.exe
This program is not responding.
I did a search and found that virtually nobody was having this problem.  That was not a good sign.  A different search suggested that lots of people were having problems of one sort or another with VMwareUser.exe.  That was not a good sign either.  I didn't have an answer for this problem at this time.

After adding another program, Windows Explorer began flashing, refreshing itself every couple of seconds, in what appeared to be a different network drive problem.  I have written up the process of solving that in a separate post.

After tweaking the WinXP installation, I began adding programs.  I installed Copernic Desktop Search as one of those programs.  VMware Workstation treated my data drives as network drives, and Copernic regarded network drives as a sign that I was in a workplace, so I could not use their free version with VMware.  I downloaded their professional version ($40 to buy) and used it on a trial basis.  It was not able to save its index to a network drive.  Its index, I heard somewhere, would be about 10% of the total size of the files being indexed.  So if I had 100GB worth of files, I would have a 10GB index.  I definitely did not want that kind of monster sitting on my drive C.  But there seemed to be no alternative.  I decided to add a third virtual hard drive (30GB max, not preallocated) to the VM, made it drive Q, and told Copernic to save its index there.  When Copernic was done with its indexing, that drive

The only tweak that didn't seem to work was the one where I went into Internet Explorer and tried to save its Temporary Internet Files folder to some drive other than C.  It wouldn't save to a network drive.  But it also wouldn't even save to the little drive that I had created to serve as a paging file.  Possibly there wasn't enough disk space available for it there.

In the interests of improving performance, I worked through a VMware document on that subject.

Sunday, July 18, 2010

Using VMware Workstation; Time to Try VirtualBox?

A year earlier, I had tried using VirtualBox in place of VMWare Workstation as a virtualization solution.  I wondered whether I should try it again now.

I ran a search for recent comments and reviews.  A number of people had good things to say about VirtualBox.  It sounded like it had been progressing well in the year or so since Oracle bought it.  Rob Williams at Techgage listed some pros and cons.  A month after my previous try, an InfoWorld review said that VirtualBox had been gaining ground really quickly.  More recently, just a few months before this post, ZDNet's Jason Perlow did a comparison of VirtualBox 3.2 and Workstation 7.1.  Perlow said this:

In virtually all of our tests, [Workstation] matched or exceeded the performance of Oracle VM VirtualBox. Windows XP and Windows 7 32-bit and 64-bit performance was extremely snappy, and close enough to native that when we were running it in full screen mode, we couldn’t perceive the difference between “On the metal” and virtualized on our test system.
That reminded me that, once again, I was looking at a "professional" review by someone who comes in, tries the software on a fresh system, does their benchmarks, and then closes the doors and turns out the lights -- not sticking around for a few months, that is, to see how the thing holds up in everyday usage and abusage.  Perlow admitted that VirtualBox, not VMware, was his workaday tool.  But for me, by contrast, VMware Workstation 7.1 was huffing and puffing, and it had never approached the performance of a native Windows XP installation.  (Perlow also noted that VirtualBox performed well in his tests, but failed miserably when using Windows rather than Linux as the host.  I was not concerned about that; I would be using Ubuntu Linux as my host.)

These sources reminded me of the issues that had become par for the course in my use of VMware Workstation.  There were quite a few, as readers of my many posts on VMware would know.  One, as just noted, was the slowness.  There were things I couldn't do in VMware, like video editing, because of the poor performance.  Another kind of problem was hardware-related.  While I had worked through many of those issues, as noted in previous posts, there were always others.  VMware would recognize only some USB devices, including my multifunction printer/scanner, and/or would recognize them imperfectly (i.e., permitting only some functionality).  VMware would slow to a crawl if I tried to get it to use multiple processors.  It had originally seemed to handle at least a couple of open VMs at the same time, but more recently would become unusably slow if I had more than one VM open.


On the other hand, I knew that a switch to a new virtualization platform would require some downtime and many hours of tinkering, as well as some lost work in the process of making mistakes and learning how it worked.  I was also curious about what was going to happen with VirtualBox.  When Oracle bought Sun in 2009, some were predicting that this was awful news for open-source projects like VirtualBox.  It may be.  But Oracle has recently come out with a relatively significant new release of VirtualBox.  Before making the leap, I would like to let more time pass, so as to see whether the naysayers are wrong or whether, instead, Oracle was just cleaning out the closet, putting the last of its in-process improvements into production before marking the VirtualBox product for shelving or sale to some other tech company.

A quick check also suggested that transitioning from VMware to VirtualBox would probably entail creation of new VMs from scratch.  While there are surely countervailing opinions, what I got from the first few hits of a search on the matter leaned toward "the Fat Bloke's First Rule of VM Migration," which he stated as follows:  "Don't, if you can help it. If you can create a new vm from scratch on the new virtualization platform, you probably should."  Wand Weaver likewise said that graphics issues made it "tricky to import existing VMWare machines into VirtualBox."

I had other fish to fry.  I was in no rush to get myself into a new mess, dealing with creation of new VMs for VirtualBox at this point.  It seemed to met that the better strategy was to watch and wait, to see whether VirtualBox (or possibly some other virtualization program) would become the champ or would instead fade away.  This seemed especially advisable since a recent effort to free up some space and relocate the paging file in one of my WinXP VMs seemed to have improved performance.  So before dabbling with VirtualBox again, I decided to see what I could do to improve VMware's performance.

Saturday, August 8, 2009

VirtualBox 3.0 Instead of VMware Workstation 6.5?

As described in other posts in this blog, I was using VMware Workstation 3.5 and VMware Player to run Windows XP in virtual machines (VMs) on a 64-bit Ubuntu Linux 9.04 (also known as "Jaunty Jackalope") host system. I had run into intractable audio problems and decided to try other approaches. It appeared that VirtualBox, in particular, had come a long way since my previous look at it, in summer 2008. A survey in 2007 had found that it was gaining ground on VMware. More recently, 1 2 3 4 brief reviews posted in the first half of 2009 suggested that VirtualBox 2 was maturing and that VirtualBox 3 promised significant improvements over what I had encountered. VirtualBox 3.0.4 was now available as freeware, so I downloaded the appropriate version for my Ubuntu operating system. (Synaptic did not yet have version 3.0.) Since Ubuntu is Debian-based, I typed the following into Ubuntu's Applications > Accessories > Terminal, as suggested in the instructions on the download page cited above: sudo gedit /etc/apt/sources.list At the end of that file, I saw a bunch of commands that began with "deb http" and so forth. So, following the instructions, I added the appropriate line to the end of the file. In my case, that line was: deb http://download.virtualbox.org/virtualbox/debian jaunty non-free And then I continued with the instructions. Specifically, I went to the page where I could get the Sun public key for apt-secure. When that webpage opened up, I saved it with its default name (sun_vbox.asc). Then, back at the instructions page, I copied and pasted one long line into Terminal. That line was: wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add - Terminal was not too talkative at this point; it just said OK. The next step was to enter the command to install VirtualBox: sudo apt-get install virtualbox-3.0 This didn't work; I got "Couldn't find package virtualbox-3.0." That was because my default download location was not where the installer expected it. Departing from the instructions, I used Ubuntu's File Browser (Nautilus) to navigate to my download folder. There, I double-clicked on the downloaded virtualbox*.deb file. This opened Debian's Package Installer. I told it to install the package, and I went with the default options. I did not need to do the instruction that called for the installation of the dkms package, because I checked in Synaptic and found that dkms was already installed on my system. I also didn't check the checksum on the download. After the Debian installer was done, I looked for the icon that I could click on to start VirtualBox. There didn't seem to be one. I went to the command line in Terminal and typed "virtualbox." This gave me the message, "The program 'virtualbox' is currently not installed. You can install it by typing: sudo apt-get install virtualbox-ose." My understanding, from the VirtualBox Editions webpage, was that, among other things, the "ose" (Open Source) version did not have USB support. This would be problematic at best. So if I typed the command just quoted, it seemed I would be installing the Open Source edition and would not get USB support. The full package, with USB support, was free too, so I felt I should continue on the present path and try to get the full package to run. I went back to the instructions webpage and saw that I had skipped the instruction about the "key fingerprint." I had not known what that was and, following the standard protocol for Interpreting Signs in Foreign Countries, I had therefore assumed that if I didn't understand it, it must not apply to me. So now I found another set of instructions, and started from the beginning with those. They were as follows: sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian jaunty non-free' >> /etc/apt/sources.list" (which was easier than the approach recommended above) and then wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add - which gave me that OK again, and then the instructions said, "The key fingerprint should be the following," which once again left me clueless. I searched for, but did not find, an explanation of this. The best I could find was that this appeared to be an optional way of verifying that I had the genuine article. I punted and, once again, moved on to the next step. According to this second set of instructions, the next step was to type this: sudo apt-get update That did a bunch of things, ending with the message, "You may want to run apt-get update to correct these problems." This was baffling; I had just run "apt-get update" as superuser. I tried it just as myself (i.e., without the "sudo" in front), but this gave me a Permission Denied error. In a thread pitting a total newbie against a seasoned veteran, I saw the advice to use "sudo apt-get install -f" to "install any missing packages." When I ran that command, it found some packages that were "no longer required"; it suggested that I run "sudo apt-get autoremove" to remove them. And when I did that, it brought up the Update Manager with lots of updates to install. I don't know why these updates had not appeared under the familiar panel icon that used to tell me I had updates to download and install. Anyway, after the updates were done, I went back and tried "sudo apt-get update" again. This time, no error messages. The next instruction, then, was this: sudo apt-get install virtualbox-3.0 dkms That informed me that I had already done this. So, OK. Next, the instructions told me how to respond to several questions that did not come up in my installation process. One of them involved the "vboxusers group." I didn't know what that was, but it sounded like maybe I could find out by running the next command, which was sudo usermod -G vboxusers ray where "ray" was my username. Terminal swallowed that command without comment. But what came next was most crucial: these alternate instructions gave me the all-important command to reboot the system. Oops. I hadn't thought of that, and the other instructions hadn't said it. So, OK, I rebooted. After restarting the computer, sure enough, Ubuntu's menu gave me Applications > System Tools > Sun VirtualBox. OK, now, how to use it? I started it up and tried to register it, as part of the startup process, but I got "Failed to register the VirtualBox product" followed by a huge list of problems. I had to use xkill to kill it. I tried again. Same thing. Third time around, I clicked "Cancel" instead of registering. And so, there I was, looking at VirtualBox. Based on some instructions, I went into File > Virtual Media Manager > Add. I navigated to the VMware .vmdk file for the VMware VM that I wanted to try opening in VirtualBox. (They advised backing it up first.) Weirdly, when I clicked OK, the dialog vanished. I tried again, and I saw that the thing had indeed been added. So this time, with that .vmdk file highlighted, I clicked New and went into their Create New Virtual Disk Wizard. They didn't warn that a dynamically expanding VM would be slower, so I went with that option. I called this new VM "Test." But when I was done, all I had was a second line, "Test," following the .vmdk file. I killed the Virtual Media Manager and tried the Machine > New menu pick. This gave me the option of choosing to use an existing hard disk. I chose that, and specified its default, which was the .vmdk file I had already added. This gave me a screen that showed my "Test" machine as being powered off. Its size and everything looked right. I clicked Start. This gave me a dialog box whose frame indicated that Test was running. But the box itself was black. I chose its Reset option and saw that it must have been running Windows XP, or trying to, because now I got that option that Windows gives you when you crash your system: did I want to reboot normally, or go into Safe Mode? I chose the latter. This gave me the usual list of drivers, or whatever they are, that WinXP is installing, down to the Mup.sys and agp440.sys items. And there it froze. So my new Test machine was indeed trying to load and run WinXP, when it gave me that black screen; but it just wasn't able to run. I started looking through the menu picks that VirtualBox offered me for that Test machine. There were three main menu options: Machine, Devices, and Help. Under Devices, I saw that there was the option to Install Guest Additions. This, I vaguely recalled, was like VMware Tools. Maybe that was the problem. So while the WinXP startup into Safe Mode was still frozen at the agp440.sys line, I selected that. Instead of getting information about the Guest Additions, I got a screen called VirtualBox - Guru Meditation. It said, "A critical error has occurred while running the virtual machine and the machine execution has been stopped." It went on to suggest that I consult the VirtualBox Community webpage. There, the only meaningful option was the Forums webpage, and there I selected the forum on Windows guests. But searches for posts on "critical error has occurred" or on "safe mode" did not turn up any helpful advice. I tried a Google search for those terms across all forums and got lots of hits. In one post, the solution was to repair the WinXP installation by booting from the WinXP installation CD. I killed the VM, inserted that CD, and clicked on Start again. I had to hit F12 to get the boot menu, when it was first starting up, and then I hit C on the keyboard to choose booting from the CD. But this gave me "FATAL: Could not read from the boot medium! System halted." A Google search for that phrase led to another thread involving a rude reply to a newbie by the same "seasoned veteran" ("Sasquatch") as above. As I went on, I saw more of those, and started to wonder whether VirtualBox was still in the private-club phase of development. Someone's post pointed me toward the VirtualBox FAQs, but those didn't seem to address this issue. After another reset and the same result, I went into VirtualBox's Machine > Show Log option. I noticed that, if there was no VM dialog open, the log ended with "Changing the VM state from 'DESTROYING' to 'TERMINATED,'" but if there was a VM running and hung, the log ended with "Guest Log: BIOS: int13_harddisk: function 02, parameters out of range 0000/0000/0001!" if it hung while attempting a Normal or Safe Mode boot of WinXP; but if the system hung while attempting to boot from CD, the log ended with "Guest Log: Could not read from the boot medium! System halted" and, slightly before that, "CDROM boot failure code : 0004. (I had to Refresh or Close the Log Viewer to get it to show this. The most recent log, in the Log Viewer, was named VBox.log, as distinct from VBox.log.1, VBox.log.2, etc.) Not getting solutions from the VirtualBox forums, I tried a Google search across multiple sources. One of the webpages turned up in that search was my own post from the previous year, where I had been stymied by the same problem. Another post said that you can't leave VM Tools installed in a VM that you're bringing over from VMware. So what I had to do was to fire up VMware, open a VM, remove Tools, save the VM, and then repeat the foregoing steps to make a new version of the Test VM for VirtualBox. Ah, but there's many a slip 'twixt cup and lip. I started VMware Player and tried to start the VM from which I had copied Test. Player said I had "insufficient permissions to access the file." I went into Terminal and typed "sudo nautilus," so as to check the permissions, but for the first time ever, I got "ray is not in the sudoers file. This incident will be reported." I tried using Player to open another VM, but it froze. In Workstation, I tried the same things with those same VMs and got the same results. I found some advice on how to fix the sudoers issue. The advice was basically as follows: (1) Restart the computer and choose the Recovery Mode option from the GRUB menu. (2) Choose the root ("Drop to root shell prompt") option. (3) Type "adduser ray admin" (without the quotation marks), where "ray" was the username I wanted to have working again, and hit Enter. (4) Type "exit" and resume a normal boot. (Those instructions also addressed some other options that didn't apply to me.) When Ubuntu had booted, I opened up a Terminal session and typed "sudo nautilus" and it worked. So now that the sudoers issue was fixed, I cloned a VM that I had just been working with, a few hours earlier, with the idea of opening that in Workstation and removing its VMware Tools. Meanwhile, I had seen a couple of references to the User's Manual, which was available in PDF or online form at the Downloads page. In PDF form it was 261 pages. The online version presumably didn't have any references to the error messages noted above, else it would have come up in the searches cited above; or perhaps it did come up, but was far enough down in the results list that I didn't notice it. Ditto for the How-Tos and tutorials. But now that I had a specific culprit - namely, VMware Tools - I searched the manual for particular references to that. But there weren't any references to it. There also didn't seem to be any solutions for the particular problems I was having in the Troubleshooting section. So it seemed I had saved quite a bit of time by not reading those 261 pages. By this time, the clone was done. I powered it on in Workstation and, when it was fully up and running, went to Control Panel > Add or Remove Programs and removed VMware Tools. I shut down the clone VM and restarted VirtualBox. I went through the steps, above, to open that VM in VirtualBox. Unfortunately, I got the same outcomes as above. So having VMware Tools installed was not the issue, or at least not the only issue. I had come across a post in which someone said they had enabled PAE mode. I wasn't sure what this was all about, so I went through the various possibilities in VirtualBox's Machine > Settings menu pick. Among other things, while I was there I noticed that I could set the boot order here, and that the options (e.g., booting the CD-ROM before the hard drive) were clearer than those provided by using the F12 option at bootup. I found the PAE option pretty quickly: it was under System > Processor in the Settings dialog. The tooltip that came up when I moused over that option said, "When checked, the Physical Address Extension (PAE) feature of the host CPU will be exposed to the virtual machine." I had not a clue as to what that meant. Another poster said they had also enabled Nested Paging, which I found there in the Settings dialog under System > Acceleration. While I was there, I went on through the Settings and changed several other things, notably giving 64MB of RAM to the video. I started the new VM and, when Windows gave me the option, I selected Safe Mode. Unfortunately, it froze once again, so it seemed I hadn't found the solution. That froze again, so - now that I had changed the boot order to prioritize the CD-ROM drive - I restarted the VM. But the bootloader still ignored the CD-ROM, so once again I reset the system and, this time, hit F12 during the splash screen to give me the boot device selection menu. I chose the CD-ROM and, once again, I got the FATAL message quoted above. Well, there was always the option of installing Windows XP from scratch in a new VM. I had a 64-bit WinXP CD, so I went through the setup sequence for a New virtual machine. This time, I told it to create a new 25GB hard disk instead of using an existing one, and call it P4VB. It created the P4VB virtual machine in the /home/ray/.VirtualBox/HardDisks folder. When I looked, that .VirtualBox folder was also the home of a Machines folder. I didn't want these things there; I didn't have enough space on that drive for several VMs. According to one post, this was easy enough to solve: just move the folder and then go into VirtualBox (which apparently some people also call VBox or VB) and select File > Preferences > General. But it looked like people had had some problems with that, so instead of moving I copied (rather than moving) the .VirtualBox folder to the new location. Then I double-clicked on the P4VB VM, there in VB, and changed those folder location settings. I finished that and then double-clicked on P4VB again. Now, to back up for a moment. When I had finished creating the new VB VM, where I was going to install 64-bit Win XP, VB got me started automatically in a wizard that was going to help me set up my hard drive. I wasn't ready for that right then, however - I wanted to finish the move process (above) while it would hopefully still be simple to do so. But now that I had finished the move, I wondered if I could get that wizard restarted. But after double-clicking on P4VB, what I got instead was a dialog box that said this:

VirtualBox - Error VT-x/AMD-V hardware acceleration has been enabled, but is not operational. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot. Please ensure that you have enabled VT-x/AMD-V properly in the BIOS of your host computer.
That didn't seem like something that the wizard would have fixed. I clicked "Continue" to see what would happen next. The answer is: Nothing. I was back at the VB basic screen, but now the note under P4VB said "Aborted" instead of "Powered Off." With P4VB highlighted, I chose Settings. Going down through the various Settings possibilities, I re-enabled PAE/NX and Nested Paging (above). I changed it to have 2 CPUs, since I had a dual-core processor. I gave it 64MB of video RAM and enabled 3D acceleration. I told it to mount the CD/DVD drive and use the VBoxGuestAdditions.iso image file. I tried starting the VM again, but I got this:
VirtualBox - Error VT-x is not available. (VERR_VMX_NO_VMX). Unknown error creating VM (VERR_VMX_NO_VMX).
So this was apparently the time when I needed to change the host BIOS as described in the previous error message (above). I shut down everything and restarted the computer. I didn't see the needed option in the CMOS Setup Utility for my BIOS, but another post suggested that maybe support for VT-x would be available after I updated the BIOS. I checked the manufacturer's webpage for my Gigabyte motherboard. There was indeed a BIOS update. I flashed the BIOS and took another look at it. About this time, I realized that I was looking (as shown above) for AMD-V, not VT-x (the Intel counterpart to AMD-V). So, as the saying goes, I wondered why the Frisbee was getting bigger, and then it hit me. AMD-V was short for AMD Virtualization, and "Virtualization" was the first option in the Advanced BIOS Features page in my BIOS setup. I dunno - I guess it had seemed too obvious. But now I was really ready. All I had to do (maybe) was switch it from Disabled to Enabled - the latter being described, in the sidebar, as "Hardware assisted Virtualization Technology which help improve performance of system running Virtual Machine Softwares." Exactly what I had been looking for all along. Jeez. But, OK, on with the show. I saved the BIOS change and booted the system. Back into VirtualBox > Settings. With everything set as I desired, I saved out and started the P4VB virtual machine again. New error: "FATAL: No bootable medium found! System halted." No surprise there: I hadn't installed WinXP x64 yet. Time to do that. Now, here was where I had made a mistake. I had set the settings to run the VBox Guest Additions ISO file on the CD drive. What I really wanted, first, was to install the WinXP CD in the host CD drive. So I fixed that, inserted the WinXP CD, and tried again. It ran Windows Setup. I installed the Guest Additions. Now the VB Machine > Auto-Resize Guest Display option worked; WinXP filled the whole screen. I was able to activate Windows. I ran Windows Updates. The first update that I needed, it said, was Service Pack 2 for Windows XP Professional, x64 Edition. But it didn't actually do anything. It said it was downloading, but hours passed and nothing happened. I was able to download other files in the meantime, but nothing doing in Windows Update. Trying again, I selected everything else that I could except Service Pack 2. When that was done, I tried again on Service Pack 2. Now it was willing to be friendly, and I was able to continue installing other updates. While that was going on, I was looking into how I could get access to my data partitions in VB3. David Hodgins pointed out that there were sharing and raw mode options. Raw mode seemed to mean having complete and direct access to the hard drive. It was covered in section 9.10 of the help manual included in VB (Help > Contents > Sun VirtualBox > Advanced topics > Using a raw host hard disk from a guest). Sharing was more familiar; it seemed to be what I had been doing in VMware. It was covered in section 4.6 of the manual (Help > Contents > Sun VirtualBox > Guest Additions > Folder sharing). To set up these shares, I proceeded as follows:
  1. In Windows XP inside my P4VB virtual machine, I went to Start > Run > compmgmt.msc > Enter. This opened up Computer Management. There, in Storage > Disk Management, I right-clicked on the CD-ROM drive and changed it to drive Z. Since I had installed the VB Guest Additions, and since the Guest Additions pretended to be running from the CD-ROM drive, this changed them to drive Z as well. I closed Computer Management.
  2. In the outer frame where VirtualBox was running (i.e., not inside the Windows virtual machine), I selected Devices > Shared Folders > Machine Folders, and then clicked on the +folder icon at the right side. This opened up the Add Share dialog. In the Folder Path box, I navigated to the hard drive partition I wanted to add as drive D inside my WinXP VM. (Drive C, of course, contained the virtual machine's Windows program files.) I clicked on "Make permanent" and then OK.
  3. I closed the Shared Folders dialog and opened Windows Explorer and went to My Network Places > Entire Network > VirtualBox Shared Folders. I saw that the partition I had just selected as a share was now listed there. (If it's not listed, hit F5 to refresh the view.)
  4. I wanted that shared partition to appear under My Computer, just like drive C and any other normal drive would be. So I right-clicked on it and chose Map Network Drive. This opened the Map Network Drive dialog. I clicked on the drop-down arrow for the Drive box and selected D (which was free, now that I had reassigned the CD-ROM). Leaving "Reconnect at logon" checked, I clicked Finish. To test it, there in Windows Explorer, I opened up drive D under My Computer and, sure enough, I could create and delete files, just like normal. I hit F2 to rename it as needed.
I repeated steps 2-4 for each hard drive partition I wanted to have visible in this VM. This was much like the procedure I had used to share partitions in VMware. At this point, VB was extremely slow in the process of downloading Windows updates; it was also extremely slow when I tried to move files. I rebooted the virtual machine, thinking that maybe it needed to clear its head after that drive-mapping exercise. It did help, but it was still very slow. It seemed that this problem had been around for a long time and was not going away soon. So it looked like I had better investigate the alternatives. Samba sharing seemed to be a faster way of sharing network drives (i.e., these other partitions on my computer). I figured I had better undo my present sharing before proceeding with the Samba approach. I wasn't sure how to do that, so I just did it in reverse order from what I described above: first, right-click on the partition shown under My Computer in Windows Explorer and choose Disconnect for each partition, and then go into VB's Devices > Shared Folders and click on the -folder option for each shared folder. Then, in Nautilus (with the left panel set to Tree view), I went to File System > media. In the right panel, I right-clicked on the first partition I wanted to share and chose Sharing Options. I clicked on "Share this folder" and then on the "Install service" button. I got a dialog saying something about restarting my session, but when I clicked to go ahead with that, instead I found myself back at the Folder Sharing dialog. There, I clicked on Create Share. It said it was going to set up sharing automatically, but then I got an error telling me, "You do not have permission to create a usershare." I fiddled around with this for a while and then tried a very clear tutorial on setting up Samba shares on Ubuntu. Like so many things in life, it went smoothly but did not seem to accomplish anything. While I was waiting for the last of the Windows updates to be downloaded and installed, I fired up VMware Player again. Alas, its audio was still not functioning properly. So when the Windows updates were all installed in VirtualBox, I decided to try again on the sharing approach that used VB's Shared Folders dialog (steps 2-4, above). I thought maybe that would be faster now; maybe I had inadvertently slowed things down by attempting to set up shares while Internet Explorer was downloading (it hadn't even gotten to the point of installing) various Windows updates. I had been moving some files around in Windows Explorer, so I went back to that task. I found it was a little faster now. There was a problem where I could not select multiple files in Windows Explorer using Ctrl-click; it didn't work normally. Then I realized that the right Ctrl key was the default key for moving the cursor outside the Windows VM, so that it could be used in the VB frame. I went into File > Preferences and changed it so that the right Winkey would do that job instead. But VB with sharing remained so horribly slow that I just could not imagine using it. Actually, it was not just a sharing thing: the process of using Windows Update via Windows Explorer was also extremely slow and seemed to freeze several times, whereas I hadn't been having that problem in VMware on the same computer. I posted a question on using Samba shares. I got a response, but by that point I had gone back to using VMware instead of VirtualBox, at least for the time being.

Thursday, July 31, 2008

Virtualization Options in Ubuntu (cont'd)

As described in previous posts, I had been researching and experimenting with virtualization tools in Ubuntu Linux. Virtualization tools, including VMware and VirtualBox, would allow me to run Windows XP as a guest operating system within a virtual machine running on an Ubuntu host. I would have the stability and online security of Linux, as well as the convenience of being able to run programs in Windows if I could not find satisfactory Linux counterparts. If Windows got flaky and crashed, it would crash only itself and the programs I was running on it within the virtual window; the underlying Ubuntu operating system would be unaffected. To review: the decision process thus involved seeking suitable Linux replacements for Windows programs; using Wine to enable Ubuntu to run some Windows programs for which there were no satisfactory Linux replacements; and using a virtual machine to run Windows programs that could not be replaced by Linux counterparts and that also could not be made to run satisfactorily on Linux via Wine. I had made a basic Windows XP installation as a dual-boot arrangement on my primary computer, and had used VMware Converter to make a virtual machine from that WinXP installation. I had then added some drivers and a few other adjustments to the basic WinXP installation, and it seemed it might be helpful to make another virtual machine from that revised form of the WinXP installation. I had not downloaded and installed Windows updates because they had previously seemed to make the system slow and unstable. I would have done so if I had been planning to continue working in the Windows dual-boot environment; but since I planned to use Windows within the virtual machine on Linux behind hardware and software firewalls, I was not especially concerned about the additional security that Windows updates might have provided. Of course, I could add those updates later if it seemed prudent to do so. In experimenting with VirtualBox, I had noticed that it was handling file movement tasks in Windows Explorer (inside the VBox virtual machine) very poorly. I was also could also not figure out how to gain access to my hard drive partitions; it seemed that everything I wanted to work on needed to be in the virtual machine. Since I had my files arranged in many directories and did not want to be dragging them back and forth to the virtual drive every time I wanted to access them, I gave up on VBox and returned to VMware. I had previously experimented with VMware Workstation 6.0, which had generally impressed me and was available for $189. Now I tried VMware Server, which was free but which, like VBox, did not seem to have the ability to let me work with files on my hard drive partitions. I wondered whether this was a limitation of Server 1.0. Server 2.0 was in beta testing and was reputed to be unstable. I was not sure when Server 2.0 would be sufficiently reliable to use, or whether it would resolve this problem. A second concern was that Server lacked Workstation's ability to make clones and multiple snapshots of virtual machines, so as to facilitate the adding of various programs to various virtual machines. Since doing that review, I had seen that quite a few people were using VBox and seemed happy with it. It seemed likely that, with additional adjustments, I too could have a better experience with it. So I went ahead and re-ran VMware Converter, to capture a virtual machine that would include the drivers and additional adjustments I had made to my basic WinXP installation on drive C of my primary computer. This time, I also used Drive Image 2002 to make a backup of it. In both the drive image and the virtual machine, this time I included drive D as well as drive C. I had long used Drive D to hold things relevant to drive C. One example: the I386 folder. This was a folder of Windows program files. When updating or reinstalling stuff on drive C, sometimes Windows would want to refer to things in the I386 folder. Normally, that folder is found on the Windows CD; but it was also possible to copy it to your computer somewhere. I didn't want to re-copy it to drive C every time I reinstalled Windows, so I put it on Drive D instead. Drive D also held a folder containing programs that were installed on a standalone basis, independently of the WinXP registry. That is, I did not need to reinstall these programs each time I reinstalled Windows; I just needed to keep my shortcuts that pointed to them, and put those shortcuts back into the Start Menu at the appropriate place. So, of course, Drive D also held a copy of my Start Menu, customized to put program shortcuts in categories that I found more accessible than the jumble in which Windows left them. I got unnecessary things off drive D, ran chkdsk /r on both drives C and D from the WinXP CD Recovery Console, resized drive D to be 2GB using GPartEd, rebooted into WinXP, and ran VMware Converter. The advantage of including drive D was simply that the aforementioned items, including the I386 folder and my permanently installed utilities on D, would hopefully now always be available within the virtual machine. The Drive Image process did not actually work. When I started it, I got error #1529, "Information mismatch in directory entry." I was not able to fix this. CHKDSK in the WinXP Recovery Console did not do it, nor did shutting off S.M.A.R.T. in BIOS or rebooting and letting Windows clean itself up. I tried using the Acronis True Image CD to make an image of the system, but the trial CD that I burned from the download was not able to do that. I had already put TrueImage in my shopping cart, but it would be several days before it arrived. So I took a pass on the drive imaging for now. When VMware Converter completed making the virtual machine, I had the predictable 12GB VMDK file. Now, what to do with it? I rebooted into Ubuntu and returned to VMware Server, to try once more installing VMware Tools and see if that made it possible to access other drives. First, in Server, I hit "Edit host settings" and adjusted the RAM available to all VMs; but when I clicked OK, I got, "You don't have the permission to execute this operation." I had gotten that in the previous post too, but had had to deal with numerous other things at that point and never got back to it. Now, when I Googled that phrase, I got the advice to open VMware from Terminal with "sudo vmware." That did it; I was able to change the RAM setting. Now I had a new problem. When I told VMware Server to open the new virtual machine I had created with Converter, incorporating an updated version of my basic WinXP installation there on the physical drive C, I got this error message:

Unable to connect to the MKS: The config file /var/lib/vmware/Virtual Mahcines/WinXPBasic/WinXPBasic.vmx is not registered. Please register the config file on the server. For example: vmware-cmd -s register "/var/lib/vmware/Virtual Machines/WinXPBasic/WinXPBasic.vmx"
I tried exactly what they said, there in Terminal. I first had to close out of VMware Server to get a Terminal prompt. I got back an error: "No such virtual machine." Oops. After creating the virtual machine on another drive when I was using Converter in the Windows XP dual boot, I had copied the three WinXPBasic files (WinXPBasic.vmdk, WinXPBasic.vmx, and WinXPBasic-flat.vmdk) to the wrong folder. I put them in the right folder and tried again. Now Terminal said, "Virtual machine already exists." OK, so I ran "sudo vmware" again. It opened, with an error message about user preferences. I closed it and opened it again. I closed it by using the Start > Turn Off option in Windows. It was slow. When I started it back up again, I got this error message:
Cannot open file "/home/ray/.vmware/preferences": Permission denied. Unable to read user preferences.
But meanwhile Windows was starting up anyway. But I guess because of that message, it hung at "Loading your personal settings." I shut down the virtual machine, went to the first tab there in Server, and clicked "Edit host settings." I adjusted those and started the virtual machine again. Now I got this:
Warning Could not get interface flags for vmnet1: No such device Virtual device Ethernet1 will start disconnected.
I okayed that. Next, I got the error message about user preferences again. WinXP here on teh virtual machine was definitely booting much more slowly than it had done in dual-boot mode on the physical drive C. VMware said,
Your display driver has changed, The Auto Rotation feature needs to reinstall the rotation driver. If this message reappears, please update your display drivers. Would you like to re-install now?
I clicked yes. Meanwhile, Windows was recognizing all kinds of new hardware, including not only the CD-ROM drive but also all that stuff that I had installed drivers for when I had revisited the basic physical Windows XP installation. There must have been 20 things that it recognized, all at once. There weren't messages that there were problems with any of them. So apparently it was a good idea to have installed the device drivers in the physical installation before using Converter to make the virtual machine. But then it still wanted to work through the Found New Hardware wizard for several items. There were a couple of reboots thrown in. I didn't recall it being such an involved process previously. I was getting a notification, after each reboot, that my video drivers had failed or needed to be update -- something like that. As soon as things settled down, I went to VM > Install VMware Tools. As before, nothing happened. I waited 10 or 15 minutes, and I was still getting "You do not have VMware Tools installed" on the status bar at bottom, and "Cancel VMware Tools Install" on the VM menu. Finally I did cancel, and then rebooted and tried again. Same thing. As noted previously, I had been hoping that the installation of VMware Tools would permit folder sharing, because without that, there was no hope for VMware Server. I completely exited VMware Server and started it again. Meanwhile, I researched the "Unable to read user preferences" message, above, and found an answer that made sense:
Often if you run apps as sudo, root will own the config files instead of your user. That could be the case here so, try running: sudo chown -R peter:peter /home/peter/.vmware And then starting via the menu item and not with sudo.
So, who knows? I was thinking, maybe that's why VMware Tools wasn't installing too. I entered the recommended line into Terminal, substituting my name for peter, and then restarted VMware Tools from Ubuntu's Applications > System Tools. I had now reached a point where there were no more error messages upon starting VMware Server, except one:
Your display driver has changed. The Auto Rotation feature needs to reinstall the rotation driver. If this message reappears, please update your display drivers. Please re-install now.
When WinXP reloaded, I tried again on VMware Tools. Someone else had had the same experience as I had previously: try and try and then, for no particular reason, suddenly Tools begins to install. I thought maybe I could help it along by fixing that video driver error message. Device Manager was showing one yellow exclamation mark circle, next to the Video Controller (VGA Compatible). Oddly, the NVIDIA nView Desktop Manager icon was not appearing in the system tray, here in the virtual machine, so I had to start it via Control Panel. I right-clicked and uninstalled the Video Controller in Device Manager, and then rebooted the virtual WinXP installation. The Found New Hardware Wizard came up, along with that notice, just quoted, about how my display driver had changed. I tried running through an automatic installation in the Wizard, as I had done before, and this time (unlike previously) it presented me with three VMware SVGA II options. So in the case of the video driver, perhaps, it had been counterproductive to install before creating the virtual machine; it seemed that VMware Server would still need to install its own video driver. I chose the first one of the three. Meanwhile, Device Manager was now showing the yellow exclamation mark again, under Display Adapters. The first of the three did not install successfully: I got "Driver is not intended for this platform." So I uninstalled from Device Manager, rebooted, and tried another one. The one I had tried was no longer first on the list; it and the others had been moved down by the arrival of a new no. 1 (there were four now). The first three were version 11.2.0.0 of the VMware SVGA driver; the last was version 10.7.0.0. So I tried the last one. That didn't work either. I had already inserted the EVGA CD for my video card during the initial attempt at installation, and that hadn't worked; but now I inserted it again, so that I could run its setup program. Unfortunately, there was no access to the CD drive. I looked at VM > Settings > Hardware, and saw that the CD-ROM drive was set to "Auto detect." I would have tried installing an updated version of the driver, which I had saved on drive D of the physical installation; but all I had here for drive D was an unformatted disk with nothing on it. Interestingly, though, I saw (in Windows Explorer) that I also had a drive E, "VMware Tools." It had a Setup.exe file, so I ran that. And, what do you know, VMware Tools began to install. I wondered if it would have run automatically if I had enabled autostart for my CD, or if I had allowed active content for programs. But anyway, now I went through the VMware Tools installation, choosing the "Complete" option. I restarted the system as recommended. Things were now much improved. The screen fit properly; the mouse worked properly. I still had that error message about needing to re-install my display drivers; but now I also had access to the CD-ROM drive, so I could take a stab at getting those drivers installed. This effort terminated, however, with this message:
The NVIDIA Setup program could not locate any drivers that are compatible with your current hardware. Setup will now exit.
I had not gotten that message when installing these same drivers in the Windows dual-boot partition on drive C, so apparently what the CD was not finding was a driver that would work in the VMware environment. With the aid of the manual, I did find a way to come close to sharing the physical drive partitions. I powered down the virtual machine and went into "Edit virtual machine settings" > Hardware > Add > Hard Disk. I chose "Use a physical disk (for advanced users)." Unfortunately, I got a "Permission denied" message when I pursued that option. The VMware Server Virtual Machine Guide shed no additional light. I exited Server and started it in Terminal with "sudo vmware," and then repeated these steps. This time, it worked for the first drive, but not for the drive on which the Ubuntu program and swap partitions existed -- even though I was specifically not trying to include those partitions, but was instead focused on another partition on that drive. Instead, I got this message:
The partition table on the physical disk has changed since the disk was created. Remove the physical disk from the virtual machine, then add it again.
But adding it again brought the same message. So Server was able to see hard drives 1 and 3, but not 2. I tried opening the virtual machine and got that error message about permissions. I closed VMware and restarted it from Applications > System Tools rather than from the Terminal command line. I immediately got "Insufficient permission to access file." Along with the "advanced users" notice, I had received a notice that this whole technique could cause loss of data. I was not comfortable with it. I decided my confidence level in this Server product was not sufficient to justify that kind of risk, now or at some worst-possible time in the future. By this point, I had come across one of my own posts from a year earlier, in which I had experienced some of the exact same issues with VMware Server that I had experienced on this day, a year later. Server 1.0 appeared to be more or less the same software from a year earlier. Granted, VMware was working on Server 2.0, but that pace of progress did not suggest rapid improvement in Server. So that was the end of Server for me. Time to uninstall! I went into Ubuntu's System > Administration > Synaptic Package Manager, but VMware Server wasn't listed there. I was advised to try this command:
sudo vmware-uninstall.pl
and that worked. Goodbye Server! Next, I wanted to try again in VirtualBox. I started it and navigated to where the VMware Server virtual machines were stored. It took a couple of tries to find the right one -- Server seemed to have multiplied them. I got lucky when I chose the oldest one, which was apparently the one I had created with Converter. But when I tried to Start it, I got this:
Failed to start the virtual machine WinXPBasicVB. The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect.. VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE)
The recommended solution to this one was System > Administration > Users and Groups > Unlock > Manage Groups > vboxusers > Properties. There, I clicked on my name, closed out of everything, closed VBox, and rebooted Ubuntu. That solved the problem much more easily and intelligibly than had been the case in my previous try at it -- though admittedly I had seen so many error messages, by this point, that I was losing track of which ones I had solved, or how. Anyway, it developed that none of the VMDK files would work -- Server seemed to have modified the original one and created others -- so I booted back into native WinXP, ran VMware Converter again, and this time made a point of keeping a copy of it. This time, too, I made a version for Workstation 6 and added VMware Tools to it. I was curious whether that would be better or worse for VirtualBox, and I also thought I might still try opening it in VMware Workstation. I went back into Ubuntu > VirtualBox and set things up pretty much as before. When I started the virtual machine, nothing happened. I had a black screen. Eventually, I got this:
A critical error has occurred while running the virtual machine and the machine execution has been stopped.
I clicked OK and tried starting again. This time, I got the white-on-black Windows boot screen that gave me the option of booting into Safe Mode. Then it froze. I killed it and tried again. This time I just let it count down 30 seconds so that it would then try to start Windows normally. Again, nothing happened. I tried again, and this time sent it into Safe Mode. That froze too. I went through its settings and deselected everything (e.g., SATA controller), most of which I had just selected a few minutes earlier. Rebooting into Normal Mode once again yielded a critical error message. I Googled it and got this advice:
write in terminal: uname -a if the output is: Linux gourgi 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 GNU/Linux then i think you need amd64.deb
The emphasis, printed in red, was on the _64 in that output line. This is what I got. So I needed amd64.deb to go with my 64-bit processor and/or my 64-bit Ubuntu. Now, what was amd64.deb? It developed that this was the 64-bit version of VirtualBox. That sounded familiar. I checked my notes and, sure enough, I had installed my version of VirtualBox through Synaptic Package Manager because I was frustrated with the Java installation process at the Sun download webpage. Ironically, I had downloaded the 64-bit version anyway; I had just done the Synaptic approach because it seemed easier. So now I uninstalled VirtualBox through Synaptic, along with the qt3-assistant program I had installed to help somehow with the VBox installation. I right-clicked on the 64-bit VBox Debian file I had already downloaded and clicked Install Package. It finished installing without difficulty. Now, how to start it? There was no icon for it in Applications, and when I typed "virtualbox" or "vbox" at the Terminal prompt, I got indications that it wasn't installed. I right-clicked and reinstalled. I had previously noticed, and now I noticed again, that a sort of rotary sawblade icon was appearing at the top right corner of the screen, and when I moused over it, its tooltip said, "A package manager is working." So I waited for that to finish. This time there was an icon under Applications > System Tools. When I started the virtual machine, I let it go once again through its 30-second startup to "Start Windows Normally." This, however, was not the solution. Once again, I got that "critical error" message. Safe Mode didn't work either. I wondered if the problem was that I had created the virtual machine for Workstation 6 rather than Workstation 5. I couldn't readily find a website that would tell me, so I just rebooted into WinXP and ran Converter again, so that now I had the latest version of the drive C installation in both Workstation formats. But that wasn't it. The Workstation 5 version of drive C didn't run in VBox either. It just sat there, black, until I clicked the mouse inside the box. Then, eventually, it gave me the critical error message again. Somebody advised renaming ~/.VirtualBox/VirtualBox.xml (~ means /home) so that VBox wouldn't see it. I did that and then restarted VBox. It started over from the beginning, asking me to register my copy of the software etc. I tried again to run the Workstation 6 version of my virtual machine. I still got a black screen. As before, I tried Devices > Install Guest Additions right away, but nothing happened. I still got the critical error message. So this was not the solution. After viewing a number of webpages, I came to the conclusion that the critical error message could be caused by any number of things. I had also come across a posting by someone who had made a mistake and now had no sound and other problems with his/her system. This was not the direction I wanted to be going. I liked the idea of free software, and I was impressed that a number of people were having good experiences with VBox. But I wasn't. So it was time to return to VMware Workstation 6. It was the only thing that had worked well for me so far. I had since thought that its deterioration might have been due to a failure to install VMware Tools before activating Windows. But using Converter, I had now created a Workstation 6 virtual machine that did have Tools installed. So I thought I would give that a try in Workstation and see how it fared. That discussion continues in another post.

Sunday, July 27, 2008

Virtualization in Ubuntu: VirtualBox or Wine Replacing VMware?

In previous posts, I have described the process of installing Ubuntu Linux and becoming familiar with a Windows XP running in a virtual machine (VM) guest on an Ubuntu host, and of coming around to the point of favoring several smaller WinXP VMs rather than just one big VM. (Many of the terms and issues taken for granted in this post have been explored at length in those previous posts.) Now it was a new day, and I wanted to try to put together what I had learned into a working system. To review, the basic concept was as follows. I had two computers. On my primary computer, I had installed WinXP and Ubuntu on a dual-boot system. I had found, unfortunately, that the dual-boot approach led to boot complications. It occurred to me that I really didn't need to make the primary computer dual-booting, because the secondary computer was also capable of dual-booting. If I had a need to boot into native Windows XP, I could use the secondary machine. Making the primary machine a monobooter -- a purely Ubuntu machine -- would also mean that I could leave it up and running for days, just hibernating it at night. Hibernation was working very reliably on Ubuntu, so far, and that way I would be almost instantly back at where I left off when I started work again each new day. I had already installed WinXP on the primary machine when I came to this monobooting decision, so I decided to leave that basically functional WinXP installation in place, but I used the GPartEd CD to hide that Windows partition. In a real pinch, I could unhide it and boot it, probably; but I didn't expect to need it very often. In Ubuntu on the primary machine, I would then install VMware and would run virtual machines. I would use several of them, instead of just one, so as to make them smaller and free up more system resources when I did not need a particular WinXP program. So, for example, I might have a VM for Adobe Acrobat and Microsoft Word since I tended to use both of those programs together, but might then have a separate VM for Adobe Premiere Elements, the video editing program; and when I was trying to work with video, I might close down the Acrobat/Word VM. Each VM would come equipped with the basics, including Internet Explorer (preinstalled with Windows), printer support (hopefully; I had not worked through that yet), and other basic tweaks and tools. At most, I would probably have three or possibly four VMs running at once. It remained to be seen whether this would require an upgrade in my processor and/or RAM. On the secondary computer, meanwhile, I would be dual-booting Ubuntu and WinXP. I would install 32-bit rather than 64-bit Ubuntu, mostly for purposes of variety, and at some point hopefully I would run VMware Player, so as to use the virtual machines created on the primary computer. So now I wanted to start over with a new 64-bit Ubuntu installation on the primary computer. I assumed, that is, that I would need to do a new installation, because the boot problems caused by my attempt to dual-boot seemed to have screwed up the GRUB bootloading program to the point where I could not get it to run properly, and also because the Ubuntu installation was not running Firefox properly and I had not been successful in my attempts to uninstall and reinstall it. Reinstalling Ubuntu was simple enough, so I felt I would probably do it in any case; but just out of curiosity, now that I had hidden the WinXP program partition, I tried rebooting the system to see whether Ubuntu would now be able to start. It wasn't. Instead, I got a WinXP "autochk.exe not found" error. This seemed to be a common, expected response when the Windows boot partition was hidden. I proceeded to reinstall Ubuntu on the primary computer. I was disappointed to see that GRUB did continue to register the existence of a Windows XP installation. But it defaulted to Ubuntu after a few seconds, so it didn't seem to matter. I didn't try to see if it would actually load WinXP in its hidden partition. Instead, I logged into Ubuntu and easily installed program updates and NVIDIA 3D video drivers. Now that I had gotten this far, I retired a bunch of tabs I had open in Firefox on the secondary computer, having to do with dual-booting and fixing your boot manager, as discussed in the previous post: EasyBCD, Mepis, WinGRUB, and other boot managers, as well as advice on restoring your WinXP boot loader from Linux, fixing GRUB, and so forth. Hopefully I wouldn't be needing them. Following advice on how to uninstall Firefox 3 and install Firefox 2, I entered these commands in Terminal:

sudo apt-get remove --purge firefox sudo apt-get install firefox-2
That didn't work. Firefox Help > About said I was still running version 3.0.1. Ubuntu's System > Administration > Synaptic Package Manager said I was running both Firefox 2 and 3. Following other advice, I used Synaptic to uninstall everything that was Firefox-related, and then (using Ubuntu's File Browser) went into File System > Home/ray (i.e., the file for my user name, which was "ray"). There, I selected View > Show Hidden Files. This enabled me to see the hidden .mozilla folder. I deleted that folder. Now the Firefox icons were gone from the bar at the top of the Ubuntu screen, and also from Applications > Internet. Then, using Synaptic Package Manager, I searched for Firefox and installed firefox-2 and firefox-2-gnome-support. It installed. The acid test was that I could run Firefox and it was able to install the very useful Tab Mix Plus. I installed my other preferred Firefox 2 add-ons. Then I installed VMware Workstation 6, using the Workstation User's Manual and following the steps I had worked out in my first post in this series. Now I wanted to do a backup of my Ubuntu installation so far. I had previously thought I would use PING for this purpose, but I hadn't liked the PING user interface or functionality. There had been some behavior that had not seemed stable. So I wanted to try something else. Acronis True Image had sounded good, but apparently it required a Windows installation, so that was out. Same thing with Paragon Drive Backup. There were server versions of both programs, and they might have worked, but they cost hundreds of dollars. Among the numerous freeware and paid backup solutions cited by many webpages, I ordered the house special: Simple Backup Suite, a/k/a Sbackup, which I could get directly through Applications > Add/Remove and which seemed much, well, *simpler* than a command-line solution like rsync, and disturbingly less complex than Charley Curley's Linux Complete Backup and Recovery HOWTO. I was concerned that I would discover the wisdom behind Mr. Curley's comprehensiveness in the worst possible time and way, but Sbackup really did seem to have been designed for, as they said, ordinary desktop users. So I followed the instructions and made a system backup. Evidently I did it wrong; there was nothing in the folder I designated as the target where the backup should be created. I realized I was not comfortable with the lists of folders to include or exclude, there in Sbackup, because I really had very little idea of what these different folders (/var, /usr, etc.) were supposed to do. What I still wanted was an imaging program that would indiscriminately capture it all -- that, in other words, would restore a complete working system, period. As an alternative, I tried again to get Partition Image (also called PartImage) via the System Rescue CD, and this time I was able to figure out their download page. The recommended download command, "wget -c address," did not work, and neither did "wget -c /home," which was apparently supposed to be an option. The line under the "Downloading and Burning" heading that said, "Here is the direct download link" was, it turned out, a link for downloading wget.exe, not PartImage. Or instead of using that "very simple and reliable download tool," you could just click on another link, further down on the webpage, and get the download in that even simpler way. The download links were for x86 (i486-PC), SPARC, or PowerPC computers. I was new to software for the AMD 64-bit CPU. I wasn't sure if it was considered part of the Intel 486 line of processors. It had been some years since I had last purchased a pre-Pentium CPU that was called a 486. I basically just had to download the ISO and, after that half-hour process, burn the CD, and then try using it to see if I had the right download. I wanted the CD even though PartImage was also available for installation via Synaptic Package Manager, because I wanted something that would restore my system in case Ubuntu wouldn't boot. I rebooted with the newly burned CD and did see something encouraging about AMD64. The CD stopped with a prompt, preceded by instructions that mostly went over my head. One of those instructions said, "Type wizard to run the graphical environment." So I did that. Next, I almost chose the "Graphical desktop using configured Xvesa (should work)," which sounded like it might be more helpful than "default Xvesa (should always work)," but then I decided to gamble on "Graphical desktop using Xorg (optimal but may fail)." It didn't fail. After poking around in the nice GUI for a minute, I clicked on the image of a CD and selected System > Partimage. It gave me a graphical interface which, while not very user-friendly, was manageable. After I completed the information and gave it the command to go ahead, for a while it showed nothing happening, 0% progress, but the hard drive light was burning, so I waited; and after a few minutes, it popped up an information dialog that seemed to say my backup had been created. So I hit Enter and, no, that was just a summary of what was going to happen. Now it started creating my backup. In 5 minutes and 53 seconds, it had "successfully finished," copying 3.92GB . . . to an unknown location. I couldn't find it. It didn't go where I thought I had said it should go. Searches turned up nothing. Well, OK, I hoped at least the CD was good for restoring after a crash. I thought about trying the Synaptic Package Manager (SPM) version from within Ubuntu. But I couldn't find that either. SPM showed it as being installed, but there was no icon for it on the Application, Places, or System menus. I tried searching File System for "partimage*.*" but that, too, turned up nothing, at least not within the first five or ten minutes. ("File system," as I realized after those five or ten minutes of searching, apparently included all files on all drives. I wasn't sure how long a search of my entire computer would take.) They really seemed to want to keep this Partition Image program a mystery to the uninitiated. I would have tried searching just the Ubuntu partition for it, but apparently that wasn't an option; the search option in Ubuntu's File Browser did not seem to offer a way to search just the Ubuntu partition. I wasn't sure of the search syntax in any case; it seemed that possibly I should have been using POSIX expressions rather than the *.* syntax I had used in DOS. This inability to search raised the question of whether I could do better with an alternative to Ubuntu's default Nautilus file manager. One recent discussion thread offered recommendations for xfe, Dolphin, Thunar, PCMan, ROX, and Konqueror. Some of those were described as being designed for the KDE rather than Ubuntu's Gnome desktop environment and would therefore, it was said, be somewhat slow in Gnome. Thunar seemed to receive the most votes in that thread, so I thought I would start with that. It was said to be designed for the Xfce desktop environment. At first I tried working through instructions for manual installation, but then I remembered Synaptic and searched for Thunar there. I requested download and installation of everything with Thunar in its name, including several plug-ins. But this, in turn, was going to require installation of a number of additional Xfce-related programs. At that point, I decided to research desktop environments. According to a poll taken in early 2008, 75 of 128 Ubuntu users (59%) were using Gnome as their desktop environment, 39 (30%) were using KDE, 27 (21%) were using Xfce, and 15 (12%) were using some other environment. (Apparently some were using more than one.) The three leaders were, respectively, the default desktop environments for Ubuntu, Kubuntu, and Xubuntu. Xfce was described as a lightweight interface designed for computers with less than 512K of RAM. I had more RAM and didn't need to give up other features, so I thought I might not start with Xfce. Kubuntu was described as being "focused on including a lot of point-and-click configuration options immediately available to end users." It was possible to install either Xfce or KDE on an existing Ubuntu system, though the latter, especially, sounded like it might come with unwanted additional hassles. The differences between KDE and Gnome sounded pretty cosmetic, for the most part. I decided I was not in a rush to install the KDE desktop. Meanwhile, it was possible to make Xfce sound different and superior to Gnome and KDE in some ways. There were some signs that Xfce was not developing too quickly, though, and that there might be at least some minor adjustments required if I wanted to run some Gnome software in Xfce. To keep things simple, in light of what appeared to be relatively minor advantages, I decided to stay with Gnome, especially if I could find a Gnome-based desktop manager I liked better than Nautilus. One website said it was not a problem to install Thunar within the Gnome environment. The steps to make Thunar the default file manager seemed pretty simple. But I couldn't find any information on search capabilities from Thunar's online documentation, and elsewhere it sounded like Thunar would just use the Gnome file-search capabilities. Those capabilities included, by default, Tracker (which may have been related or identical to Metatracker). Tracker came installed and running on my Ubuntu system, as I verified at System > Preferences > Sessions and also in Applications > Accessories > Tracker Search Tool. But Tracker seemed to offer almost no search options, and something on the Metasearch page had made it sound like that program, at least, would search only my home directory. Anyway, it did not turn up the PartImage file I thought I had created, and it did not seem to be searching my NTFS drives. This was all educational, but not productive. I still needed to be able to do a drive image before I would be happy to continue with my Ubuntu and VMware installation. Wikipedia offered a nice comparison chart that made me think I should take a second look at Clonezilla. I downloaded and burned an ISO image to CD. While that was in process, I looked further for information on the search process, and concluded that the command-line options find and locate were probably the most powerful search tools available in Ubuntu. The former seemed to involve relatively complex syntax, though, and the latter depended on indexing that would happen in the middle of the night and therefore would not have a same-day creation like this backup that PartImage had theoretically created somewhere. I concluded that I probably should have just let the interminable Nautilus computer-wide search run. An alternative was to let AvaFind index my system, once I had a working Windows XP virtual machine, and use its remarkable search capabilities for the task. Later, I found that I should have gone to System > Preferences > Search and Indexing and enabled indexing. A more appealing tool was Catfish, which was said to serve as a front end for find, Tracker, locate, etc. A search for Catfish in Add/Remove Applications showed it as having only three-star popularity, but I thought I would give it a try. By this time, the Clonezilla CD was done. I rebooted the primary computer and, following instructions, tried using Clonezilla to make an image of my Ubuntu partition. I appreciated the option of making a script to automate future backups of this sort. Without that, the text-based user interface could eventually promote nasty errors, for those who weren't familiar and/or comfortable with it. This time around, unlike the experiment with PartImage (above), I did get a backup image, totaling only 1.2GB, on the target drive. Whether it would work if I needed to restore it was a question for the future. Having used about the same name for the PartImage backup as Clonezilla had assigned to its image backup, I now used Catfish to search for 2008-07-27, which were the first characters in the names of both files (that being the date). Catfish, set to use find, almost immediately found two folders of suspiciously similar name in /var/backup, which was, I think, where PartImage had said it would default to. Upon inspection, it seemed I had two smallish backup folders, the larger of which contained only about 39MB of data, there in /var/backup. I couldn't figure out how to delete them, so I just left them for now. I tentatively concluded that I would not be using PartImage for image backups, at least not until I could find a good tutorial or could otherwise figure out what I, or the program, had done wrong. I will say that, more than once in this process, I found myself wondering if there wasn't some way to make a Windows-based program like Acronis True Image work for these purposes. It belatedly occurred to me that, when they said that only Windows operating systems were supported, maybe they meant that they would only provide tech support on using True Image with Windows. After all, they did say that the product copied ext2 and ext3 filesystems. Also, as I looked more closely at their datasheet, I realized that they did offer some kind of bootable CD option. I downloaded their free 15-day trial EXE file and thought I would try installing and using it, as soon as I found myself working in Windows again. About this time, I became aware of some new virtualization alternatives. I had looked into virtualization repeatedly in previous years, and had arrived at a sense that there weren't many possibilities. Times had changed! First, during the foregoing research, I noticed that someone had mentioned that VMware offers its VMware Server product for free, in contrast to the $189 charged for Workstation 6.0, and that Server was also able to create virtual machines. A comparison of Workstation and Server yielded the conclusion that Server might be adequate for desktop needs. Moreover, it seemed that VMware was not the only company offering free virtualization products. In a comparison against VMware Server, it was suggested that Sun xVM VirtualBox "has the widest range of host system support and has the lightest hardware demands, and excels for single PC personal virtualization needs." Unlike Server, for my purposes, VirtualBox permitted the creation of multiple snapshots, like Workstation. It was suggested, moreover, that VirtualBox was a solid alternative to VMware Workstation. There was also a third alternative: there existed a website, EasyVMX.com, that would let you create virtual machines online, which you could then use in VMware's free Player program. Player, it seemed, was a pretty competent and versatile program in itself. I downloaded VirtualBox. Doing so involved installing the Java runtime environment that, in a Windows system, would have been installed with a click or two but, in Ubuntu, required a half-hour of screwing around to enter various commands. I actually called it quits for the night, halfway through this process, and continued the next day. But then the trail was cold. I got partway through the instructions and got an error message, "368: ./install.sfx.7704: not found. Failed to extract the files." It was an error message that apparently nobody in the world had experienced before, judging from the zero hits I got on a Google search for it. But then it turned out that I didn't even have to use that problematic Sun downloader. So I just downloaded the VirtualBox file. Actually, I chose the immediate installation option, instead of the download and manually install route. This meant I would probably have to download again if I had to reinstall Ubuntu again, but I had little patience for more manual installation instructions at this point. I found a nice list of BASH commands and used that to find "rm" to delete the BIN file that I had downloaded and tried to install for the Java runtime environment. Early on, I was getting the feeling that VBox was going to require more command-line work than had been the case in setting up VMware. Anyway, by this point, the installer had completed and had given me the message, "Same version is already installed." I searched Synaptic Package Manager and, sure enough, there it was. I have no idea why Sun's webpage gave all those other instructions, if it was possible to install it through Synaptic. Then again, I had not previously had an entry for Sun xVM VirtualBox in Applications > System Tools, and now I did, so perhaps the installation exercise made some sort of difference after all. VirtualBox seemed very easy to use. The first tough question was, "Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine." The choices ran from 4MB to 2000MB. They said, "The recommended base memory size is 192 MB." One writer said that the default used to be 512MB, just a few months ago, but that s/he instead chose 1024MB (i.e., 1GB). It took a little digging to find the Sun VirtualBox community forums, which are not on the Sun website itself. Once there, I went to the Downloads page and got the User Manual. On the question at hand, that manual (pp. 29-30) said,
Every time a virtual machine is started, VirtualBox will allocate this much memory from your host machine and present it to the guest operating system, which will report this size as the (virtual) computer’s installed RAM. Note: Choose this setting carefully! The memory you give to the VM will not be available to your host OS while the VM is running, so do not specify more than you can spare. For example, if your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM for a particular virtual machine, while that VM is running, you will only have 512 MB left for all the other software on your host. If you run two VMs at the same time, even more memory will be allocated for the second VM (which may not even be able to start if that memory is not available). On the other hand, you should specify as much as your guest OS (and your applications) will require to run properly. . . . So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is usually safe to allocate 512 MB to each VM. But, in any case, make sure you always have at least 256-512 MB of RAM left on your host operating system. Otherwise you may cause your host OS to excessively swap out memory to your hard disk, effectively bringing your host system to a standstill. As with the other settings, you can change this setting later, after you have created the VM.
All of which was informative and appreciated. Given that I presently had 4GB and was willing to get more, and anticipated typically running no more than three virtual machines at once, and having seen a couple of examples where 1GB was the figure that people used, I decided on 1GB for my machine too. Next, they wanted me to select or create a boot hard drive. The manual (pp. 31-32) explained that, as in VMware Workstation, a fixed-size drive would have slightly better performance than a "dynamically expanding file." The drive, they said, needed to be large enough to hold the contents of the guest operating system and the applications I would want to install -- at least several gigabytes. The setup program defaulted to 10GB, but allowed between 4MB and 2TB. I wanted to have enough space, but I also wanted to allow drive space for backups. I searched the forum for VirtualBox on Linux hosts but didn't find anything exactly on point. It did seem that several people had wanted to know how to enlarge their virtual disks. Most were smaller, but one had started out with 10GB and now wished for more. I suspected that might be a case of installing many programs just on one virtual disk, which I did not plan to do. So I went with the 10GB default. Otherwise, the description of VirtualBox virtual machines sounded much like what I had already covered (in a previous post) regarding VMware. There didn't seem to be any need to install anything like VMware Tools in the process, so in that sense this was simpler. I also found the manual and the user interface easier to understand and work with. One difference was that I now had the option of adjusting video memory, which wasn't the case with VMware. They said the default of 8MB would normally be sufficient, but I had a 256MB video card, so I upped it to 16MB. After configuring my WinXPBasic virtual machine, I tried powering it on. This gave me an error:
Failed to start the virtual machine WinXPBasic. The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect.
It now developed that I had been looking at the wrong pages in the manual during installation. The manual, a PDF document, didn't open its bookmarks pane by default when it opened, and I neglected to look for it. I think I just searched for what I needed when I first viewed the PDF, and thus skipped right by the section entitled "Installing on Linux hosts." But here we were, on p. 17: it said I would have to install some packages on my Linux system before starting the installation. Some systems, it said, would do this automatically when I installed VirtualBox; evidently Ubuntu was not one of them. I searched Synaptic for the first of the two listed packages, Qt 3.3.5 or higher, and saw that there were about a dozen qt3 and qt4 packages available. None of them were installed, and I wasn't sure which ones I needed. I didn't immediately find anything relevant in the VBox community posts, and I noticed that some of the qt3 options (presumably less bleeding-edge than qt4) listed in Synaptic were marked with the Ubuntu logo, so I started selecting those. The first one, qt3-apps-dev, wanted to install a whole bunch of additional stuff that looked related to development, which wasn't me, so I unchecked it and went for the next item, qt3-assistant. That was described as a frontend. That sounded good. I decided to install just that, and leave it at that. The second necessary package listed in the manual, SDL 1.2.7 -- a/k/a libsdl, according to the manual -- had even more possibilities. It looked like I had a couple of them installed already, though, so I decided to try running VBox again without further additions. But I still got the same error. The manual (p. 19) said, "A user can be made member of the group vboxusers through the GUI user/group management . . . ." I was not sure where that was, and a search of the manual turned up nothing. I tried the command-line alternative provided in the manual: "sudo usermod -a -G vboxusers ray," where "ray" was my username. That drew no error messages, but it also didn't solve the problem, unfortunately. I started over again in this section of the manual and noticed that Qt was required only if you wanted to use VirtualBox's main graphical user interface (GUI). Since I had SDL installed already, it seemed that I must have been using their "simplified GUI" (p. 17). So that's possibly why I wasn't seeing any options for adding group members in the GUI. So, alright, since the manual said I had to have those packages installed before starting the VirtualBox installation, I uninstalled VirtualBox in Synaptic. Qt3-assistant and libsdl were still installed in Synaptic, so I turned right around and tried to reinstall VirtualBox using Synaptic. That gave me an "unresolvable dependencies" error, "Could not mark all packages for installation or upgrade." I went back to the Sun website and downloaded VirtualBox again. The Package Installer ran, but then (once again) said, "Same version is already installed." Maybe it was, but I didn't see any option for it, now, under Applications > System Tools, so I selected "Reinstall Package." But maybe it was just a matter of closing the Package Installer, because after I reinstalled and closed it, I did see the option. I ran VirtualBox and got the same error. Then I found a thread discussing the topic, and it reminded me that I had not logged out to let the change take effect. I restarted Ubuntu and, hey, progress! This time, when I clicked Start in VirtualBox, I got "FATAL: No bootable medium found! System halted." Had I forgotten to recreate my virtual machine after reinstalling VBox? No, it was still there. But I deleted it and recreated it. After doing so, when I clicked settings, I got an error message I had gotten before but had overlooked:
Failed to access the USB subsystem. Could not load the Host USB Proxy Serivce (VERR_FILE_NOT_FOUND). The service might not be installed on the host computer.
For this, somebody pointed toward a post advising several steps. First, "edit the script /etc/init.d/mountdevsubfs.sh and activate the four lines around line 40 (Magic to make /proc/bus/usb work)." I found the script in File Browser and opened it in Text Editor. Sure enough, there was a set of lines -- not numbered, but I would have guessed around line 30, not line 40 -- that began with # signs. The # sign, I supposed, was used to "comment out" a line -- that is, to make it inactive. So I removed the # signs from the start of each line in that group of lines beginning with that phrase, "Magic to make /proc/bus/usb work." Each line changed color as I did so, there in Text Editor, which apparently meant that the lines were now active. Then I tried to save the file, but I got the error message, "You do not have the permissions necessary to save the file." So, OK, silly me. In Terminal, I entered "sudo -i" to get the permissions, then entered "cd /etc/init.d" to get to the right folder, then typed "gedit mountdevsubfs.sh" to open the file. I removed the # signs from those lines again, and this time I was able to save the file. I forgot to take the next step recommended in that thread: execute /etc/init.d/mountdevsubfs.sh start. Instead, I restarted VirtualBox and, this time, did not get the USB error message. But I still got "No bootable medium found!" I realized it made sense: I had not put my Windows XP CD into the CD-DVD drive. I did that and tried again. Still no joy. Without closing out that dialog box that gave me the fatal error, I selected Devices > Mount CD/DV-ROM and designated the "Host Drive." Then I selected Machine > Reset. That did it. Now it recognized the WinXP CD. I went through the Windows XP installation process. I started adjusting things on the finished installation. The virtual machine didn't see my other hard drives, so I wondered how to change that. I looked at the manual and discovered that I had spoken too soon: there was indeed something, in VirtualBox, similar to VMware Tools. They called them "Guest Additions." I needed Windows Guest Additions, discussed in the manual starting at page 53. To install them, in the virtual machine I hit Devices > Install Guest Additions. It was a relief that they didn't seem to need to be installed before I activated Windows (though I had not yet activated it, having now been trained). When that was done, Windows Explorer showed that I now had VBOXADDITIONS_1 as drive D. So my Start Menu shortcuts to permanently installed Windows programs on drive D (i.e., programs that did not make registry changes, and that therefore could be permanently installed on a standalone basis) were all going to have to be changed to point elsewhere. Anyway, what about those other hard drives? Oh, but wait. Skipping ahead to the "Known Issues" section of the manual (p. 180), I saw one issue that would apply to my setup. It said, "A virtual network adapter configured for NAT is slower than an adapter configured for host interface networking." I believed I wanted NAT for security reasons: I wanted Windows to access the Internet via the Linux installation, not directly. I wasn't sure how to verify that this was the case, though. At this point, I did not recall whether that precise question had been posed in the virtual machine setup process. I was definitely online, so I went to ZoneAlarm.com and installed the firewall promptly. But was I using NAT? Yes! The answer was there in the VirtualBox under Details. So. The other hard drives. The manual (p. 62) said I had three options: (1) Virtual Disk Image (VDI) files, (2) iSCSI storage servers, and (3) raw host hard disk access. VDI meant giving the guest operating system access to a large image file on a real hard disk. So I would apparently have to get my files into that image, and if I lost that image I would lose my files. Option 2 didn't apply; I didn't have iSCSI storage servers. Option 3 sounded much more risky than in VMware: it was "an experimental feature," and on p. 121, they said this:
Warning: Raw hard disk access is for expert users only. Incorrect use or use of an outdated configuration can lead to total loss of data on the physical disk. Most importantly, do not attempt to boot the partition with the currently running host operating system in a guest. This will lead to severe data corruption.
Looking ahead in the manual, I saw a number of command-line entries that I would be having to make in order to get this thing going properly. I didn't like it. My inexperience on the Linux command line, and the warning that this was for expert users only, made it seem that I would be putting my data at unacceptable risk, now and in the future. Stability was a priority. This, for me, was a deal-breaker. I wanted unfettered, low-risk access to physical drives. I noticed that VirtualBox appeared able to use VMDK image files, such as those created by VMware. If, in the future, VirtualBox became more solid in this area of disk access, I felt I would probably be able to make the switch at that point, possibly without having to recreate any of my virtual drives. But for now, it was time to uninstall VirtualBox and look back to VMware. The remaining option, in that case, was VMware Server. A comparison of Workstation and Server suggested several limitations of the latter, of which the key ones, for me, included no multiple snapshots and no cloning of virtual machines. I could see how those could be significant limitations for a software development lab, where they would be spending all day tinkering with different variations on a software theme. But I just wanted to set up a few virtual machines. Couldn't I copy them, with or without cloning, and develop those copies in different directions? There was only one way to know for sure. I opened the VMware Server Virtual Machine Guide and took a look. From what I read there, it seemed that I may have misunderstood the VirtualBox manual. Maybe they were talking about using physical drives as virtual drives. Because here, in the Server Guide, they too were saying that that was an experimental procedure. Well, but why did nobody's manual seem to be saying anything about access to physical drives in a non-virtualized state? I suddenly remembered that possibly I should have just tried to map those drives when I still had VBox going. It had seemed superior to VMware Server, when I was doing product comparisons, but now it was gone. So I had to reinstall it. It wouldn't take as long as before, but . . . . So, OK, this time I started with Synaptic Package Manager. Now it was showing only virtualbox-ose, the open-source edition of VBox. I went with that. For installation, I marked virtualbox-ose and virtualbox-ose-modules-generic. I wasn't sure what the latter did, but the descriptions of various modules had made this sound like something I would probably need. Unfortunately, this time, when I clicked on Applications > System Tools > VirtualBox OSE, I got an error message:
Failed to create the VirtualBox COM object. The application will now terminate. Could not load the settings file . . . FATAL ERROR: Attribute 'version' has a value, '1.3-linux', that does not match its #FIXED value, '1.2 linux'
In a brief search, I didn't find solutions to this. I noticed, though, as I had not noticed previously, that people were talking about version 1.6, which sounded a lot more recent than the 1.2 or 1.3 cited in this error message. So I marked the virtualbox-ose files mentioned above for complete removal; I downloaded the installation file after all, virtualbox_1.6.2-31466_Ubuntu_hardy_amd64.deb; and I right-clicked and selected "Open with GDebi Package Installer." This time, unlike before, I got a "Configuring virtualbox" dialog that said this:
Creating group 'vboxusers' Users of VirtualBox must be member of that group in order to have write permissions to /dev/vboxdrv. Otherwise starting of VMs will not be possible.
I told it to go ahead and compile the vboxdrv module, although I wasn't sure what that meant. The installation finished and I tried Applications > System Tools > Sun xVM VirtualBox. It found my previously installed WinXPBasic virtual machine without my having to reinstall it; and when I clicked Start, it loaded Windows XP. When that was done, I tried drive-mapping in Windows Explorer, but no, it didn't recognize any of my hard drives. Back to the VBox manual: ah, yes, as in VMware, I had to do something with folder sharing first. In the virtual machine, as advised by manual p. 59, I selected Devices > Shared Folders and clicked on the tiny +folder icon. Alas, it was not recognizing anything from outside the Ubuntu file system -- except for one folder on an NTFS drive. Somebody mentioned installing Guest Additions. So, OK, those had to be reinstalled. I clicked on Devices > Install Guest Additions. The process completed and the virtual machine rebooted. The option to install them was still there after reboot, but it did nothing further when I clicked on it. Shared Folders still wasn't willing to see anything outside of the Ubuntu file system. The solution was to use Ubuntu's Places > Computer option and then double-click on each of my hard drive partitions, and then click on the Back button to prepare for the next. Once I had opened them within Ubuntu, this apparently made them visible to VirtualBox under /media. Then it was the mapping procedure described in the previous post. In the VBox virtual machine, I proceeded to move some files around using Windows Explorer. I noticed atypical behavior. Unlike in a native WinXP installation, WinEx in the VM did not always move files when I told it to. I found I could only move a handful at a time. Moreover, it did not notify me if I was moving files to a place where there were already files of the same name. It seemed to overwrite the existing files without asking if that was what I wanted. And then, once I had moved all of the files away from a folder, if I hit F5 (Refresh), they were all back again. In a brief Google search, I didn't find an answer to these bugs. It occurred to me that it probably made more sense to try building virtual machines in VMware Server than in VirtualBox. My understanding was that VBox was able to import virtual machines created by VMware, but that the reverse was not the case. Also, I thought VMware Player might be more lightweight, for purposes of running virtual machines on the secondary computer, with its 2GB RAM ceiling, and I guessed that Player would probably not play VBox virtual machines as well, if at all. I might not have pursued these thoughts if I hadn't been getting that flaky behavior in Windows Explorer inside the VBox VM. But after a half-hour of screwing around with that, I had to wonder: if they couldn't even get basic file copying and moving right, what were they going to do with my data in the middle of a program? VMware had been in the virtualization business a long time. This was their baby. For Sun, virtualization was a sideshow. I had found VMware impressive; VBox, less so. So I saved the VBox machine state, shut it down, and downloaded VMware Server. I followed a How-To Forge instruction page on installing because there didn't seem to be any instructions in the VMware Server manual or at VMware's webpage. The instructions lost me almost immediately because I was using a single quote ' instead of a grave accent ` in a Terminal command. I could see, plainly enough, that they were using grave accents; I just had a personal issue with using grave accents where single quotes seemed more appropriate. Once we were past that little hurdle, the installer ran until the point where it said, "We were unable to locate an unused Class C subnet in the range of private network numbers," and so forth. It asked me, "What will be the IP address of your host on the private network?" After some searching and fumbling around, I tried Ubuntu's System > Administration > Network Tools > Devices. There, I saw an IP address, and this is what I entered, and likewise for the netmask question, which came next. I tried the same trick when it asked the same questions a bit later, but now I got a new message:
The new private network has collided with existing private network vmnet8. Are you sure you wish to add it? [no]
I recognized the wisdom of the default answer, "no," but was not sure what I would do after that. It asked again. I took the matter to Google. Even Google was stumped. I scrolled back up and saw that the first question had been seeking an IP address for vmnet8, whatever that was, whereas this second time around, the installer was seeking an IP address for vmnet1. According to an ExtremeTech webpage, "VMnet1 is dedicated to Host Only mode, and VMnet8 is for NAT (Network Address Translation) mode." So it looked like I might have gotten it backwards. Now that I was looking more closely at Network Tools, I saw that I had two different Network Devices. One was Ethernet Interface (eth0); the other was Loopback Interface (lo). Between the two, Ethernet Interface sounded more like something that would be connecting to the outside world via NAT mode, while Loopback sounded like Host Only mode. So maybe I should have entered the Ethernet Interface IP address for vmnet8. I tried entering the Loopback Interface IP address for vmnet1 now, but I mistyped it. Soon I was in a world of pain where all I had was the endlessly repeating question, "What will be the IP address of your host on the private network?" I just typed something, anything, to move along. It all came to nothing anyway, because after saying that it was "Generating SSL Server Certificate," the installer said this:
Unable to get the last modification timestamp of the destination file /etc/vmware/ssl/rui.key. Execution aborted.
And just like that, I was dumped back at the prompt. I tried running it again, thinking that maybe my confused answers had contributed to this abortion. The installer gave me the option of reconfiguring my network settings, and I said yes, please. This time, I entered the Ethernet Interface numbers for vmnet8, and the Loopback Interface numbers for vmnet1. But that was apparently not the problem; I got "Execution aborted" again. I was told that the solution to this problem was to enter these lines:
sudo touch /etc/vmware/ssl/rui.key sudo touch /etc/vmware/ssl/rui.crt
I tried that and then ran the installer again. That seemed to work. Now we got as far as the serial number. I entered the one I had gotten from VMware. I received a message saying that the serial number is invalid. I tried again, copying and pasting to avoid typos. Same result. I hit Enter to cancel and got the message,
You cannot power on any virtual machines until you enter a valid serial number. To enter the serial number, run this configuration program again, or choose 'Help > Enter Serial Number' in the virtual machine console.
I also got a message indicating that Bridged Networking had failed on vmnet0, and NAT service had failed on vmnet8. Otherwise, though, they said it had completed successfully, and I was proud. I went to Applications > System Tools > VMware Server Console. The little Ubuntu wheel spun for a while and then disappeared. No action. I tried again. Nope. Server was not running for me. When all else fails, reboot and give it another try. I did; it didn't. The recommended next step was
After the installation, please run: sudo ln -sf /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 Otherwise VMware Server will refuse to start on Ubuntu 8.04. After the successful installation, you can delete the VMware Server download file and the installation directory: cd /home/falko/Desktop rm -f VMware-server* rm -fr vmware-server-distrib/
So I entered that first line and tried again. No luck. I typed "vmware" at the command line and got this:
vmware is installed, but it has not been (correctly) configured for this system. To (re-)configure it, invoke the following command: /usr/bin/vmware-config.pl
I entered that line, with a "sudo" in front of it, and that took me back through the same installation questions. I opted to skip networking, just this time, because there were a bunch of messages right before that, saying "This program previously created the file /dev/vmnet0, and was about to remove it. Somebody else apparently did it already." There were messages like that for vmnet 1 etc., and also for parport 2 etc. So I thought maybe the previous failure was now being cleaned up, so I just went with all the defaults -- and this time, there were no failures. It ran all the way through. I still didn't have a satisfactory serial number, but that could wait (maybe). I typed "vmware" at the prompt again, and this time it worked. I still couldn't enter a serial number, but I had VMware Server Console. I poked around in it a bit. It looked almost exactly like Workstation. I downloaded VMware Converter and rebooted with the GPartEd CD. I removed the Hidden flag from the Windows XP installation and rebooted again. This time, when I selected Windows in the GRUB menu at bootup, I went into Windows, in regular dual-boot fashion. Once there, I ran the Converter EXE file. It advised me that I could optionally make a virtual machine from my Windows installation without leaving a footprint -- that is, without Converter being included in the VM -- by running converter from the bootable CD. But evidently that CD was now part of the nonfree Enterprise version of Converter. I didn't see anywhere to download the CD image for free. It was OK; I figured I could just uninstall Converter from the virtual machine later. So I installed and ran Converter in Windows on the primary computer. It was willing to let me include all of my drive partitions in the virtual machine. I set it to include only the Windows program drive. It finished its job pretty quickly -- didn't time it, but something on the order of 10 to 20 minutes. It gave me a VMDK file of about 15GB because, I guess, the partition it was copying was about that big. The basic Windows installation on that drive took about 5GB. I wasn't sure if that included the pagefile. I decided to stick with the plan of having 10GB virtual machines, and therefore I rebooted into the GPartEd CD, shrank this partition, and tried again. While that was going on, I examined Wine. If I had to run a Windows-based program, there was more than one way to do it. Running it in a virtual machine was one possibility. Running it on Wine was another. The Wine people maintained an application database with lists of Windows programs whose Wine performance was rated platinum, gold, silver, etc. (CrossOver Linux was a for-profit operation based on Wine that seemed to have more or less the same application database.) For example, Microsoft Office 2007 was rated silver in Wine's database. Silver meant "Applications with minor issues that do not affect typical usage." Excel 2003 had a gold rating on Ubuntu 8.04, and Word 2003 had a gold rating on Ubuntu 7.10. What looked tough about Wine was that people seemed to have to jump through hoops to get programs to work. I did find an article by Tom Wickline, posted in January 2008, that made it seem relatively manageable to install Office 2003 using Wine; but when I looked closer, I realized I didn't really understand it. A discussion thread asking which would be faster for gaming -- Wine or VMware -- drew responses heavily favoring Wine. Likewise for a small poll asking about high-end computing performance. It made sense -- VMware created an entire virtual environment, while Wine just provided a translation. To facilitate the transition away from Windows, I thought I might try my hand at Wine for a few applications. It sounded like Wine basically did not work for some programs (e.g., Adobe Acrobat Pro, Adobe Premiere Elements), so I would be needing virtual machines to some extent, regardless of the Wine situation. Another possibility was to simply replace the Windows program with a Linux-based program. Then there would be no need for either VMware or Wine. This, like the Wine option, seemed likely to call for some time spent learning how to install and/or use the program. In Windows, of course, I had already invested that time: I had found the program and had learned how to use it. So there was a time advantage, at least for the short term, in just installing the Windows program in a virtual machine, rather than scouting out a Wine or Linux-based alternative. For some programs, it would probably make sense to take that route. If I could pass another year or two using the program I already knew, I might find that there had been progress, in Linux or in Wine, toward offering the kind of program I needed. The time investment seemed likely to be fairly small in the case of my word processor. Before going to great lengths to make Microsoft Word 2003 function under Wine or VMware, there was the option of using OpenOffice.org (OOo) Writer, which came included with Ubuntu under Applications > Office. In my brief work with it so far, I had found it to be quite Word-like, so this transition might be easy. If I absolutely needed Word for something, I had already installed it in the dual-boot Windows setup on my secondary computer, and could also install it in a virtual machine; but perhaps I could reduce the number of pressing computer-related tasks, for now, by just using OOo Writer. The one missing thing had been that I couldn't automatically transfer my AutoCorrect entries from Word to Writer. I posted a note to that effect, in the appropriate OpenOffice forum, to revive an old discussion thread on the subject. Someone then devised an AutoCorrect import macro for Writer, but at this writing that was not yet working. Once this came around, I would try Writer; but in the meantime it had to be Word on Wine or VMware. While I was killing time, waiting for "chkdsk /r" to run in the Recovery Console on the main machine (all this booting and crashing seemed to have messed up some disk directories), I also discovered the Compiz desktop effects in Ubuntu on the secondary computer (basically, install compiz-settings-manager in Synaptic), and began playing around with having a rotating desktop, which seemed likely to be faster and more accommodating than switching between windows. Roll the mouse wheel on one desktop and you're in the other one. Very easy. Eventually, of course, I got in trouble with the top bar disappearing from my windows, evidently because I had turned off the Compiz "Window Decoration" option. Having installed Wine on the secondary computer (via Applications > Add/Remove), I now went to Applications > Wine > Configure Wine and set it up to recognize my drive partitions. I discovered that I had been granted only Wine 1.0, which was the last stable version but was very outdated. The advice was, instead, to stay up with the current version, first by uninstalling what I had installed (sudo apt-get remove wine) and then using Synaptic to install. But Synaptic was showing just version 1.0, and the official Wine website was advising that it might be safer not to be constantly uploading the latest developments, if version 1.0 worked for you. I decided to refer back to what version those testers had used, when they had awarded a gold medal to some versions of Wine that were able to run Word and Excel. For Excel, the one that had worked in Ubuntu 8.04 was Wine 1.0-rc4, and for Word, the one yielding a gold rating in Ubuntu 7.10 (the latest version tested) was Wine 0.9.53. Since Wine 1.0 was supposed to be the stable release, I went back to Synaptic and reinstalled that. I did find a website with clear installation instructions, evidently prepared before Wine 1.0, that insisted people should use version 0.9.37; but since both of the tests just mentioned had successfully used more recent versions, I decided to start with 1.0. I went through those instructions. The result was interesting. "Wine" becomes a sort of prompt that allows Terminal (technically, the BASH shell) to process commands. So if you type "wine regedit," that will open the Windows registry editor, assuming you've installed Wine. I completed the installation and got an indication that it had completed successfully. Unfortunately, a lot of what looked like error messages had been flashing by in the Terminal window, and when it was done I did not have a copy of winword.exe (the program that starts Microsoft Word) in my Program Files folder under the .wine directory. A search told me, however, that of course I did have a copy of winword.exe in the Windows partition that I used to dual-boot the computer. So I wondered: could I type "wine winword" in that folder and start Word that way? The answer was no. I got a "module not found" error. But that seemed to me to be the way Wine should work: just set you up so you can run the programs you've already installed on your dual-boot drive. Anyway, judging from the meager contents of my Program Files folder under .wine, nothing had really installed from Office. I wondered if I could use Wine 1.0 to install anything else. For instance, the website for IrfanView, an image viewer and editor that I used frequently, specifically said that you could use Wine to use IrfanView. So in Terminal I went to the folder where I kept my downloaded copy of IrfanView.exe, and at the prompt, logged in as root, I typed "wine irvanview400_setup.exe." That failed. Following a tip in the Wine applications database page for IrfanView, as well as some other helpful instructions, it seemed that I might need MFC42.DLL, and that I might find that in Winetricks, whose webpage advised me to enter "wget http://www.kegel.com/wine/winetricks" to install Winetricks. I tried that. It seemed to work. Then I typed "sh winetricks mfc42." That finished and said "no errors." Then I tried "wine irvanview400_setup.exe" again. That worked. IrfanView was up and running on Ubuntu! I installed the IrfanView plugins in the same way. But to restart IrfanView was not easy. I found that its program file was not where I had been looking before. It was actually at /root/.wine/drive_c/Program Files/IrfanView. I guessed this was because I had installed those programs as superuser, i.e., root, using "sudo." So now would I have to be logged in as root every time I wanted to use it? I found the program file for Word 2003 nearby, too, at /root/.wine/drive_c/Program Files/Microsoft Office/OFFICE11/Winword.exe. And when I tried running it from the prompt, it too worked, after all. I was not too happy with the way Word ran, though. This was not like using it in a Windows environment. I could not identify a Word document in the File Browser and double-click on it to open it in Word. Instead, it appeared I would have to start Word using a "wine winword.exe" command, and then navigate to each individual document to open it. This could be very inconvenient when trying to open multiple files in an extended directory tree. I was also not happy with the amount of time I was spending to try to figure this out. There were many Ubuntu skills and bits of knowledge that I needed, but presently lacked, to work through these sorts of problems effectively. Rather than continue to research the technicalities of setting up each individual program in Wine, I decided to see whether the VMware Server option would be satisfactory for the coming year or so. Having used VMware Converter once, it occurred to me that I could use my dual boot as the test bed on which I would create my basic WinXP virtual machine. That is, instead of installing my basic Windows XP setup in a virtual machine, complete with various tweaks and related programs, I would install that stuff directly on drive C. I would use drive C when I dual-booted into Windows, and I would also use Converter to copy drive C into a basic WinXP virtual machine. Then, hopefully, all I would need to do in VMware Server would be to install a few different programs on each copy of that basic virtual machine -- one for Microsoft Office, one for Adobe Premiere Elements, and so forth. Armed with that concept, I proceeded to flesh out the basic WinXP installation on drive C of the primary computer. I installed various items that I would want to appear in all virtual machines, cleaned up and organized the Start Menu, ran System File Checker and the disk checker, and defragmented. The basic tools I installed included PDF995 (so that I would have a lightweight PDF printer in all virtual machines), 7-Zip (for file zipping and unzipping), drivers and software for my printer, IrfanView for image viewing and editing, Nero and CDBurnerXP, TreeSize, Unlocker, and ZoneAlarm. Even with a 3.5GB system-assigned pagefile, the total contents of the drive were only 6.4GB, leaving 3.6GB for installation of a few more programs in each specialized virtual machine. It seemed adequate. I ran VMware Converter to capture this state-of-the-art basic Windows XP installation. In case I neglected to mention it earlier, Converter had the appreciated feature of installing VMware Tools in the conversion process. I rebooted into Ubuntu and tried to open that virtual machine in VMware Server. I got an error message, "Unable to add virtual machine to the inventory: Configuration file was created by a VMware product with more features than this version." The likely reason, I discovered, was that I had indicated that I wanted to create a virtual machine compatible with Server 2.x, but I was actually running only 1.0.6, I think. If I opted instead for creating a machine compatible with Server 1.x, I didn't get the option of installing VMware Tools; it was greyed out. Someone said the new features of 2.x weren't necessary for everyday work and that 2.x, which was still in beta testing, was still unstable. So I recreated the virtual machine to be compatible with Server 1.x and tried again. It loaded, but when I clicked "Start up this guest operating system," I got this:
Cannot find a serial number to unlock this version of VMware Server. Please ask your system administrator to run "vmware-config.pl" and enter the serial number. For more information, please read the INSTALL file in VMware Server's documentation directory.
So, OK, I closed Server, searched Filesystem for "vmware-config.pl," opened Terminal, typed "sudo -i" and then navigated with "cd" to /usr/bin, and typed vmware-config.pl. This ran me back through a bunch of installation questions about Server. It came to this question:
Do you want this program to set up permissions for your registered virtual machines? This will be done by setting new permissions on all files found in the "/etc/vmware/vm-list" file.
This, I suspected, could be where the serial number issue would arise. Unfortunately, being still a bit disoriented in the Ubuntu search and file manager programs, I could not quite figure out where I had put the Server manual; and when I went to download another copy, I found that Firefox on the primary computer was giving "Server not found" error messages for every webpage I tried to open. I thought this might be a temporary problem caused by the vmware-config.pl configuration/installation program, so I downloaded a copy of the manual on the secondary computer. The VMware Server Virtual Machine Guide didn't have anything to speak of on the subject of the serial number, so I tried the Guest Operating System Installation Guide. But it, too, seemed to have nothing. Next, I tried the VMware Server Administration Guide. It had a few references to serial numbers, but nothing that explained what was happening here. So I answered "yes" to the question written above and, sure enough, after asking "In which directory do you want to keep your virtual machine files?" (the default, which I kept, was /var/lib/vmware/Virtual Machines), it told me to enter my serial number. I did. That was the last question. We were done. I was a little concerned that I might have to redo this little process each time I created a copy of a virtual machine. I will just say this was a huge hassle for a bloody free program, and it looked like a lot of people had shared my pain. But now, by golly, Server was willing to start the Windows XP virtual machine. My first mission was to complete the basic WinXP installation. There were some things that I couldn't or wouldn't do while it was still running in native, dual-boot mode. For one thing, I had to install VMware Tools before activating WinXP, and as the notice now reminded me, I couldn't do that until the guest operating system was running. So I did that. Installing Tools required access to some files from the installation CD or, as I directed the program, from C:\WINDOWS\system32\dllcache or C:\WINDOWS\system32\drivers or their parent folders. The Found New Hardware Wizard came up, which usually meant some kind of installation hassle in WinXP. It turned out to be trying to install the Ethernet adapter. I had the latest driver on another partition, but here in Server, as distinct from VMware Workstation, the VM option on the menu was not giving me the opportunity to name shared folders. It's not that it was greyed out; it just didn't exist here. It was OK; I could install from the CD that came with the motherboard. But the Browse button didn't even show the CD drive as an option; it only showed the floppy and drive C for devices on my computer. I tried just typing the drive letter for the CD, but I kept getting the error, "The specified location does not contain information about your hardware." I could have tried typing in the exact directory location, determined by putting the CD in the other computer and navigating around until I found what looked like the right driver; but often these driver lookup efforts were trial-and-error, with the system sometimes informing me that I hadn't selected the right driver. So I gave up on the "Have Disk" option and instead just let Windows figure out what to install. It seemed to be happy; it completed that and went on to the next item, my video driver. But here, I wanted to adjust the screen, so I clicked a couple of things, including Quick Switch, a button there at the top of the VMware Server screen. That instantly plunged me into an Ubuntu command line on an all-black screen and then, after a moment, it allowed me to log into Ubuntu again and start over. OK, that was weird. I soon rediscovered that I had actually been looking for View > Autofit Guest; but when I tried that after restarting Server, nothing happened; part of the WinXP desktop was still scrolled off below and to the right of the screen. Anyway, I started VMware Server again, and this time I selected Edit host settings. I told it to allocate 3GB, of my 3.4GB system total RAM, to virtual machines, and I told it to fit all virtual machine memory into reserved host RAM. So we would see if three 1GB virtual machines were all allowed to run simultaneously. Once again, though, I got "You don't have the permission to execute this operation." So I canceled out of that, reopened the basic WinXP virtual machine, and got an indication that I did not have VMware Tools installed. So I started that process again. But up came the Found New Hardware Wizard for my video controller again. Turns out it was searching for a driver for the "VMware SVGA II" video controller, not my actual physical controller. So no CD access was necessary; it was just trying to access the virtual (i.e., not physical) video controller. I allowed it to proceed by its own sense of what was right, but this gave me an error message:
Cannot Install this Hardware There was a problem installing this hardware. Video Controller (VGA Compatible) An error occurred during the installation of this device Driver is not intended for this platform
So, OK, another mystery from VMware. Next, it wanted to install my PCI Bus Master IDE Controller. The big picture seemed to be that VMware Tools would not install, at least not on Server, until all of my hardware had been detected and maybe supplanted by virtual hardware. It was a little unclear. But the IDE Controller seemed to install OK. Now I got repeated visits from the Insert Disk dialog, which was telling me to insert the WinXP CD. At first, I pointed it to dllcache (above), but it kept coming back, so I did insert the CD. But as before, it was still not recognizing the CD drive, so the dllcache option was the only way to go. Next, it wanted to restart WinXP, within the virtual machine, in order to recognize the installed devices, so I let it do that. I tried again on the shared folders option. It still didn't exist. Possibly this was a difference between VMware Server versions 1.0 and 2.0; maybe 2.0 would catch up with Workstation in this regard. Or maybe this was something that came with VMware Tools. I was still getting an indication that I did not have VMware Tools installed, so I went to VM > Cancel VMware Tools install and tried again with VM > Install VMware Tools. WinXP was booting up very slowly, for some reason. Needless to say, I was having serious doubts, by this point, about my theory that VMware specialized in virtualization and was therefore taking it more seriously than Sun, for whom it was perhaps just a sidelight. My browsing around had introduced me to a number of complaints, and while I guess you always have those, it wasn't reassuring. Right now, I couldn't believe how slowly the WinXP virtual machine was rebooting. Something was plainly wrong. Maybe I had confused things by trying to install VMware Tools prematurely. I rebooted it again, canceled the Tools installation again, restarted it again. Still no Tools installation. In my browsing, I had kept seeing that all these other people were successfully using VirtualBox. I had to think that my problems with it had been a fluke. I wondered how it would do at importing the basic WinXP installation that VMware Converter had now made into a virtual machine. I killed VMware and fired up VirtualBox. I couldn't figure out how to import the virtual machine, so I went looking for documentation and advice. Unfortunately, it now appeared that I could not access the Internet on the primary computer. Every webpage I tried to open in Firefox within Ubuntu came back with, "Server not found. Firefox can't find the server at
." I was able to ping my router, and of course the secondary computer (on which I was writing these words) was connecting to Blogger.com just fine. Something in the process of running VMware Server, VMware Tools, and/or VirtualBox had screwed up the network connection. I dual-booted back into Windows XP and ran the New Connection Wizard. That achieved nothing, so then I remembered I needed to go through the router installation process. I hadn't intended to connect this WinXP installation directly with the Internet, because I didn't expect to be using it for that. I had just wanted it to be a starter for the virtual machine and a fallback in case of emergency. But now we were on plan B. I inserted the router installation CD and went through the process. Unfortunately, the process terminated prematurely with an error message:
Setup Wizard MFC Application has encountered a problem and needs to close. We are sorry for the inconvenience.
This happened several times. I looked for a solution. Unfortunately, while picking up the router to look closely at its model number (Linksys WRT54GL), I seemed to have punched a button on the front, and now my Google search seemed not to be running on the secondary computer either. When I hit that button, a light started flashing on front of the router. It didn't stop. I punched it again; no change. I powered down everything -- both computers, router, and modem -- and left them off for a couple of minutes. I came back and turned them back on, and ran the router setup in WinXP in the primary machine again. This gave the same result as before. It also changed nothing on the secondary computer, where I was reduced to writing these words in a text file because I could no longer communicate with Blogger. This led to an extended digression into getting myself a working Linux-compatible router. As hours passed in that unwanted distraction, I found myself thinking about a conversation I had had with a friend, a few days earlier. I told her about my computing woes. She asked why I didn't just buy a Mac. I had to admit that I had not seriously thought about owning a Mac since the 1980s, when Apple acquired a reputation for having expensive stuff that you couldn't adjust to your needs. I was now realizing, however, that I had been mistaken in my understanding of something that had happened in the previous summer, 2007. Then, as now, I had spent weeks on end trying to make the computer work properly. In that case, it was a hardware problem. My solution was to make sure I had two compatible desktop computers, so that when something failed, I could immediately switch parts or software back and forth to troubleshoot the problem. This approach had cost me several hundred dollars for the backup computer, but had paid for itself numerous times when I was checking my own hardware or software or that of a friend. Indeed, even at the present time, I was constantly using one machine to aid with another. I had seen that month or so of hardware-oriented effort, in summer 2007, as a huge exception to the general idea that I would mostly just do my work and avoid computer hassles. That, I now believed, was mistaken. First, I had had to spend several days at a stretch, on several occasions during the past year, dealing with various computer difficulties. I had upgraded my motherboard and had then had to reinstall Windows; I had had a computer virus; etc. In fact, I had come to the point of making a determined effort to install and run Ubuntu only after spending a week reinstalling and configuring Windows XP, only to find that my installation was not working properly. So the computer thing was not just an occasional interruption to my work. It was a huge imposition. I also realized that it had always been that. There had been times -- in 1996, for example, and again in 2000 or 2001, and in 2003, and so forth -- when I had spent literally months in an on-again, off-again effort to get productive work done while dealing with significant hardware and/or software difficulties. The Ubuntu adventure was not going to be an exception to that. I was going to have to continue fiddling with various kinds of hardware and software problems. Possibly virtualization would reduce some of that; possibly not. Certainly, at any rate, it was not turning out to be the kind of thing where I would just make a quick switch and get back to work. This was going to take some time. That's not to say I had given up on Ubuntu. It still felt much more solid and reliable than Windows. The open and helpful attitude of people in forums seemed better than when I had had to troubleshoot Windows problems. The software seemed more responsive, so far. There were a lot of things to like about it. But at the end of the day, I needed it to work. So, OK, I needed to keep troubleshooting this router problem; and over the longer term, I needed to keep thinking about what I was willing to do, and what I needed to give up, in the computing area. Twenty-four hours later, I had resolved the router issue and was back in the game. It was time to make this virtualization thing a reality. I started another post for that purpose.