I have not been a real big fan of using VPC until recently with the Betas and releases of Visual Studio and SQL 2005. Now I can’t stop creating images with different environments for testing Service Packs, OS, Project Server, VS/SQL2005, etc. I want to share with you and also record the steps I used for making my images run efficiently. The information I present are tricks that I have learned from two major VPC users, Andrew Connell and Virtual PC’s Guy. These guys have taught me about base disks and differencing disks. The base disk is the foundation for what ever you are trying to build. A good reference for measuring what is added to a base disk is adding things that take awhile to load and that can be used as a base for multiple images as well. The differencing disk is an image that builds on the base and allows for other changes while making sure the base image is left untouched.
1. Open VPC Console and from the File menu click “New Virtual Machine Wizard”
2. Use the default selection “Create a Virtual Machine” then click “next”
3. Browse to where you want the VPC image to be saved then click “next”
4. Select the OS that you will load on your image then click “next”
5. Select the RAM amount allocated to your image then click “next”
6. This is your first image so select “A new virtual hard disk” then click “next”
7. The default for where the hard disk is saved should be the same location where the VPC config you created earlier resides…click “next”
8. You should see a summary of what you just did in wizard and you are ready to create your image.
9. Load your OS, service packs, etc.
10. After you have everything loaded, go ahead and run the “disk defrag”
11. After defragging your image select the “CD” from the menu of your image and browse to the directory of where you installed VPC. Mine is in Program Files/Microsoft Virtual PC/Virtual Machine Additions/Virtual Disk Precompactor.iso
12. Your image will now undergo precompacting. Once this is complete, from the CD menu, release the precompactor.iso
13. Stop your image and from the File menu, select “Virtual Disk Wizard” then click “next”
14. Select “Edit an existing virtual image” then click “next”
15. Browse to the same location where your base disk resides then click “next”
16. Use the default value of compact it and let it run
17. Now click the settings button and disable “undo disk”
18. Delete the VPC setting file and set the base hard disk image to read-only
19. You are now ready to create a differencing disk!
20. Repeat steps 1-5
21. Here is where you create the differencing disk. Now change the default selection to “An Existing virtual hard disk”
Use your differencing disk for loading and testing software. If something goes wrong with the differencing disk, you can always create another one from the base disk and bypass reloading the OS and SPs that take forever.