To save the current state of the virtual machine, so that you can revert to that state, take a snapshot. To make a copy of a virtual machine for separate use, create a clone.This was going to be a copy -- called a "clone" in VMware -- for separate use. Next, there was a choice between two types of clones. A linked clone could be made quickly, because it would not be a full copy of everything in its parent. It would continue to need access to its parent. A full clone, by contrast, would be a complete and independent copy that would share nothing with its parent. It would take longer to make, but it would run faster, according to the manual (p. 248). That's what I wanted. The first step they recommended, in creating a full clone, was to defragment the guest (WinXP) operating system. I opened the Basic WinXP and Office virtual machine and defragged its only drive, C. This took only a few minutes. Meanwhile, I saw that there were also some other fixes I would want to make before cloning this machine. First, when I opened it, I got a Windows bubble warning me that I did not have antivirus software installed. So I went into Control Panel > Security Center and made the adjustment described above, to shut off that warning. I also got an error message:
An error occurred while reconnecting D: to \\.host\Shared Folders\STATIC VMware Shared Folders: The network name cannot be found. This connection has not been restored.So I went into Windows Explorer's menu: Tools > Disconnect Network Drive and disconnected all network drives, hoping that would take care of it. I rebooted the virtual machine -- it took less than one minute -- and this time I got no such warnings or error messages. The next step they recommended, in the manual, was to power off the VM. So I hit Start > Turn Off. I selected VM > Clone and got a suggestion to enable template mode if I wanted other users to be able to create clones from this VM. The purpose of this, according to the manual (p. 252), was to prevent anyone from deleting the parent of a linked clone. Since I was planning to make a full clone, not a linked one, this did not apply. So the next step was to clone from the current state of the VM, with the few small fixes I had just made to the Basic WinXP and Office VM. I called it Occasional Use - Starter. Although the full clone was supposed to take a relatively long time to make, it actually took only four minutes in this case. I now had a separate tab for this clone in the Summary view in VMware. Snapshot Manager showed a new branch of the tree, but with nothing on it except "You Are Here." So I made a snapshot of the Occasional VM at that point. Now Snapshot Manager showed nothing except this branch; there was no longer any connection with the original Basic WinXP and Office VM. I had called the Snapshot "Starter," and realized I could shorten the name of the VM itself to "Occasional Use," or just "Occasional." But there didn't seem to be a way to rename the VM, so I tried making another clone. This time, I got an error message:
Cloning failed: There is not enough space on the file system for the selected operation, free 3.39 GB on the file system and try again.This seemed odd. I had 50GB in this partition, and the programs installed so far in this virtual machine filled only a few GB. But I did not argue; I deleted the Occasional Use - Starter clone and made another with the shorter name. Next, I examined Control Panel > Add or Remove Programs for things I could pare out of this Occasional VM. First to go: Microsoft Office programs that would already be running in the Everyday VM. I decided that Word and Excel were the only ones, so I clicked Change and deselected those two. To match this, I went to the Everyday VM (whose official, created name was still WinXPMinimal) and deselected all Microsoft Office programs *except* Word and Excel. So if I needed to run Word, I would run it in the Everyday machine; and if I needed to run Access or Publisher, I would run it in the Occasional machine. The VMware progress bar in the lower right corner of the screen did not seem to progress, for the WinXPMinimal machine, while I was looking at the Occasional machine. This did not prevent me from opening Add or Remove Programs and looking at the list of installed programs in WinXPMinimal, which was going to be my future Everyday machine. It was a pretty short list. I changed Microsoft Office as just described, to remove everything except Word and Excel. I decided that everything else I had installed there in the WinXPMinimal machine was indeed stuff that I would be using frequently. So now the next step was to install other occasionally needed programs in the Occasional VM. I started with Corel Office, which was where I had stopped adding programs to WinXPMinimal. I wondered whether that would make the machine sluggish again, or whether that problem in the WinXPMinimal machine had just been due to the accumulation of too many (and, perhaps, conflicting) programs. It didn't seem to; everything was fine now. I could see, now, that I had done things somewhat out of order. The tweaks that I had installed toward the end of the process, in the WinXPMinimal machine, should have been done toward the beginning. Now I had to do them all over again in this Occasional VM, because I did want them operating here as well. An example: deselect the "Display delete confirmation dialog" option in Recycle Bin > Properties. I wanted that sort of thing to function the same in all virtual machines, so I should have set it up at the start. The remaining programs that I needed to install were device-oriented. First, I wanted my Palm PDA to connect to the Palm Desktop software. There was a way to synchronize a Palm PDA using only Linux programs, but it didn't sound easy, and the Windows-based Palm PDA software was easy. So I made a snapshot, and then installed that. I plugged the mini-USB cable into the PDA and tried to synchronize. The computer recognized it, but then said there was a problem installing my hardware. Device Manager (in Control Panel > System > Hardware) had a yellow exclamation circle. I unplugged and replugged the PDA and tried again to synchronize. This time, the Palm PDA appeared with no problems in Device Manager, but otherwise there was no response from the system. Once again, I had to conclude, this was a device I would have to be synchronizing via dual-boot to native WinXP, not in a WinXP virtual machine. Then I realized I hadn't yet consulted the Workstation User's Manual on this point. It said this on p. 354:
Although your host operating system must support USB, you do not need to install device-specific drivers for your USB devices in the host operating system to use those devices only in the virtual machine. . . . If the guest operating system has appropriate drivers, you should be able to use PDAs, printers, storage (disk) devices, scanners, MP3 players, digital cameras, and memory card readers.In that case, my previous post was mistaken in understanding that my printer/scanner would not run in VMware, and I was now likewise mistaken in thinking that my PDA would not work. If it worked out, this would be a reason to run VMware on top of Ubuntu: it would be able to help Windows-specific devices, lacking Linux drivers, to function within an Ubuntu system. It all sounded great. Now it was just a matter of making it work. So, first, the PDA. The manual said, first, that I could enable or disable the USB 2.0 controller via VM > Settings > Hardware > USB Controller. It was enabled and greyed out. The manual (p. 355) had instructions for automatic and manual connection of USB devices. Since the automatic approach hadn't worked yet, I tried the manual one. The manual said (p. 355),
If you physically plug a new device into the host computer and the autoconnect feature does not connect it to a virtual machine ,this means the device is instead connected to the host. Its name is also added to the VM > Removable Devices menu so you can connect it to the virtual machine manually.So, OK, I plugged in the PDA and went to that menu. It did indeed have the "Palm Handheld (Virtual Hub 1, Port 1)" with a checkmark next to it. So it was now connected to the virtual machine. It appeared in Device Manager. So why couldn't I get it to sync? I tried syncing from the handheld. No luck. There didn't seem to be a way to do it from the desktop. This was where I had stopped before. The manual (p. 358) noted that sometimes PDAs have autoconnection problems, but their advice for reconnecting didn't solve the problem. I wondered if maybe I had created the account incorrectly when I had installed the Palm software in the virtual machine. I thought I might try synchronizing the PDA and the desktop in native, dual-booted WinXP. So I suspended my two open VMware virtual machines, WinXPMinimal (which I should have called Everyday) and Occasional. Or at least I tried to suspend them. When I clicked Suspend for the Occasional VM, I got this message:
There is not enough disk space to save the virtual machine's state. Please free up at least 1.03 GB and try again. Failed to suspend the virtual machine.Once again, this was baffling, given that I had set up the machine with 30GB of virtual disk space and had even more than that available. I wondered whether they meant RAM instead of disk space. I had noticed quite a delay in switching between the two virtual machines at one point, and I figured that was because they were each trying to claim 2GB of RAM in a machine that had a total of only 4GB installed, some of which was being used by Ubuntu and some by VMware overhead. But I wasn't getting that delay in switching now. I switched back to the WinXPMinimal VM and shut it down, and then tried again to suspend Occasional. This time it worked. I closed down VMware and dual booted into WinXP. Windows was its good old dysfunctional self, refusing to boot properly, so I felt right at home. I prepared to restore an earlier drive image and try again. Drive Image 2002 imagined that there was a problem with the hard drive on which I had saved that drive image, and was unable to see that drive's contents, so I rebooted Ubuntu to copy that drive image over to another drive. Ubuntu said, "Cannot mount volume." It was, in fact, unable to mount any of my partitions, other than the one containing Ubuntu itself. This was strange. I rebooted into native WinXP Safe Mode, to see about copying the drive image over from one partition to another. But Drive Image could not see the images I had saved, even when I moved them to different partitions where Drive Image did see existing folders. In all these years of using Drive Image, I don't think I had ever seen that before. It almost had to result from using Ubuntu somehow, but how? It didn't make any sense. I wound up reinstalling a basic version of WinXP for my dual boot, and that in itself was a confused mess because, for some reason, Windows decided to label the first primary partition on my first hard drive as G. Not drive C, drive G. Wha -- ? Another first. I found some posts that advised how to edit the registry to fix this, and following those instructions, I wound up with a system that would not boot at all. So I installed WinXP from scratch again. While WinXP was chewing up that additional hour, I was thinking about how short life is, how difficult it will be to accomplish much in life if I have to spend so much of my remaining time on Earth configuring computers . . . While I was waiting for Windows to re-re-reinstall itself as my dual boot on the primary computer, I contemplated the situation on the secondary computer. It, too, had originally run WinXP, and then I had added 32-bit Ubuntu to the mix. Its dual-boot arrangement was working well, except that the Windows part was not working too well. Did I want to invest time in fixing that, or was there another option? One alternative, I thought, might be to install VMware Player, with which I had not yet had any experience, and use it to run a copy of one or both of the WinXP virtual machines I was developing on the primary computer. The scenario here would be that I would generate a working VM on the primary computer and then, using VMware Workstation or Player, both computers would run the identical installation. The secondary computer had a maximum of only 2GB RAM, and I had raided that down to 1GB in order to fully populate the primary computer's memory sockets. I had configured each of the virtual machines to take 2GB. But apparently they could run with less because, as noted above, I did not have a total of 4GB free on the primary computer, and they both seemed to be running there. On the secondary computer, I would not generally have a lot of Word documents or PDFs (or anything else) open, so maybe the memory issue would not be an issue. Pending further experience on the primary computer, I decided to figure on setting up around 6GB RAM on the primary computer and 2GB on the secondary computer, if indeed I could make this VMware thing work on both computers, and if it seemed like I was getting serious slowdowns without it. By the time I had done that much heavy thinking, the WinXP installation on the primary computer had completed, and I had installed Palm Desktop, and I now ran the synchronizer. It occurred to me that synchronizing with the dual boot WinXP on the primary machine would mean rebooting that machine daily, so I thought that I had better set up the same thing on the secondary machine. So what I really got out of this was an excuse to clean off the nonworking WinXP installation on the primary machine, and replace it with something that would do the basic Windows functions I couldn't do in the virtual machine. So I was ready to reboot the primary machine into Ubuntu but, alas, the WinXP reinstallation had knocked out my Grub bootloader. I was getting no Ubuntu option when I rebooted. I followed some How-To Geek instructions on how to get Grub back. Basically, those instructions were to boot the Linux CD and then type this into Terminal:
If Windows was now missing from Grub, there were further instructions on that webpage. These directions said they assumed that hd0 was the address I had used to install Grub in the first place. All very good. But the 64-bit Ubuntu boot CD did not finish loading its "Try the CD" option, for some reason, so I tried a Knoppix Linux CD instead. That left me with a black screen and no hard drive activity. This was getting weird. Drive Image, Ubuntu, Knoppix . . . all of these CDs that had worked for me in the past weren't working now, whereas the Windows CD was working just fine. I tried booting the 32-bit Ubuntu CD; same thing. I had a green (not yellow) activity light on the monitor, but a black screen and no hard drive or CD activity. I guessed that maybe Ubuntu couldn't work with this particular monitor, so I tried plugging the other monitor into the primary computer instead. That worked. Now I just had to write down the instructions (above), obtained from a website on the secondary computer, and then run around back and plug the monitor into the primary computer again so that I could enter them. But when I typed those lines, I got back an error, something like, "Cannot mount selected partition." Also, "exit" didn't work. I hit the reset button and booted the GPartEd CD. It informed me that the Windows drive C partition was sda1, and the Ubuntu partition was sdc8. Soooo ... which one was the Grub editor supposed to edit? I wasn't too confident of these instructions. I tried again with some Ubuntu community instructions. They suggested what seemed likely to be a helpful additional command:sudo grub root (hd0,0) setup (hd0) exit
find /boot/grub/stage1So I rebooted with the Ubuntu 32-bit CD. This time, I didn't need to switch monitors. I had no idea why that little problem had cropped up; maybe one of the other CDs had somehow tainted the well. Whatever. In Ubuntu booted from the CD, I typed the lines recommended by the community instructions, and the FIND line came back with (hd2,7). So I guessed that must have been the same as sdc8, subtracting 1 (presumably because the count started with zero rather than one) and restated as hd rather than sd. Anyway, those instructions seemed to work. It said "successful" or "succeeded" -- can't remember which. But when I rebooted, I got no Grub. I was back in Windows, having seen no alternative. I rebooted and got the same thing again. Looking again at the instructions, it seemed that maybe I had not done everything I was supposed to do. I saw that some other people were pointing to those community instructions, so I just replaced their references to hd2 with sdc (i.e., with what I was actually seeing on the screen), and it seemed to work. It gave me the output they described. But when I rebooted the primary computer, once again I was in Windows, without having seen a boot option. Reading further, I thought that maybe what I had been doing was writing to the Ubuntu partition (as I intended) whereas I should have been writing to the boot partition, where Windows was. It was a good theory, so I gave that a run, following the same instructions but sticking with hd0,0. But that got nowhere. I tried another version of almost the same instructions and still just got Windows where they said I should have gotten my boot list back. I decided to try another approach. I had seen several references to BootMagic, which came with PartitionMagic. I booted my PartitionMagic CD and chose the BootMagic option. It asked me to select the operating system partition I wished to boot. I chose the partition containing my Ubuntu files. The system rebooted, and I removed the CD. I got Windows again. I tried installing BootMagic while I was still in Windows. They gave me only one option of partitions to which they would install BootMagic. It was drive G. That was a small, empty FAT32 partition I kept lying around in case I needed it. So I said sure, go for it. I guess because it was an older version, it didn't find the Linux partition automatically. I had to choose an Advanced setting. On reboot, I got, "Error finding BTMAGIC.IMG. Run BootMagic install. Press a key." And when I did, I got Windows again. So I uninstalled BootMagic. I rebooted the Ubuntu (32-bit) CD. It gave me the usual menu. I had not previously noticed the option down below, "Press F4 to select alternative start-up and installation modes." There was also an F6, "Other Options." I tried F4 first, cued in by a website that said the alternative CD contained a Rescue Mode which included a Reinstall Grub Boot Loader option. But neither F4 nor F6 appeared to offer the Rescue Mode. So I downloaded the alternate CD. It was a monster -- took a while -- so in the meantime I continued with my earlier investigation of alternatives to Outlook 2003. I already had an Outlook *.PST file containing e-mails from this year, and I had saved some PSTs from previous years as well. I wanted something that could import them. It looked like people had had some success in this regard with the Evolution e-mail program that was included with Ubuntu. I saw where it was rated at five stars in Applications > Add/Remove. So I decided to start with that, when I got to the point of setting up e-mail on the primary computer. After a long while, the Ubuntu 8.04 alternate CD image was downloaded, and I burned it to a CD and rebooted the primary computer with it. Sure enough, the opening menu offered "Rescue a broken system" as one of its options. (The others all looked pretty much like what you'd see on the non-alternative installation CD.) The rescue option went through some basic steps and hten asked me which device I wanted to use as my root file system. I assumed that meant, where were my Ubuntu files? I chose sdc8. Next, I got a list of five rescue operations, of which "Reinstall GRUB boot loader" was the third. I selected that. Next, it said,
You need to make the newly installed system bootable, by installing the GRUB boot loader on a bootable device. The usual way to do this is to install GRUB on the master boot record of your first hard drive.That sounded good. The instructions indiciated that entering "(hd0)" (without quotes, presumably) would do that. So that's what I entered. But no. I got "Unable to install GRUB in (hd0). Executing 'grub-install (hd0)' failed. This is a fatal error." OK. I understood. I went back and tried "/dev/sdc8" and got a fatal error there too. Hmm. Had Windows made it impossible to install GRUB? I tried (hd2,7). That failed too. Maybe they meant I should enter it without the parentheses: hd0, not (hd0). hd2,7? No. So I just went down the list, trying every partition on my drives. I didn't get an error when I tried /dev/sdc6, and I thought that was it; but on reboot without the CD I was right back in Windows once again. The sdc8 option was the only one that didn't get an error *and* brought up the "Reinstall GRUB boot loader" option. So I concluded, for multiple reasons, that that was the right one. But it was no go there. One discussion made me think the problem was that I had multiple disks installed, including the Windows one, so I unplugged all but the third drive, where Ubuntu was installed, and rebooted the alternate CD. Still no luck. Or so it seemed. I tried to reboot the system, and suddenly, what did I see but GRUB? It gave me the standard choices between Ubuntu and Windows XP. So evidently the rescue option had done something. Unfortunately, when I chose the normal Ubuntu option, I got "Error 21: Selected disk does not exist." When I chose the WinXP option, I got "Error 12: Invalid device requested." I booted the GPartEd CD and verified that I did indeed have the right disk plugged in, and that the Linux partition was still there. As I viewed GPartEd, I got an inkling as to why I was getting error messages indicating that I did not have enough disk space. GPartEd showed about 44GB used, out of a total of 49GB, on the Linux partition. When I set up those virtual machines to take 30GB or more, they tried to do just that. So, as I recalled, I had last shut down Ubuntu after suspending one of those machines. Suspending it meant that it reserved its claim on dozens of GBs of drive space. What I should have done, when setting up the VMs, was to set them up to demand enough drive space for their needs, but no more. Now, to fix the problem, I could either recreate the virtual machines or use GPartEd to enlarge the partition, at the expense of its neighbor. But that would have to wait. First, what was I going to do about getting the Ubuntu partition running again? Actually, it wouldn't have been bad to just reinstall Ubuntu from scratch. It was a pretty fast process. But what about those virtual machine snapshots? I guessed that they ought to be able to be copied, easily enough, or revived through a new VMware installation. Portability was, after all, part of the VMware concept, as I understood it. Moreover, I had just seen that my approach of making big virtual machines with big memory reservations had come at a cost. What I should have done, maybe, was to create multiple smaller ones, each reserving just a fraction of my computer's total resources. One machine for Microsoft Word and Excel; maybe a separate one for Acrobat. Give each of them maybe 1GB of RAM and 10GB or less of hard drive space. I would rarely if ever need to run all of those programs at the same time, so they could swap resources in and out as the situation demanded. If one of the programs went bad, it would have no effect on my ability to use any of the others; they would not cripple a virtual machine containing multiple programs. They would also be more likely to run on the secondary computer, with its 2GB maximum RAM limitation. This raised the question of what, exactly, was a VMware "appliance." I had seen the term used, but had not really grasped it. But I decided to postpone that question until I got closer to the point of being ready to do something with the answer. First, I needed to get back to the point of having a working system. That need prompted me to stop and reflect on the situation. I had had a working system. Then I had had a problem with being unable to dual-boot it. This had resulted in my Ubuntu installation being unavailable. That result, on my primary computer, was unacceptable. Even if I managed to figure out a fix this time, there was no guarantee that it would save me next time. There was a risk that, in the middle of some rush situation, I would have to stop everything and go back to screwing around with Windows and/or reinstalling Ubuntu. I had already decided to maintain a dual boot setup on my secondary computer, realizing that daily rebooting into Windows on the primary computer would be disruptive. So why not go the additional step -- why not just forget about Windows altogether on the primary machine? I could mess around with Windows on the secondary computer, enduring days of downtime if things went south; and meanwhile my primary machine would continue to chug along with Ubuntu and VMware. I plugged in all three drives and rebooted, to see where things stood. There was no GRUB menu. Instead, Windows booted up with no problem. So I could continue the effort to fix GRUB and use my existing Ubuntu installation, or I could start over with a new Ubuntu installation. I decided to start over. Doing so could save me from spending any more time with this GRUB situation. It would also, incidentally, give me a new Firefox web browser installation. Ubuntu 8.04 had shipped with Firefox 3.0 as its default browser, and Firefox 3.0 had proved not yet ready for prime time. It seemed that Canonical had gotten overeager in its desire to have something new to show. In my opinion, this bad judgment had damaged the company's credibility, and that of Ubuntu as well. I had attempted to uninstall Firefox 3.0, but the attempt had not gone well, and my efforts to repair it had been unsuccessful. At this point Firefox was not working at all in Ubuntu on the primary computer. Upon reinstalling Ubuntu, I could try again to uninstall Firefox 3.0 and restore Firefox 2.x, thereby also regaining access to very useful add-ons that were not yet functioning in 3.0. There was also the question of what to do about Windows. I had several options. One was to wipe out the Windows partition. I thought it might be less drastic to use GPartEd simply to hide the Windows partition before reinstalling Ubuntu. In that case, I thought, I might still have a dual-boot computer, but I would be able to get into Windows, in an emergency, only by unhiding it. It would not appear on a GRUB boot menu, so when the Windows partition was hidden I would simply boot directly into Ubuntu, and when the Windows partition was unhidden I would simply boot directly into Ubuntu. A third option was to try again with the dual-boot concept. Since I was reinstalling Ubuntu, I would not need to use the additional tools and other options I had discovered for possibly fixing the installation or configuring GRUB from within Windows, including GrubInstall, Grub4DOS and WinGRUB. I decided to try this kind of hidden-drive dual-booting and see what happened, so I didn't go further with those other GRUB-related tools at this point. I booted the GPartEd CD and reviewed the situation. Windows occupied the first partition of the first drive, as it demanded. Its partition was largely empty, given that I had now installed just a basic WinXP system. So I instructed GPartEd, first, to shrink that partition and make the space available for other uses, and to hide that partition. My second hard drive, at present, was being used for backup. I thought it probably made more sense to switch the SATA cables and let Ubuntu be on the second hard drive. That way, if I stopped using an internal backup drive, it would have no effect on Ubuntu drive addresses; Ubuntu would continue to be in the first partition on the second drive. All of the second drive's partitions would continue to be logical drives within an extended partition, and my third hard drive would now be backup space. According to a seemingly knowledgeable Ubuntu forum post, it was OK that my Ubuntu partition was extended rather than primary. Chapter 16 of the Workstation User's Manual had some performance tips. First, it said, "The performance of virtual machines depends on the capacity of the host machine's processor or processors, and might degrade significantly if you overcommit the processors by running too many virtual machines at the same time" (p. 369). I decided I would experiment with this and, if necessary, would double-up some of the programs, so as to reduce the number of virtual machines in use; but for now I would rely upon the 64-bit processor (and a possible future upgrade to a faster one) to handle two or three simultaneous virtual machines, which was what I expected to be running most times. The manual also said that Linux 2.2.x series kernels would support only 1GB of physical memory by default (p. 370). "Physical memory," according to Wikipedia, meant RAM. Wikipedia also said that Ubuntu 8.04 used Linux kernel 2.6.24. This made it seem like this section of the Workstation User's Manual might not have been updated recently, as the latest kernel to which it referred was only 2.4.x. The manual advised against having low free space on the host disk (p. 371). A somewhat confusing Ubuntu community FAQ advised having, ideally, twice as much swap space as RAM, but also seemed to cite Wikipedia for the concept that 2.6.x kernels use swap files in addition to swap partitions; that those files are just as fast as swap partitions; and that Linux can put those swap files anywhere, as needed. But I had squeezed some extra space out of a neighboring partition, so I set swap at 6.7GB and the Ubuntu program partition at 107GB. As a performance-improving alternative, VMFAQ.com recommended using separate hard drives for the operating system and the virtual machines. I wasn't sure how that was done, but I decided to reserve space for it, just in case. So on the third hard drive, I told GPartEd to carve out another 100GB ext3 partition and called it VMS. I chose the third drive because I was thinking that Ubuntu would be busy on the second drive, and my data would be getting written to the first drive, so this third drive would otherwise be sitting idle except when I was writing some kind of backup to it. With all those changes set, I slapped GPartEd on the ass and said Giddyup! and it took off. And so did I. I went for a run, and when I came back, I took a shower, ate, went to the movies, went shopping, and generally frittered away the day. Because it was Saturday. Because it was summer. Because it looked like it was going to take GPartEd ten hours to make all those changes. Next day, I started a new post to chronicle my new start in Ubuntu and VMware.
nice blog and post..
ReplyDeletekeep up buddy..