You are running Linux, and are happy except for a few business requirements that need exact Windows compatibility. Examples include the Track Changes feature in Word to referee papers, or Internet Explorer for an airline reservation or grant proposal web site. What are your options?
You can use VMware to turn Windows XP into a Linux application that starts cleanly the same way each time, regardless of what the user or viruses do to it. The feature list includes:
Linux laptop users may find the Windows XP application has more attractive integration and maintenance properties than dual booting. Or have both: dual boot to native Windows to test and integrate new hardware, and use the Windows XP application for daily use.
You need one Linux machine running VMware Server, a separate Linux machine running VMware Player, and a shell script. The installers for Server and Player want to deinstall each other, and for now I'm using two separate machines. My Server machine is a Dell Optiplex GX270 manufactured in 2004, with 2 Gig of memory and 40 Gig of disk.
Some user interface settings I suggest:# Install Ubuntu 7.10 from cd # log in -> Application -> Accessories -> Terminal $ sudo -i # reinsert 7.10 cd for apt-get's use $ apt-get -y install build-essential emacs22 emacs22-el elisp-manual # you might add these for your development convenience $ apt-get -y install openssh-server tkdiff $ apt-get -y update $ apt-get -y dist-upgrade # wait while all this is downloaded and installed. I had to hit enter # on one text-based query box. # reboot and remove cd before boot # log in $ sudo -i # so that ssh incoming to root works $ passwd root
Installing VMware Server:# Make window focus follow mouse $ gconftool-2 --set /apps/metacity/general/focus_mode mouse --type string # Make gnome applications accept Emacs editing keys $ gconftool-2 --set /desktop/gnome/interface/gtk_key_theme Emacs --type string # Make the left Windows key dig through windows -> System -> Preferences -> Keyboard Shortcuts -> Window Management -> Raise obscured window, otherwise lower -> Left Windows logo key -> System -> Preferences -> Appearance -> Fonts -> Subpixel smoothing (LCDs) -> System -> Preferences -> Appearance -> Visual Effects -> None
Creating a virtual machine to hold Windows XP:-> Application -> Accessories -> Terminal $ sudo -i # Install VMware-server-1.0.6-91891.tar.gz $ tar -zxvf VMware-server-1.0.6-91891.tar.gz $ cd vmware-server-distrib $ ./vmware-install.pl In which directory do you want to install the binary files? [/usr/bin] /depot/vmware-server-1.0/bin # When you see this error, ignore it, just hit enter: Please specify a port for remote console connections to use [902] inetd: no process killed Unable to make the Internet super-server (inetd) re-read its configuration file. Please restart inetd by hand: killall -v -HUP inetd Hit enter to continue. # Take prompted suggestions for everything else, except: In which directory do you want to keep your virtual machine files? [/var/lib/vmware/Virtual Machines] /depot/vmware-virtual-machines # Enter no-cost serial number you received from vmware.com
Installing Window XP in the virtual machine:$ /depot/vmware-server-1.0/bin/vmware -> Create a new virtual machine Typical 1. Microsoft Windows Windows XP Professional Name: "XP" Location: /depot/vmware-virtual-machines/XP Use Network Address Translation (NAT) Disk size 8 Gig Allocate all disk space now Split disk into 2GB files -> Edit virtual machine settings # On a Dell Optiplex GX270 from 2004, with 2 Gig of memory 752 Meg of memory
If during the Windows XP loading you get an error like:# Insert Win XP Pro cd # close Ubuntu file browser which opens on cd -> Power on this virtual machine # Do Windows XP install as prompted by Windows Format the partition using the NTFS file system (Quick)
It means your cd is a bad copy and you need a replacement. If you put the cd into the tray in Ubuntu and try to tar off the I386/asms directory, tar will report read errors on the bad files. Replace the cd, quit VMware, delete the XP directory, and redo the virtual machine creation and XP install from scratch. Continue as if we didn't get that error:An error has been encountered that prevents Setup from continuing One of the components that Windows needs to continue setup could not be installed. The parameter is incorrect. Press OK to view the Setup log file Error: Installation Failed: D:\I386\asms. Error message: the parameter is incorrect.
Load Office 2003:hostname is "VMware", organization is "something appropriate for you", username is "user" -> Shut Down from Start menu
Install McAfee antivirus:-> Power on this virtual machine # Insert the Office 2003 cd, Windows will autorun it Do you want to check for updates? Yes Installed service pack 3 update for Office 2003 Did not choose beta updater version Closed Office 2003 update web site browser when prompted Turned on automatic Windows update (to prevent error messages) Did Windows update Installed ActiveX control it asked for Installed updating program it asked for Update includes Service Pack 3 Rejected Internet Explorer version 7 Downloaded MacAfee to Desktop Cleaned IE, -> Tools -> Internet Options Set start page deleted Cookies deleted Temporary files deleted downloaded files cleared Browsing history
Install VMware tools. These handle the mouse going in and out of the VMware window, resize Windows' idea of the video card when the user resizes the window of VMware, and support File Sharing with the world outside VMware.Perpetual License
Add in file sharing and other features. VMware Server will not add in the File Sharing configuration file entries, the relevant menu entry from Edit virtual machine settings is completely missing; but if the config entries exist, VMware Player will operate with them. We tell the file sharing to act like it was root, and then the files it can access will be filtered by whatever user runs vmplayer. vmplayer does not run suid.-> VMware -> VM -> Install VMware tools # Must use Complete instead of Typical to get File Sharing driver Setup type: Complete InstallShield completes Accept video improvement suggestions VMware tools icon in taskbar Options -> Time sync between VM and host -> Start -> Shut Down -> VMware -> File -> Quit
Now startup and shutdown the Windows repeatedly until you stop seeing balloon messages and so forth, and it comes up clean. Whatever state you leave it in now is what your users will see.$ emacs /depot/vmware-virtual-machines/XP/XP.vmx delete: uuid.location uuid.bios add: uuid.action = "create" usb.present = "TRUE" usb.generic.autoconnect = "FALSE" sound.present = "TRUE" sound.fileName = "-1" sound.autodetect = "TRUE" sound.virtualDev = "es1371" sharedFolder.maxNum = "1" sharedFolder.option = "alwaysEnabled" sharedFolder0.present = "TRUE" sharedFolder0.enabled = "TRUE" sharedFolder0.readAccess = "TRUE" sharedFolder0.writeAccess = "TRUE" sharedFolder0.hostPath = "/" sharedFolder0.guestName = "root" sharedFolder0.expiration = "never" isolation.tools.hgfs.disable = "FALSE"
Copy the state of the XP machine off someplace for safekeeping. This is the state you will return to and start from, to make any changes to what is inside the Windows XP world.
Add the snapshot feature, managed by a script to reset the modifications before and after each run:$ cd /depot/vmware-virtual-machines/XP $ tar -cf /someplace-safe/XP-this-date.tar .
If you did -> VM -> Snapshot -> Remove Snapshot, most of these changes will be reversed. To reverse all of them, go back to the tar copy.$ /depot/vmware-server-1.0/bin/vmware # Do not power on virtual machine. -> Snapshot These files get modified: XP.vmx XP.vmsd These files get added: XP-Snapshot1.vmsn XP-000001.vmdk XP-000001-s005.vmdk XP-000001-s004.vmdk XP-000001-s003.vmdk XP-000001-s002.vmdk XP-000001-s001.vmdk
Save the unmodified snapshot files that we're going to roll back to, outside the scope of VMware Player:
Now copy the whole XP directory to ANOTHER machine, which you will run VMware Player on. The installers for VMware Server and Player fight badly if you try to put them both on the same machine, no matter if you tell Server to install into another path. The installer finds conflicts with: the kernel modules loaded, the compiled kernel modules in existance at all, the previous networking setup, the previous global conf files for VMware, and on and on:$ for i in XP.vmx *000001* ; do cp -va $i $i.master ; done
The .vmx file must be writable by whoever is running the player. Both user-triggered option changes and notes to itself about generated ethernet addresses and so forth get written to it:root@here# cd / ; tar -cf - depot/vmware-virtual-machines/XP | ssh root@elsewhere 'cd / ; tar -xvpf -' root@elsewhere# cd /depot/vmware-virtual-machines/XP
Add the script to control the rollback each time Windows XP is started up. Adjust pathnames to local taste:$ chmod 777 . $ chmod 644 * $ chmod 755 XP.vmx*
$ mkdir -p /depot/windows-1.0/bin
$ cd /depot/windows-1.0/bin
$ cat > windows
#!/bin/bash -e
trap '
SAVEDSTATUS=$?
set +x
if [ -z "$CLEANEXIT" ]
then
echo "$0: ERROR Unexpected exit with return value of $SAVEDSTATUS"
exit $SAVEDSTATUS
fi' EXIT
#-----
BASE="/depot/vmware-virtual-machines"
EXT="XP"
SNAPFILES="${EXT}.vmx
${EXT}-000001.vmdk
${EXT}-000001-s001.vmdk
${EXT}-000001-s002.vmdk
${EXT}-000001-s003.vmdk
${EXT}-000001-s004.vmdk
${EXT}-000001-s005.vmdk"
cd "$BASE/$EXT"
rm -f $SNAPFILES *.log
for i in $SNAPFILES
do
cp -a "${i}.master" "$i"
done
vmplayer "$EXT.vmx"
# Reset entirely so the native VMware Server 'open a machine' dialog
# will still work
rm -f $SNAPFILES *.log
for i in $SNAPFILES
do
cp -a "${i}.master" "$i"
done
#-----
CLEANEXIT=1
exit 0
^D
$ chmod +x windows
Add /depot/windows-1.0/bin to PATH in whatever way you do that
locally.
Install VMware Player:
Run the "windows" script, and see if everything works:$ tar -zxvf VMware-player-2.0.4-93057.i386.tar.gz $ cd vmware-player-distrib $ ./vmware-install.pl $ vmplayer # accept license -> Player -> Quit
Now you can tar copy /depot/vmware-virtual-machines/XP and /depot/windows-1.0 to other machines, install VMware Player on them, and run this Windows image without managing those other copies as separate, evolving entities.$ /depot/windows-1.0/bin/windows -> Player -> Shared Folders -> Always enabled # In Windows Explorer, your Linux root directory is at: \\.host\Shared Folders # This file is created by Player $ chmod 644 /depot/vmware-virtual-machines/XP/XP.vmxf
If you get a duplicate machine warning when you run Player, click OK and ignore it.
When you choose to evolve what is on the Windows, such as to set up a
PostScript driver and network printers, I suggest going back to the
pre-snapshot tar copy, making the changes to a copy of that, and
moving forward from there.
You type "\\.host\Shared Folders" into a Windows explorer and it doesn't find the host, yet you've added the file sharing entries to the .vmx file, and enabled File Sharing in VMware at powerup time. Is the Windows driver installed for VMware file sharing? Here's how to check:
Look at the bottom for:-> Start -> Help and Support Search: network diagnostics Fix a Problem o Network Diagnostics Scan your System
If it isn't there, do:Modems and Network Adaptors [+]Network Clients VMware Shared Folders <--- !!!
And this time pick:-> VMware -> VM -> Install VMware tools
Setup type: Complete
It seems that VMware server doesn't have the feature to collapse a snapshot back into the base hard drive image; the choices are either to run on the snapshot forever, or to Revert, make unrevertable changes, then take another Snapshot. This suggests a tar copy as a snapshot operation to provide the feature missing from VMware Server.
http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1277577,00.html
The easiest way to recombine these snapshots into a single virtual hard disk file is to download a 30-day trial version of VMware Workstation 5. Using Workstation it is possible to clone a virtual hard disk or collapse a snapshot chain back to one virtual hard disk file.
| (C) University of Florida, Gainesville, FL 32611; (352) 392-1941. This page was last updated Thu Sep 18 16:33:44 EDT 2008. |
![]() |