Creating Smaller Virtual Machines

I assume you did this, but not specifically mentioned:

Go into the Windows directory and delete all the patch backup directories, these can easily add up to 50MB space on disk.

Jeff:

Have you also gotten rid of all of the driver cab files. Your hardware is a known issue, so you shouldn’t need any of the autodetect hardware stuff. I believe it is “%windows%/driver cache.” In the past when Connectix owned it, I would even minimize the size of the swapfile. With 2GB RAM, my VM’s are hardly noticable during demos.

I must say though, if anyone reading this is going to do presentations with VM’s–don’t say…“It’s the VMs fault”–it’s your fault if you haven’t prepared a correctly working VM (including plenty of RAM to go with it)! It’s like Hanselman’s comment on “I know you can’t read this, but…” See hanselman.com/tools for ways to fix that too.

Hi,

I thought you might be interested in this thread concerning the so called “TinyXP” build that is claimed to be sub 70 MB in size.

a href="http://www.xtremesystems.org/forums/showthread.php?t=84885"http://www.xtremesystems.org/forums/showthread.php?t=84885/a

I haven’t personally verified claims, so i will be very interested in the results if you choose to test it.

Here’s another idea - how come we don’t see VM image freely distributed over Bit-Torrent and such? I mean as far as i understand - if the system is Sysprep’ed prior to distribution - it will require license key and in many ways will be indentical to a regular install, so that doesn’t necessarily equate to piracy. At least that’s not my intention bringing it up.

Fine, maybe Microsoft can be opposed to 3rd party distribution for one reason or another - but they themselves could defenitely distribute beta versions of their products in such form, no?

I am sorry, i had the link in my bookmarks for a while, so my memory of the contents was a little bit hazy - i just visited the link again prompted by your post and i’d like to make a correction:

It’s a 100MB install that results in a 400MB installed image, that is claimed to only use 40MB of RAM to run.

Seems like still an improvement over your results.

You should change your path from:

C:\windows\system32\

to:

%WINDIR%\system32\

:slight_smile:

Have you also gotten rid of all of the driver cab files. Your hardware is a known issue, so you shouldn’t need any of the autodetect hardware stuff. I believe it is “%windows%/driver cache.”

Good idea. I ticked those two boxes in XPlite (remove cached server pack files, remove cached driver files). I tried to run Invirtus again, but it refused – “can only run one time per VM for trial edition”. Instead, I ran the invirtus drive zero-ing command line tool ( InvirtusFreeSpace.exe ) that’s on the Invirtus trial ISO image. That produced the same compaction results as doing an autorun (!)

The resulting image is now 587 megabytes.

There was a big thread at neowin.net’s forum where some guys tried to have the smallest windows folder. One of those guys wrote a complete guide which you can read at http://www.bold-fortune.com/forums/index.php?showtopic=229

Everything is done manually

this post is a keeper!

(lb tucks the entry away in his del.icio.us account)

You can also delete %WINDIR%$NtUninstall

Has anyone had any luck with Win2k3? I can only get to about 1.5 GB with SQL Server and IIS.

Another interesting idea: once the “base” drive image is created you can switch the virtualPC machine to use a differential drive based on the “base” drive. This differential drive can be kept in sync using FolderShare so you can use the same Virtual machine from different computers without many synchronization troubles.

Sounds great - no good for test machines where you need it to be a pure ‘out-of-the-box’ self-resetting VM, but just the ticket for specialist needs, such as setting up a Subversion server, or creating a sandboxed Internet browser VM.

Hmm - your filter is now blocking (dot)info web addresses as ‘questionable content’.

Just shrunk my Win2k3 base drive to 1GB using the methods outlined here and the Invirtus optimizer.

Thanks!

We’ve got a 14Mb XP iso booting cmd.exe as shell and a standard project that will create a 50Mb XP boot CD with explorer as shell (not to mention a few other features like the hability to boot and run from RAM)

This is done using WinBuilder and the projects that come included with it. All our works and developments are free to everyone.

hey, just randomly came across this when searching for something else… just goign to say, i run TinyXP and it does what it says, i’m using it as a main OS though as my windows xp was broken and i didnt realise when i formatted my pc… but tinyxp does use 40mb of ram and around about 400mb installed… it’s a great OS.

Hmmm, seems possible to get it small enough to fit on a flash drive.

Yeah nLite is a kick ass software.
My favorite proggy!

Here is another useful resource for you article:
http://addons.wordpress.com/

A hell what of nLite addons :slight_smile:

Jeff, great post. Thanks for your time in helping the rest of us by sharing your knowlege.

=-=-=-=-=-=-=-=-=-=-=-=-=-=

If you want a free tool for zeroing out the empty space of a drive use the, formerly sysinterals, product SDelete.exe. You can download it from here http://www.microsoft.com/technet/sysinternals/utilities/SDelete.mspx

Use the command:

sdelete.exe -p 1 -c driveletterwithcolon

This will pass over all the empty space of the drive once and write zeros. I use a copy of the UBCD4Wim (http://www.ubcd4win.com) that I made to boot my VM and use the tool when not actively booted to the drive image I want to zero out.

Hope this helps some out there.
-JMM

Another interesting idea: once the “base” drive image is created you can switch the virtualPC machine to use a differential drive based on the “base” drive. This differential drive can be kept in sync using FolderShare so you can use the same Virtual machine from different computers without many synchronization troubles.

Although this article applies to VPC 2004 - I’ve recently been working on creating a developer image and followed the steps here and had one small problem.

If you uninstall the indexing service for Windows, the search box in IE 7 is completely hosed. The only way I could get it to work correctly was to reinstall the service. I don’t know why these two items are coupled together, but it’s something to watch for.