Using Virtual PC can be frustrating as it is easy to screw up and end up wasting lots of time, and little guidance is available. So here are some tips.
First some concepts. A real PC can be described by the hardware, the contents of the hard drive and the state of memory. So a virtual PC is described by a settings file (hardware, sort of), a virtual hard drive, and a state file. The state file will not be saved if you 'shut down' within the virtual OS. If you stop the VPC while it is running, the state file can be saved. If you then delete the state file, it is as if you powered-off the PC without shutting down. For example, the OS will complain when you start back up. You can swap hard drives when the VPC is not running, or change memory size. What is hard, and the subject of this blog entry, is changing the hard drive size.
When you set up a hard drive, you can choose fixed size, or dynamic. Dynamic is nice because the file adjusts itself to whatever space is needed, instead of taking up the full space from the getgo. It's a little confusing, because it asks for a maximum size, and offers a size much larger than your real hard drive. You should resist the tempation to reduce it at all as it is hard to change later. This is the number which will show up in the VPC as the size of the disk. It has little to do with the actual size of the virtual disk file.
But lets suppose you already made that mistake and installed XP on a 16GB-max dynamic disk. That's plenty of space, of course, as XP takes up about 4GB. Then your boss tells you to upgrade the virtual OS to Vista. You refuse of course, so he waterboards you to make you do it. You confess to terrorism after 20 seconds, and finally agree to upgrade to Vista after 3 minutes of torture.
First thing you find out is that the Vista upgrade requires 15 GB of free space, beyond the 4GB you already use (despite the fact that the final result only uses about 7GB).
Tip #1: There is a 3rd party utility from vmToolkit called VHD Resize.
Sounds like just what you need. So you follow the instructions and you get a 64GB max dynamic virtual hard drive file. You then boot up your VPC and the hard drive size is unchanged *frown*. What the instructions fail to tell you is that there is a step you always have to do after resizing. They don't tell you this because to them it is completely obvious. What you have done is analogous to buying a new hard drive and copying your old smaller one bit by bit. That too will look to the OS like the size hasn't changed, because the partition hasn't changed. Aha! we have to expand the partition.
Tip #2: There is a DISKPART utility which comes with the OS.
I forget the exact syntax (yeah, it's a console app with text commands, fun), but you have to SELECT the drive, then SELECT the partition or volume, then EXPAND to fill all available space.
Ok, now you have enough space to do the upgrade. Once that's done, your disk is all fragmented and takes up about 14GB, even though there's only about 7GB of data on it. This is bad becuase you want to copy your disk file to a safe place whenever you have finished a critical and time consuming step (like after you activate the OS). You know there is a command to compact the disk file, so you defrag and then run it. Takes a while, and there is no improvement. If you read the instructions carefully, there is a little tidbit in there about running precompactor (what's that?).
Tip #3: You have to run precompactor before compacting.
Precompactor is located on a virtual CD ISO file in the Virtual PC directory in Program Files. You will find it next to the extensions ISO that you probably have run by now. Just attach to it in the usual way (sorry, this is not a general help screen), and it will blank out the disk sectors so compactor can remove them.
Still, the drive file will be significantly larger than the data. This is because compactor does not move data, it only truncates empty space at the end of the disk. Unfortunately, I don't know of a defragmenter which does a good job of moving files to fill the unused space. If you do, please add a comment.
Tip #4: <your defrag suggestion goes here>
Dangerous condition at Walmart Part 4
-
First a disclaimer. I am not a lawyer, so don't take any of this as legal
advice.
It turns out Colorado is a "Modified Comparative Fault" state. This means...
10 years ago
No comments:
Post a Comment