Andrew Connell [MVP MOSS]
1418 Posts |  40 Articles |  3755 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

Ever since Microsoft’s Virtual PC 2004 (VPC) was released, I’ve been using it for development tasks… specifically SharePoint related projects since it requires Windows 2003 and all my desktops have WinXP Pro installed. I also used a VPC for all my work my recent book (running MCMS and SharePoint require some specific configurations). If you’ve used it and you’re a SharePoint developer, or someone who works with server software quite a bit, you probably share my experiences and opinions related to management and installations. Recently I elected to not install any development applications (Visual Studio, SQL Server, testing apps & utilities, etc) on my primary desktop at home after a fresh build of the entire machine. Instead, I decided I’d move all of my development to a VPC environment. Why? Seems that my desktop @ home gets so cluttered with different apps and more and more freeware/shareware/beta/alpha development utilities that eventually, it hoses up and warrants a rebuild, something I hate doing and clearly doesn't pass the SAF (spousal acceptance factor). In moving all development to VPCs, I’m hoping to eliminate/reduce the need for rebuilds that seem to be required every 6-12 months or so.

The most significant issue with VPCs is the hardware requirements to make your experience not feel like you’re in a virtual environment. My machine at home is a P4 2.2Ghz w/ Hyper Threading tech, 2GB RAM, and a 30GB drive for OS/apps and a 300GB drive for data. All my VPCs reside in a single folder on my data drive. This config is plenty to make my VPC experience as close to a real PC experience (i.e.: working directly on your host OS). I don’t think my situation is that far from what many developers experience (except for you independents): (1) I have a work laptop and a desktop @ home, (2) when I’m home, I don’t want to pull my laptop out, much less use my work laptop for personal projects, (3) I don't want to run Windows 2003 Server as my primary OS, I prefer WinXP Pro.

I realized I needed a plan: how to best arrange & configure my VPCs to facilitate the following:

  1. Must be very easy & fast to run-up a new VPC
  2. Must be space friendly for management, portability, and backup

Right off the bat, a post by Roy Osherove pointed me in the right direction: How to use Virtual PC and still save lots of room: differencing disks. The concept is similar to backup strategies. What you are doing is creating a "base" VPC and install the most common things that you'll use in almost all situations.  Then after prep'ing it, you create a new virtual hard drive (*.VHD file), mark it as a differencing disk, and continue installing additional apps onto this disk. The differencing disk contains the "different" part between the two VHD files. So what have you gained?

  • Drive space: if you have have two VPC's that each take up 7GB, you're consuming 14GB (I ~really~ hope you didn't just learn something). But if you have a base disk that is 3GB, containing the core of all your VPCs, and two differencing disks, each taking up 4GB, you're now only consuming 11GB. Sure, this may only be a 23% increase in disk space, but consider that this is only two VPCs. Factor in 3 VPCs, and you're now saving 7GB or 33%. The more VPCs, the more space you save, but obviously the law of diminishing returns is in full effect.
  • Speed of running up a new VPC: if you created every VPC from scratch, you'd have to go through the OS install, not to mention hotfixes and extra components (like a web server, directory service, etc) as well as any core applications every single time you need a new VPC. I've left out that installing an OS in a VPC (before you install the Virtual Machine Additions) is a SLOW process... much slower than on a physical machine. But, if you used differencing disks, you only have to build your OS with the core components, service packs, hotfixes, and core applications one time. Then, when you needed a new VPC, create a new differencing disk, get the latest OS hotfixes, install the apps you need that aren't on your base, and you're hitting the ground running much faster than having to install a new OS.

So... How do I configure my Virtual PC's?

I'm using differencing disks at a slightly higher level. I have have two "core base" VHD files. I created a VPC (using a dynamic VHD file) and installed the following:

  • Windows 2003 Server
  • Virtual Machine Additions - either select Install Virtual Machine Additions from the VPC menu in a running VPC or map a virtual CD drive to the following ISO (assuming a default install directory): C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\VMAdditions.iso
  • IIS 6.0
  • Windows 2003 Server SP1
  • All available hotfixes (from Microsoft Update, not Windows Update... this is so future updates will not just check the OS but also all installed apps like MSFT Office)

Now, I created a copy of this VPC... literally an exact copy. "Dude, weren't you just talking about differencing disks?" Yes, if you caught it before the list above, I said that I have 2 core base VHD files. I've just listed how I create one. However, I also create a core base image that has Active Directory and DNS installed. Why have a core base image without AD? Because I've come across two installs where I couldn't install onto a domain controller and frankly, one thing I hate (other than realizing I forgot to clean my coffee pot the night before) is installing an OS because you can't do a damn thing for almost 30-45 minutes on that machine. So once I make that copy, I then go through the AD creation wizard in Windows 2003 which also installs DNS for me.

At this point I have two core base VHDs that I'll use as the base for all my future VPCs. Before I start creating differencing disks, I want to optimize these two images.

  • First, run the Windows Disk Defragmenter to defrag the disk.
  • After that completes, all your used files will be in as few fragments as possible, but you'll still have unused space that's not really "empty". What you need to do is "zero-out" all the unused space (you'll see why in just a moment). To do this, map a CD drive to the following ISO: C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso.
  • Once this is complete, shut down the VPC.
  • Now we need to compact the VHD file. This will shrink the VHD by removing any unused space... this is why we just ran the precompactor. If we hadn't run that, the VHD wouldn't shrink by much because the compactor would see the "deleted" space as being used... if it's zero'd out, all the unused space will be removed.
  • At this point, you now have a clean, optimized, and small core base virtual hard disk. The last two things I do are delete the VMC file associated with this image and mark the VHD as read-only. Why? First of all, once you create a base VHD, you don't ever want to change it, never ever ever (why? because if you make changes to it, you will likely break the disks that are based from it... this means if you have to apply a hotfix, you apply it to the differencing disks, not the base disks). If there's no reason you want to change your VHD, the two things you can do to keep that from happening is (1) remove the VMC file which is the only way you can start a virtual machine and (2) if it's read-only, it can't be changed.

I then repeat these steps for my other VHD file. Now I have two optimized VHD files:

The primary VHD I'll use going forward is the one with Active Directory installed as that's the most common case I'll need; the non-AD VHD is for special cases so I'll just leave it alone for now. Now, the next step is for the two most costly installs: a development environment (Visual Studio) and database server (SQL Server). I personally do a lot of SharePoint & MCMS related work. SharePoint is unique to these two requirements as the current version of WSS (SP2) supports the new .NET 2.0 products (VS2005 & SQL2005), but SPS SP2 only supports v1.1 (VS2003 & SQL2000). Because of this, I need two base VHDs: one with the .NET v1.1 products (VS2003 & SQL2000) and another with the .NET 2.0 products (VS2005 & SQL2005).

Open up the Virtual PC Console and launch the Virtual Disk Wizard to create a new disk. When prompted, specify that this should be a "differencing disk" and indicate that the core base VHD containing the OS is the disk that it should be based off of. After the disk is created, create a new virtual machine. When the wizard asks you if you want to create a new disk or use an existing one, select "existing" and point to the disk you just created. Now I install the development environment and database server (plus any additional service packs and hotfixes). Then I repeat this same process for the other VHD. Finally, I prep both VHDs the exact same way I prep'd the OS core base VHD above (defrag, precompact, compact, mark read-only, and delete the VMC file) [added 11/17] except for the compaction... you can't compact a differential disk. The only thing you can do to a differential VHD is merge it with it's base [/] .

At this point, I now have two VHDs, each based off the same core base VHD. This gives me a great platform to quickly get a new VPC up and running, complete with a fully patched OS, web server, Active Directory, development environment, and database engine. From here, I'll run through he same process in creating new VPC's that I did for creating the two development base VHD's.

So, say for example I need to run up a new VPC to build ASP.NET 2.0 Web Parts to host within the "Son of the SmartPart" for a WSS site. I create a new VHD differencing disk and point it to the VS2005-SQL2005 base VHD. Then I create a new VMC, using the new VHD differencing disk I just created. Now, All I have to do is install WSS and WSS SP2... up and running within 20 minutes or so (assuming I had nothing created ahead of time).

  • At the bottom of the diagram to the right you'll find the two core base images I've mentioned. These two virtual hard drive (VHD) files are marked as read only and do not have an associated virtual machine settings file (VMC) associated with them.
  • The two blue VHD files are the base disks other VPCs will be based off. They are differencing disks configured to use one of the core base VHD files. For example, in the diagram the differencing disk #B2 is based off the #CB1 core base disk. The only thing installed on the #B2 base disk is a development environment (i.e.: VS .NET 2005) and a database server (i.e.: SQL Server 2005).  Once these applications have been installed, these base disks are run through the same optimization process outlined above.  These disks (the blue ones) are also marked read only and have no VMC file associated with them.
  • The last two VHD's in this diagram (the two yellow ones at the top) are where you would do your work. In the diagram I show where you could install Windows SharePoint Services & SharePoint Portal Server. This is just an example... it may not make sense to you.  Essentially, the "yellow" level in my diagram is where I have my virtual machine settings files and where I do my development or "kick the tires" work.

So what is really happening? When you start a virtual machine, it's essentially treating all three disks involved in the hierarchy as one physical disk. However, any changes that are happening to the disk (any write I/O's) will be saved in the yellow disks.

You may look at this and say "damn, aren't you going a bit too far with this differencing disk deal?". Maybe, but frankly so far I've been running like this for a few months & I haven't had an issue with performance, regardless of the fact that I have one VHD that's based off another VHD (the dev+db install) and finally another VHD with the OS. I'm obviously saving space and able to create new VPCs is VERY fast.

There's one last thing I do. I keep all my projects within [drive]:\Projects, all utilities in [drive]:\Utils, and all development stuff (like CodeSmith, NDoc, Cropper, Reflector, Resourcer templates, snippets, etc) in [drive]:\Development. I use all these in all development environments. So, what I did was create an additional VHD and attach it to each of my VPC's.  I then copied the three afore mentioned directories into this new drive. Now, all machines will share the SAME drive. This is great for sharing projects across environments. It's also a very easy way to share files across multiple VPCs.

  
  • The first image above shows the settings file (VMC) for one of my virtual machines. Notice the Hard Disk 2 property is configured to attach the Shared Development.vhd disk to the virtual machine.
  • The second image above shows what it looks like when inside the virtual machine
  • Other virtual machines would have the same VHD selected for the Hard Disk 2 property.

Benefits to using VPCs:

  • Ability to save everything as is via "Save State" option: when you have a VPC loaded, you have the option to stop it and save it's state. This will write everything in memory to disk. If you're familiar with the Hibernate option on laptops, this is essentially the same thing. Later, you can start the VPC and it will bring you right back to the state you were in. I've even been able to execute a Save State in the midst of a long running install (SQL 2005... I didn't realize there were two CD's to download... this was before the DVD's were available to MSDN Universal Subscribers... so I saved state when it asked for disk 2, ran out and downloaded it, restarted my VPC, mapped to the new ISO, and continue with the install)!
  • Undo disk: when starting a VPC, you can elect to enable an undo disk. Think of this as just like a temporary differencing disk. If you have undo disks enabled, when you shut down a VPC it will ask you if you want to (1) delete your changes and thus revert back to the state of a VPC when you started it up (great for testing installations or big configurations that have the potential to break things), (2) save your changes which will just keep the changes in the "Save State" file (*.VSV), or (3) commit you changes to disk which will merge your undo disk changes into  your current disk.
  • Atomic development: what I mean is that you can make sure your environment is the exact same whenever you work on a project. For example, I wanted to make sure when I was working on the book that I never altered anything with respect to settings or configurations.  I needed to make sure that all the steps I was outlining in one of the chapters would work all the time (undo disks were very handy for this as there was no need to undo anything in the VPC).
  • Presentations: ever sat in a presentation where the presenter said something along the lines of "I was trying some stuff last night and it blew up my laptop so I'm kinda screwed today?" I have. If your code demos are in a VPC, even if your laptop blows up, you can borrow someone else's and get up and running right away (assuming you have your slide deck as well).

Extra tips on using VPCs:

  • The more memory you have, the better. I've run full blown developer VPCs with the configs above with only 768MB in the host OS. Personally, I would try to get 2GB on your host OS and dedicate at least half of that to a VPC.
  • Put all your VPC's on a separate drive from you OS drive. This reduces contention. The best option IMHO is to get one of those self powered USB 2.5" disks like this one. Spend the extra money for the faster drive (5400 RPM), you'll notice an improvement if you do. With that being said, I'm running a 3.5" drive that requires external power... but I primarily use it at work so portability wasn't the biggest factor... honestly the biggest factor was the $10 instant rebate and $40 mail in rebate which made this 80GB 7200RPM drive cost less than $40.  Can't beat that!
  • Shut off your AntiVirus software: unless you can exclude VHD and VSV files from being monitored by AntiVirus applications, shut it down... it's just more disk contention that you have to deal with.
  • Keep the drive where you store your VHD files defragmented.
  • Keep your VHD files as defragmented as possible: VHD's are massive... the fewer fragments they are in the faster they'll run. I use a tool called contig from SysInternals to analyze and defragment a specific file.  Here's what contig looks like:

Where can you get more info on VirtualPC's?

Misc.

So have I gone crazy with virtualization in as a development environment?  Maybe... you can judge for yourself... here's what my external 80GB USB drive looks like:

  • The blue shaded VHD files are my core base VHD files.  The file 002 - AD Base Win2003 SP1 Hard Disk.vhd is the file #CB1 in my diagram above.  The file 003 - Base Win2003 SP1.vhd is the file #CB2 in my diagram above.
  • The red shaded VHD files are the base VHD's, or the light-blue boxes in my diagram above.  The file 002 - Base VS2005 + SQL2005.vhd is #B2 in the diagram (the other VHD file shaded in red should be obvious what it maps to in my diagram).
  • The green shaded VHD files are the disks where I do all my work.

So, if you look at the diagram to the right, you'll see that the virtual machine 002 - VS2005 + SQL2005.vmc is using the hard disk with the same name: 002 - VS2005 + SQL2005.vhd.  That disk is a differencing disk based off the 002 - Base VS2005 + SQL2005.vhd file and that is a differencing disk based off the core base disk 002 - AD Base Win2003 SP1 Hard Disk.vhd.

Notice none of the core base or base VHD files have an associated VMC file and are all marked read-only.  As I mentioned above, this will ensure that things don't change in these base disks.

You may ask "what's up with the '001 *' files?"  Before VS 2005 & SQL 2005 were available, I was putting both VS 2003 & SQL 2000 on my core base image, so I was effectively skipping my "blue layer" in the diagram above. Now I keep my v1.1 & v2.0 environments as separate as possible for a pure testing environment in case I ever need one.

 

[updated 11/17] - Thanks to Frank for pointing out that you can't compact a differential VHD, only merge it with it's base. That was a typo on my part and has been updated.

posted on Tuesday, November 15, 2005 10:50 PM

Feedback

# Use VirtualPC's differencing disks to your advantage 11/15/2005 9:44 PM Andrew Connell [MVP MCMS]


# Use VirtualPC's differencing disks to your advantage 11/16/2005 6:04 AM Andrew Connell [MVP MCMS]


# Hardcore VPC Setup 11/16/2005 5:11 PM Bryant Likes's Blog


# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/17/2005 10:40 PM AC [MVP MCMS]
Gravatar Eric - As I outlined in the article, you can only update the differentials... NOT the base. If you updated the base, you'd invalidate the tree. No, there's not a better option, it's simply one of the things you have to deal with. INHO, that's a small price to pay to (1) save a ton of disk space and (2) keep from having to install an OS over and over each time you want a new image. Sure, you could XCOPY an archived clean base image, but you don't save space on the disk.

Why don't you elaborate how VMWare handles this issue? I've never used VMWare and prefer VirtualPC instead. Why? First, while I do have a copy of VMWare I got for free (thanks to their booth @ TechEd 2005), I have a MSDN Subscription where I get VirtualPC included. All of my colleagues are in the same boat. Therefore, my perspective is only from a VirtualPC background, but I'm interested to hear how VMWare deals with this.

# Using Virtual PC in an efficient Way 11/17/2005 10:15 PM Wayne Larimore - his bloggin' We


 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/18/2005 5:15 AM PA [MCAD]
Interesting article. We use Virtual PC at work here as well, but we also use Virtual Server, which seem to outperform Virtual PC by far. How can that be explained? Could you use the same Differencing Disks-methods in a Virtual Server environment?

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/18/2005 8:42 AM AC [MVP MCMS]
Gravatar AM PA - Honestly I'm not sure as I've never used Virtual Server... I've only used VirtualPC. It's one of those things on my list to try, just haven't gotten around to it.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/21/2005 9:36 PM Dhominator
What are the pros/cons of adding an additional layer for updates/hotfixes/service packs? In your vocabulary...

Core vhd, "Updates Only" dif, Base dif, Working dif...

If there is no performance hit it might be worthwhile.?.?

John

# De l'art et la maniére de gérer ses machines virtuelles 11/24/2005 6:34 AM The Mit's Blog
Dans bien des situations, les machines virtuelles sont devenues la solution idéal

Zone de test...

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 12/6/2005 10:33 PM Steve Bargelt
Do you join your VPCs into a domain? If so how do you handle the duplicate SIDs in the domain? Do you use sysprep? Sysprep is a pain in the butt but seems to be the only way to get VPCs to work in a domain environment.


# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 12/6/2005 11:41 PM AC [MVP MCMS]
Gravatar Steve- In fact I do... I have an entire virtual domain setup. Funny you ask because I'm in the midst of another article building off this article that talks about how to setup a virtual AD domain for the non-sysadmin (like me).

To answer your question though, look for a utility called NEWSID by SysInternals.com... That's what I use for avoiding (not handling, avoiding) dupe SIDs. My article will cover this topic as well. For now, all I can say is watch this blog. The article will be up soon.

# Virtual PC for Changing Development Environments 1/13/2006 4:05 PM DevelopmentNow


# Virtual PC Differencing Disks 1/14/2006 8:04 AM Clark Sell
I love Virtual PC, and I use if for all of my development.  I have a ton of VPC's just sucking up...

# Virtual PC's Differencing Disks 1/14/2006 10:36 AM Clark Sell
I love Virtual PC, and I use if for all of my development.  I have a ton of VPC's just sucking up...

# My Golden Rules to Personal Computer Management 1/30/2006 9:40 AM Point2Share
To date this blog has been about just one thing, SharePoint, and that isn’t about to change. However,...

# Jumping in and using Differencing Disks under Virtual PC 2/14/2006 5:45 PM Dugie's Pensieve
Mitch has posted on his blog about his experience with differencing disks under Virtual PC.  Personally...

# Differing Opinions on Differencing Disks 3/5/2006 9:53 PM Joel Ross


# Differing Opinions on Differencing Disks 3/5/2006 9:53 PM Joel Ross


 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 3/6/2006 10:45 PM Todd Chapman
Just one question, when you defragment your base disk in the beginning of the setup, are you running the disk defragger from within the image or on the VPC file itself as in your example of Contig?

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 3/6/2006 11:37 PM AC [MVP MCMS]
Gravatar Both... run it from within the VPC 3 times, then after shutting down the VPC, run it on your host OS.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 4/12/2006 7:29 PM Jeremy
How can you run two VPC's using a shared drive? I get an error because it's in use by another virtual pc.


# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 4/13/2006 10:52 AM AC [MVP MCMS]
Gravatar Jeremy - No, that's not possible for the exact error you received.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 4/13/2006 11:23 AM Jeremy
Does anyone know if Virtual Server or VMWare Server allow you do have a "Shared" drive that you can use with more than one machine at a time?

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 4/13/2006 4:36 PM AC [MVP MCMS]
Gravatar Virtual Server won't let you do it either... same reason. It's like saying you could plug two IDE/SATA cables into the same drive. Remember, VPC and VS (and I assume all VMWare products) emulate the hardware layer. Thus, since you can't have a drive connected to two PC's at once, the same requirement trickles down to the virtual world.

# Virtual PC Differencing Drives. 7/19/2006 8:39 AM Mikehall's Embedded WEblog
Sometimes you really don't know what you don't know until you stumble across something that shows you...

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/21/2005 9:58 PM AC [MVP MCMS]
Gravatar Dhominator - there must be a performance hit... there's simply no way that it could be exactly as performant as a single fixed disk. With that being said, I haven't noticed any performance issues running this setup on two different systems: (1) P4 2.2Ghz w/ HT, 2GB, separate 200GB data disk, (2) Celeron 1.7Ghz, 2GB, separate 80GB USB drive (and run on the same OS 40GB disk).

As I outlined in my article, the pros are disk space & management (read the article)... the cons are having to install updates/hotfixes/etc on all the working diff disks

# Organized Virtual PC configurations 11/16/2005 8:07 PM Luís Falcão
Dou you use Virtual PC? Want several OS configurations? Most of them have a common ground of software?...

# HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/16/2005 8:08 PM Steve Bargelt


# If you use Virtual PC you really should read this 11/16/2005 11:03 PM The SharePoint Farmer's Almanac


# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/17/2005 2:06 AM Shane Young [MVP SPS]
Outstanding!


# HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/16/2005 11:23 PM Wouter van Vugt


 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/17/2005 4:17 PM Franck Silvestre
Thanks for the article but I got a question: you mentionned "Finally, I prep both VHDs the exact same way I prep'd the OS core base VHD above (defrag, precompact, compact, mark read-only, and delete the VMC file).". How did you compact your differencing disks? When I run the virtual disk wizard and select a differencing disk, I could only merge it but not compact it!
Thanks
Franck

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/17/2005 5:33 PM Eric Newton
Um yeah... so what happens when an update comes out?
Your base disks cant get it without invalidating the tree.

Fact is VirtualPC doesnt do a great job of this type of OS management, whereas VMWare does a better job. (still not perfect though)



# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/17/2005 10:30 PM AC [MVP MCMS]
Gravatar Frank - good catch, that was a typo and I've updated my article. Thanks! You can't compact a differential disk... you can only merge it with it's base. That was a typo and has now been updated.

# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/7/2006 9:13 PM Andrew Connell [MVP MCMS]


# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/7/2006 9:28 PM Andrew Connell [MVP MCMS]


# HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs 3/7/2006 9:29 PM Andrew Connell [MVP MCMS]


# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 2/10/2006 6:33 PM Steve Bargelt
Hate to be a pest Andrew - but any progress on the "virtual AD domain" article? I'd be more than happy to proof-read an advance copy! :-)

BTW - I found out the hard way that the Office 12 Servers will not install on virtual machines that have had their SIDs reset with NewSID. I even tried removing the vpc from the domain, sysprepping and re-joining the domain and O12 Server install didn't like it. This may only be a beta 1 issue... but something to keep in mind.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 2/11/2006 11:03 AM AC [MVP MCMS]
Gravatar Steve- I know, I've been remiss in posting that article. It's something that is still in the works. First, I'm very busy with my new job so that's taking away from the time. Second, I had planned 2 articles on virtualization in a series. The first one was the differencing disks article, the second was to be about standing up a virtual domain. I've added another to the mix: squeezing out every last drop of performance for your VMs. Because I'm adding this article to the mix, I think it will be more appropriate to post it before my virtual domain article. I do hope to get both knocked out in the next two weeks (I promise).

Just to let you in on a little secret why I can promise they will get done soon: I have to redo my entire VM environment so I'm taking screenshots of my process. So, I've got to get mine done ASAP and thus, the articles will benefit form this. Not to mention the fact that I'm speaking at the Orlando Code Camp in March on this subject!

While I can't comment too much on O12 (MVP NDA's and such), you're right... SysInternals' NewSID utility won't work with O12. Instead, look to SYSPREP'ing the VM's for O12 Server. With that being said, I have a totally separate VM setup for my O12 stuff.

Thanks for pestering me... I REALLY want to get them done soon and this actually helps!

# Utiliser les "Differencing Disks" de Virtual PC à votre avantage 2/18/2006 8:48 AM Luc Gauthier's Weblogs
Excellent article (en anglais) concernant VirtualPC
 
 
http://andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.asp...

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 9/20/2006 2:01 AM Magnus
Gravatar Hi!

Thanks for the informative article. I just wonder if anyone has tried putting such working disks on a thumbdrive. I would then make sure that I have identical core base disk and base disk both at home and the office. I would then only transport the working disk on the thumbdrive between home and office instead of the full laptop. Why would I do that? Because it is easier to run with a thumbdrive than a laptop as I combine commute and exercise time.

/Magnus

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 9/22/2006 9:11 AM AC [MVP MCMS]
Gravatar Magnus - I'm sure it would work, the problem I see you running into though is these disks get big fast... REAL fast. Even a 2GB thumbdrive will work only so long.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/17/2006 6:57 AM dave bostock
Gravatar Personally i always use NTFS file compression attrib on the base drive. As VPC only uses "half" a hyperthreading CPU and I find it's a disk bottleneck not cpu...

Of course the only problem with a base disk is you end up hotfixing multiple machines and the disks get bigger and bigger.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/17/2006 1:30 PM AC [MVP MCMS]
Gravatar Dave - Interesting idea on the NTFS... I've seen people swear on both sides of that argument. Your other point about having to patch multiple machines is moot to me, beacuse if you were creating multiple machines either with diff disks or without them, you'd have the same number to patch regardless.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 1/16/2007 10:30 AM John Way
Gravatar Andrew,

Would love to see the article discussing multiple machines on the same domain. Can you newsid a new machine that is based off the core machine without writing to the core VHD? It's set to reas-only you know!! :-)

Also, I assume that all machines will have the machine name of the core machine with the OS? How do you manage that when you have multiple machines on the domain?

Thanks,

John

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 1/16/2007 12:26 PM AC [MVP MCMS]
Gravatar John - Yup... you can use NEWSID... I've seen some apps not work well with that, but it wasn't an issue with VPC... it's just an issue with the NEWSID generation.

 How do I set existing installation of XP (on seperate partition) to the VHD 2/22/2007 1:24 PM Jeff
Gravatar I have Vista Business installed on a partition and XP Professional on another partition. Is it possible to use that exiting XP partition as a Virtual PC? Can I add it's information to the VHD? If so, how? Thanks.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 2/22/2007 4:41 PM AC [MVP MOSS]
Gravatar Jeff-
Technically it's possible, but I've never done it. You want to look for some info on creating a virtual machine from a physical machine. Sorry I can't be of more assistance.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 2/22/2007 7:11 PM Larry
Gravatar Jeff-

Check this bit of information about creating a virtual machine from a physical machine.


http://www.techlog.nl/archive/2004/12/28/migrating_a_physical_computer_

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 5/12/2007 10:36 PM Anand
Gravatar I have a base VHD with just the OS that was in a Sysprep-ed state that I started giving a product key (I did not activate it though) and went about creating three VMs using Diff disks (one each for Visual Studio 2003, 2005 & 2007 Beta1).
Now, I sysprep-ed all three Diff disks as I want all my team mates to use them. The base has a PID at this point and I dont dare change that.
On booting up the VMs they first ask me for a PID, Admin password etc (clearly showing that sysprep has happened successfully) and then say that the trial period has expired and that the machines needs to be activated! Is this because the base VHD was not sysprep-ed? If yes, then how do I tackel this situation?
One solution would be not to use Diff disks at all but then aren’t Diff disks meant for these type of scenarios?



 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 5/25/2007 11:58 AM Ram
Gravatar this has been discussed in bits and pieces in the earlier comments... but wanted to re-emphasize that vhds are great in a NTFS partition but not on FAT32. I have a XP machine and running a VPC for win2k. After Installing Visual Studio 2005 in the VPC I see 4 files created ( vhd broken into 4 files due to FAT32 file size restriction) in the XP machines. Its getting bloated now.Disk defragment is killing my time now to keep IO faster.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 5/25/2007 2:19 PM AC [MVP MOSS]
Gravatar Anand-
Yes, you can use diff disks for that exact scenario... it saves disk space.

Ram-
No so worried about that... who still uses FAT32? :)

 re: HOWTO: use virtualPC under windowXP can't joindomain in the server 2003(one computer) 5/27/2007 12:34 AM chumnit
Gravatar Hello ! everybody i have one problem to ask .
Mycomputer have 2 window.
1 - window 2003 sever have AD & DHCP
2 - window XP client (use virtula PC)
but i can't join domain in the server 2003 , you can tellme about this problem .
thank your firs
send me back at this address
chumnit1155@yahoo.com



 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 7/13/2007 9:35 AM Michael Moynihan
Gravatar Correct me if I am wrong, but I figure the paging file is being stored in each of your read only pre-differencing disks. It sounds like it would be best to turn off the paging file as part of the compacting procedure, and to finally create a paging file in the final difference disk.

If the paging file is part of each read-only image, it's wasting a bit of space...

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 7/13/2007 10:53 AM AC [MVP MOSS]
Gravatar Michael-
Correct... unless you tell the original disk, it initially puts the paging file on the base disk. Then each diff disk would keep a copy of the changes to the paging file. To me, this is a waste of space on the base, so I'd set the paging file to ZERO (or 50MB... as low as you can go) on the base, then chane it when you create diff disks. This is what Invirtus VM Optimizer's product does for you.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 7/19/2007 1:22 PM Anthony Grace
Gravatar I'm setting up a MOSS dev env with the server o/s on a base VHD with tools on one diff disk and MOSS on another. Roy Osherove mentioned that diff disks grow in size like logs. How much of a problem could this be? Our local machines only have 2Gb RAM and we may have to wait for hard drives, unless we can use the NAS?

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 7/19/2007 11:49 PM AC [MVP MOSS]
Gravatar Anthony-
Roy is right... but if you use dynamic disks you will get the same growth issue. it isn't a problem... just a fact of virtual machines.

 Rename Parent Disk 9/4/2007 1:43 PM Ixpe
Gravatar Hi, is that possible to rename the parent disk of a children disk ?
For exemple, rename the core disk of a children disk ?

Thanks a lot for your answer.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 9/4/2007 7:45 PM AC [MVP MOSS]
Gravatar Ixpe-
I don't think so. You can try it, but I'd do it with a non-mission critical VM.

 Rename Parent Disk 9/5/2007 4:22 AM Ixpe
Gravatar I tried with a copy of files ;o)).

It seems to be ok.
When you create a new virtual machine, and when you choose your virtual disk, virtual PC ask you the path of the parent disk of your children disk.

Be sure your children disk is not read-only during the manipulation, because he needs to be updated with the path of your parent disk.
Be sure of this because virtual pc doesn't give you an error message if your children disk is read only.
After this, you can put your disk read-only.
Have a good day !

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/22/2007 8:45 AM crm
Gravatar I have to install WSS using VMWare and I don't know if I should use "dedicated" disks for this. Hosting disks have to be only for WSS? or they could be shared?

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/22/2007 9:01 AM AC [MVP MOSS]
Gravatar CRM-
When you say dedicated disks, I assume you mean you're mapping to a physical disk. I wouldn't do this frankly... I'd just use the typical config (or defaults when doing a custom config).

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/22/2007 10:32 AM crm
Gravatar Sorry, probably I didn't explain me well.I'm not who install the VMWare so maybe I don't speak properly...I'll try to explain it better.
We have a SAN/NAS where we've placed different virtual machines for different purposes. Now, we have to add more virtualized servers (VMWare) for SharePoint and I have some disk requeriments. At the end, you need some hardware/physical disk, so people who manage these SAN/NAS asked me if I need these amount of logical space placed into a physical disk whose only could be accessed by SharePoint servers or if it's not important that these amount of logical data could be placed in the same physical disk where other virtualized servers are placed too.
As far as I understand, you can have a big disk (or more than one) and you can divide this space in different portions for different servers (so, the logical disk assigned for each server is into a "shared" physical disk) or you can have different physical disks "exclusively" for one purpose ("dedicated").
And my question is if I need to have a physical disk onñy for Sharepoint or if it's not necessary.
Thanks

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/22/2007 8:06 PM AC [MVP MOSS]
Gravatar CRM-
I'm not sure exactly what you're asking... sorry. Virtual machines can have virtual hard disks which are created as single files. Just like a physical machine, when one virtual disk is in use, another one can't use it.

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 10/22/2007 8:06 PM AC [MVP MOSS]
Gravatar CRM-
I'm not sure exactly what you're asking... sorry. Virtual machines can have virtual hard disks which are created as single files. Just like a physical machine, when one virtual disk is in use, another one can't use it.

 re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/7/2007 11:11 AM chamorga
Gravatar I know this is a little late but,
CRM-
Either way will work. You will get better performance if your Virtual machine has exclusive access to the physical disk, just make sure that you have enough space either way to cover your expected total size.
Another note-Performance of any virtual machine is best when NOT using Dynamic sized VHDs. When you know the total space that you will need it is best to used a fixed size disk.
Just as an example, I installed Vista on a Dynamic Disk (12 hours) and and a fixed size disk (<2 hours). (3.2GHZ P4, 2 Gig RAM).

# re: HOWTO: Use Virtual PC's Differencing Disks to your Advantage 11/8/2007 2:09 PM