BPSoftware.com
Home   Utilities   Purchase   FAQ   Support   Contact        
Shareware Utilities
 APrintDirect
 AIconExtract
 AFile Attribute Manager
Freeware Utilities
 AddrMon
 AFileSync
 ASysIcon
 B&P Table Utilities
 BPACLer
 BPSNMPMon
 BPSNMPUtil
 CharCount
 Delphi® Components
 MacAddr
Miscellaneous
 BPSoftware Blog
 Purchase Shareware
 Support

 


Sunday, September 30, 2007
Compact that Virtual PC

I have long been a fan of Virtualization. Ever since the early days of Virtual PC, I have been spinning off virtual machines to test and install software applications and code. It has even gotten to the point where I do very little on my host machine. I even do most of my web browsing within a Virtual PC (you can't always be certain what sites will do to your host machine). The flexibility of being able to install, test and uninstall applications without affecting the host offers many benefits. There is also a bonus with the Undo Disk option within Virtual PC. With an Undo Disk you can start up a Virtual PC and do “your thing” and then have the option of committing or deleting the session changes upon shut down. Take the benefits of virtualization and the fact that Microsoft Virtual PC 2007 is free and it is no wonder why Virtualization is now mainstream.

One thing that I had noticed using Virtual PCs is the disk size of the virtual hard disks. The virtual hard disks can be of fixed or variable size. If you opt for a variable sized hard disk, the disk will grow as you use it. The installation of application, copying of files and general processing use will cause the amount of space the virtual disk uses on the host machine to grow. As files are removed, applications are uninstalled and processing decreases I noticed that the virtual hard disk size doesn't decrease. In the help file there is a section that explains how to "Compact a virtual hard disk". The steps are pretty straight forward as they explain how to use the Virtual Disk Compaction option through the Virtual Disk Wizard. I did this on a number of virtual hard disks and really wasn't impressed with the results. To be honest, I didn't notice any change in the size of the virtual hard disk after running this process.

After a little confusion I noticed one important note that is in the help file, "Before compacting the disk, we recommend that you use a disk utility to zero out blank space, which should result in a smaller compacted virtual hard disk". After I thought about it, it did make a lot of sense. Now, where do I get one of these little utilities?

In the Virtual Machine Additions folder (under the Microsoft Virtual PC program folder) there is a Virtual Disk Precompactor.iso file (I found the "Using Virtual Disk Precompactor" section of the help file afterwards). It didn’t take much for me to figure out that this utility probably should be used prior to compacting a Virtual Hard Disk. It was a simple enough test; after all I was only trying it within a virtual PC. If you capture this iso file from within the Virtual PC and autoplay it, this utility will "prepare the virtual hard disk for compacting". After you run this utility, close down the Virutal PC and follow the steps for compacting a virtual hard disk found in the help file (you'll need to commit the changes if you are using an Undo disk). Take a look at the size of your vhd's before and after, the difference will be shocking. I know I reclaimed many many gigabytes of space on my hard disk.

Another great feature that is worth looking into is a Differencing disk….

Labels: , ,

posted by Brad Prendergast at 8:53:00 AM
Comments:
virtualization is great but there's a really ugly part to it. micro$oft's licencing:

supposing you have 1 windows pc with 3 virtual pcs also running windows. microsoft says you need 4 windows licences. i consider that to be greedy on microsoft's part and the value of virtualization fell to a fraction of what it was initially.
posted by Anonymous Anonymous Sunday, September 30, 2007 5:02:00 PM  
Well, you can also invest in a MSDN subscription, where you can install up to 10 VM's per. OS (that is - for development). On top of that you also get a lot of other stuff for development (the amount depends of the type MSDN subscription you choose). Seen from a professional developers point of view, it really doesn't matter whether you have to spend $800 to $3000 to get a great development environment. That is a very small price compared to what almost any kind of development project costs. Currently i use 4 XP licenses, one for Delphi, One for Visual Studio, one for Ruby/PHP, and the last one is empty used for testing applications. Then i also have a W2K, a Vista Enterprise also for app. testing.

If you need webservers,database servers etc. there are plenty of Linux based ones you can use for free (although there are plenty of those in MSDN as well).

A little off topic, but this clearly demonstrates the advantages of a MSDN subsription (apart from virtualization, and testing) :

A few months ago i had to find out how some BIOS code on my motherboard worked (it had a special I/O port - which according to the manufacturer you could only get to via DOS bios calls or using a nasty windows driver) - so in order to step through the BIOS, i downloaded MS-DOS 6.22 from MSDN, fired up debug, wrote a few lines ASM, stepped through the BIOS call in question, and i was in business with my I/O from Delphi without using any of the nasty drivers from the manufacturer, all just in in ½ day. And that only happened because of my subscription.

After all, when you are virtualizing, you are running different computers, the great advantage is that you don't have all those in a physical form, you don't have to reinstall your develemopment environment when you get a new computer, it is very easy to test that your appication works on an "empty" OS, if you keep your VM's on an external drive, it is very easy to move your environment(s) around, ie. from your office, to your home computer, to your laptop. No need for replication...
IMO, the advantages of VM's greatly outweighs the price of licenses you need to buy - even if i had to pay for the licenses individually.
posted by Anonymous Jan Monday, October 01, 2007 1:57:00 AM  
Glad I came across this post - I have several VM's and they are beginning to consume way too much disk space. I ran a compact on them but didn't gain very much back in terms of free space.

It was this post that put me onto the Pre-Compactor process, and I after running it and then compacting, I have gained literally gigabytes of free space.

Thanks for the great post - I've bookmarked it into my delicious as I will no doubt need to refrence it again, and my memory isn't what it used to be.....

Cheers

Phil
posted by Anonymous Anonymous Saturday, April 12, 2008 7:10:00 AM  
Links to this post:

Create a Link

Recent Posts
 Is it Hammer Time?
 DSOFile and Summary Properties
 ShellExecuteEX and ShellExecuteInfo Revisited
 A ToolStripMenuItem and a Check
 Who is copying your web site?
 A little FileIconInit for the System Image list
 Code Monkey
 A DataGridView, DataGridViewCheckBoxColumn, DataGr...
 Those Commercials
 System Information and the PerformanceCounter Clas...


Labels



Archives
 October 2005
 November 2005
 December 2005
 January 2006
 February 2006
 March 2006
 April 2006
 May 2006
 June 2006
 July 2006
 August 2006
 September 2006
 December 2006
 January 2007
 February 2007
 March 2007
 September 2007
 October 2007
 November 2007
 July 2008
 November 2008
Powered by Blogger