Powershell and Systems Center VMM 2008 – Automated Deployment Part 1

Systems Center Virtual Machine Manager is a work of beauty.  It truly is.

First off you have to understand that I love my job.  I love technology.  But I really hate wasting time.

I truly do.  I’d rather sit down during dental surgery chewing on Tinfoil while scratching my fingers on a chalkboard than waste time.

And SCVMM 2008 eliminates that.  And I’m going to help YOU eliminate wasted time.  By showing you how easy it is to deploy systems in SCVMM 2008.

First step?  Create a system in Hyper-V.   Setup that puppy the way you want it.  Of course don’t install it on a domain ( at least for this purpose ). 

Setup the Virtualized machine, install the applications, get it just the way you want it.  Install you Integration Services for Hyper-V.   So far so good?  Got your install key installed?

Then here’s where it get’s easy.

Right click on the machine in question and choose “Close”.  This will re-create that system as a duplicate you can “mess with”.  In our case, a system we can Sysprep and turn into a template.

image imageimage   image

It will run you through a simple wizard, prompting for a new Machine name defaulting to “-Clone” appending to the name.  You can choose any name you like of course.  The power is yours.

Next you want to create a “Template” in Systems Center VMM 2008.   Click on “New Template”, You’ll get a warning about “Destruction and Damage” to the machine you’re about to make a template of (and a great disturbance in the ‘The Force’, the moon crashing into the sun, yada yada…)  That’s ok.  We’re working with a Clone, and well, that’s why we sent in the Clones (oh that was bad, really bad, I‘m so sorry………No… no I’m not… 😛 )

  image image

Run through a a simple wizard, define the ram and hardware settings you want this machine to have and continue to the “Guest Operating System” screen.  Fill in a password, Install key for the operating system in question, and specify the settings if you need to join a domain.  Make sure as well that you have the right type of license key to match the operating system media (IE: MAK, KMS or RTL).

Let the Wizard run through and you’ll have a new entry under “Templates”.

It will take some time as it runs a “SYSPREP” on the Virtual Machine in question, copy the VHD’s and configuration through the BITS and sets you up into SCVMM 2008 with a new Template.

So if you named the computer in Templates as “Krusty the Clone Template”, when you want to create a new Virtual Machine you can choose that new system “Krusty the Clone Template”, deploy it through the wizard and away you go.  

The beautiful part is once you’ve gone through this process, you have a Powershell Script to work with.   What this does is give you a way to REPEAT all of this without all the headache.

 

But we’ll touch on that next time around, let’s let you drool over the fact you can deploy without headache for the moment.

 

Cheers All, I’m so Virtually Out of Control
Sean
The Energized Tech

Leave a Reply