Using Virtual PC / VMWare virtual computers
What's a Virtual Machine?
A virtual machine or virtual computer (we'll call them VMs for short) is a "software computer" that runs inside your real physical computer. There are several programs that can create and run these VMs.
The Virtues of Virtual
A virtual computer is really just some software and files that run inside your real physical computer. You can start up and shut down virtual computers at will without affecting your real, physical computer. You can work on both real and virtual computers at the same time and even copy information and files back and forth between them.
But the virtual computer has only limited access to your real computer and its files, and only the access that you grant it, so you can:
- Install beta or other potentially damaging software, open suspect files, visit untrusted web sites and generally do anything you like, all with minimal risk to the real computer that the virtual comptuer is running on.
- Install and run multiple versions of Office, even at the same time, without worrying about them interfering with one another.
- Run different versions of Windows on one PC without having to set up multiple boots.
- And move the virtual computers from one physical computer to another, simply by copying files.
- And back them up just as easily.
And since a virtual machine is just a set of files on your real computer, if something goes wrong, you just delete the files and start over (quite quickly if you follow the method we explain below).
Let's get Virtual
Here's how you go about installing VM software and creating virtual machines. For this example we'll use Microsoft Virtual PC; it's a good product and it's now free. If you prefer to work with other products like the inexpensive and excellent VMWare, the steps are pretty much the same.
Here's the general plan:
- Install Virtual PC (VPC) or other software that'll let you create and manage VMs
- Use the software to create and configure a new VM
- Start the VM and install Windows (orwhatever supported operating system you want to work with; we'll talk aboutWindows from here on, but take it as written that you can also use LInux, Unix, DOS, or pretty much any other operating system that can run on Intel hardware.
- Configure Windows
- Back up your VM
- Create a new copy of your VM, launch it and install software
And a bit of terminology, since having several "computers" running on one computer can be confusing:
- HOST: the actual physical computer and operating system.
- CONSOLE: the "control panel" for the VM software; you use it to set up, configure and start/stop virtual machines.
- VM: the abbreviation we'll use for "virtual machine"; a virtual computer created by the console/VM software.
Preparation
Does your PC support the VM software you plan to install? VPC and VMWare have different hardware and software requirements, but your PC (the "host" remember?) should have:
- A fast processor.
- Plenty of RAM (2 gigabytes minimum, more if you'll be running Windows 7 VMs or plan to run several VMs at once -- Yes, you can do that! ).
- Lots of hard disk space.
- A supported operating system; check the VM software site for specifics. And from personal experience, I wouldn't suggest running a 64-bit Windows VM on a 32-bit Windows host.
You'll also need a Windows CD or some other bootable means of installing Windows. Check your end user licensing agreement for specifics on whether it's permissible to install your copy of Windows in a VM. MSDN users: most VM software allows you to specify an ISO image file of a CD in place of a physical CD.
Install the VM software
If you plan to use VPC, you can download it from Microsoft here (or just google "Microsoft Virtual PC" to get to the Virtual PC site).
Run the setup program for your VM software. The setup program will create a console program. Start the console.
Create a Virtual Machine
The console will have an option to create a new virtual machine. Usually you can set it up manually or use a wizard ... we suggest using the wizard the first time or two.
The wizard may ask how much RAM and hard disk space to devote to your virtual machine. Go with its recommendations if so, at least until you've had some experience and have reasons to want to change it.
While it's tempting to hand the VM all the RAM you can, we've had the best luck sticking with the wizard's recommendations in both Virtual PC and VMWare. Giving the VM too much RAM actually slows it down (largely because it starves the host system's resources). Virtual PC Guy has more/better information on this subject
The amount of hard disk space you allocate will depend on the Windows version you plan to install into the VM and what software you want to run in it. For Windows XP and a copy of Office, 8gb seems to be a minimum. For Win7 and Office 2007 and later, plus other useful software, I've been giving VMs 40gb lately.
You can always move your VM files off to temporary storage if you're short on host disk space. It may be difficult to increase the size of a VM's hard disk once you've created it. Allow yourself some room to grow. Speaking of growing, your VM software probably lets you allocate hard drive space in advance or lets you set up the virtual disk so it grows as needed. Those 40gb VMs only take up 10gb or so to start if you do the latter.
Install Windows into your VM
Insert your Windows CD then use the console program to start your new VM. Depending on the host and VM settings, you may have to choose a "Connect" option to get the VM to recognize the CD, but once it does, let the VM reboot the Windows CD and install Windows.
Partway into the install, the Windows installer may offer to reformat your entire hard disk. Don't Panic.
Look carefully at the size of the disk it's offering to format. It will be identical to the amount of hard disk space you've allocated to the VM (if not, quit!). Windows is only going to "format" a file; the VM software fools it into thinking it's a hard drive. It will NOT format your real physical hard drive. Let it do what it wants.
One Windows is installed, do all the little things you'd normally do to scrape off the dumb that comes with every new copy of Windows and get it ready for use:
- Important: Install any special "additions" or update software specific to the VM program you're using. Install the VPC Additions from the console menu if using VPC; if using VMWare, install VMWare Tools.
- Change Windows Explorer settings to suit your preferences, get the network working, install any needed printer drivers and so on.
- Install any needed Windows updates.
- Install any "must-have" software .... the little utilities and such that you'd want to have on every Windows computer you use.
Tweak it
Dan's Archive has this excellent guide to creating Fast XP on a VPC. It's available in several formats and is so good we think you should read them all, even though the content is the same. Yeah. Joking. But do read it.
Now back it up
Once it's done, shut down your virtual copy of Windows and then CLONE it if the VM software provides this feature (VMWare does; I'm not sure of VPC). If cloning isn't an option, quit the VM console program, locate the files that represent your new VM and make a copy of them in another folder.
From now on, use the copy or clone. Leave your original untouched. That way, no matter what happens, you can always revert to a clean, ready-to-go copy of your VM without having to go through all the time and trouble of creating a VM and installing/setting up Windows.
Restart the VM console and use its File, Open command to open the copy/clone you just created and start the VM. Now you can install any other software you want to test, or do whatever you set up your VM for.
In perfect safety.
It's kind of like Vegas: Whatever happens in the VM STAYS in the VM. Your host computer's isolated and protected. If something breaks, you can quit the VM and the console and just delete the files that make up your VM. Hasta la vista, baby. Or hasta la XP or Win7.