Creating Smaller Virtual Machines

Now that Virtual PC is finally free, I've become obsessed with producing the smallest possible Windows XP Virtual PC image. It's quite a challenge, because a default XP install can eat up well over a gigabyte. Once you factor in the swapfile and other overhead, you're generally talking about around 2-4 gigabytes for relatively simple configurations.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2006/07/creating-smaller-virtual-machines.html

Did you turn off hibernation support? hiberfil.sys is a big as the VM’s ram.

I have an XP boot CD made using…something (I forget what), so that’s obviously a very small build.

“Unfortunately, XPlite is payware”

Why is paying for a good product an issue? Don’t you
like to get paid for the develpment work you do?

Like many out there I like open source and free whenever it makes since but clearly you liked the product and shouldn’t the developer or team that created be rewarded.

hiberfil.sys is a big as the VM’s ram.

Hibernation is generally off by default in XP… I always have to manually enable it.

Why is paying for a good product an issue?

It’s not an issue. In fact I bought a copy of XPlite during the composition of this post. But one of these things is not like the other…

Great post, but seriously, I’m amazed you’d waste this kind of time and not just use Virtual Optimizer.

http://www.hanselman.com/blog/InvirtusVirtualMachineOptimizer.aspx

On my post you said this functionality wasn’t worth $40. You MUST have spent at least an hour messing with this and writing this post. How much are you paid an hour? :wink:

And another thing…no way I’m installing a defrager made by the “Whitney Family.” Who do you trust?

pagedfrg by SysInternals:
http://www.sysinternals.com/Utilities/PageDefrag.html

:stuck_out_tongue:

I’m amazed you’d waste this kind of time and not just use Virtual Optimizer.

The Virtual Optimizer only zeroes out the drive. it doesn’t…

  1. Reduce the size of Windows XP
  2. Defragment the drive

It does provide a 15% size reduction, which is nice, but it’s hardly the entire point of the article. It does work as advertised, but personally, I’d rather spend that $40 on XPlite.

no way I’m installing a defrager made by the “Whitney Family.” Who do you trust?

Yes, it might destroy my… virtual… machine… oh no. :wink:

The resulting 758 megabyte .vhd (Virtual Hard Drive) image is also highly compressible.

I created a self-extracting RAR image of the .vhd and the .vmc file – it’s only 243 megabytes!

Really cool!

Have you tried running VMOptimizer on the final image, to see if you can squeeze it down a bit more?

http://www.invirtus.com/

This is del.icio.us material! What a cool concept that you can distribute a full VM on a single CD-R!

Since my laptop doesn’t have a DVD Burner, I struggled with this.

However, as soon as you install Visual Studio / Sharepoint / SQL Server, and such it will push it over the 800mb limit, but at least you can have a CD of something to start with.

Good work.

You may want to look at the free nLite tool to create a stripped-down Windows XP CD. It appears to include some of the same functionality as XPlite, but applies it before the OS is installed.

http://www.nliteos.com

Nlite’s great for creating very stripped-down disc images to install from. It provides cleaning options very similar to XpLite and is free.

it would be nice to have a heavily trimmed down windows xp install entirely geared towards gaming

for us linux and mac users to install on another partition

Compress it with 7-Zip instead of RAR, and you’ll save even more space.

http://www.7-zip.org/

It’s free (LGPL).

Have you tried running VMOptimizer on the final image

I was skeptical, but VMOptimizer worked. You use their special ISO to compact instead of the buil in Pre-Compaction ISO. Here’s what I got…

Original size: 758 megabytes
VMOptimizer size: 641 megabytes

I wonder if Parallels’ compressor (trialware) would compress any better than Invirtus VM Optimizer or Virtual PC?
http://www.parallels.com/en/products/compressor/workstation/

Does all this work with virtual server too, or this a vpc thing only?

Why free matters: I’m allowed to use free utilities at work, but anything I have to pay for requires a lot of red tape. It is actually easier to get a $600 tool than say a $40 tool.

Here’s an easy one:

Still not using that good old modem and are not planning to in the foreseeable future? Got a xDSL line, Wifi connection or LAN you always hook up to?

I thought so…

Then why not kill all the modem driver description files from “%systemroot%\inf”? They’re the “mdm*.inf” ones and they take up quite a few megabytes.

Btw.: Does anyone know a simple way to locate other deletable driver files… like say: old ISA-card drivers, drivers from obsolete graphic cards and TV-tuner devices?