Posts about WAIK:

Understanding Windows 7 Deployment Backwards

What was the last operating system you deployed?…I’ll bet it was Windows XP and I bet you needed a bunch of 3rd party tools and experienced tons of pain to get to the end point.   With the right (free) tools it’s really easy to deploy Windows 7 though and you can self select just how much control and complexity you need depending upon the size of your deployment and how dynamic your infrastructure is.  When you first look at deployment though you might see the alphabet soup as a real turn off and feel it’s all too complex.  Here I’ll try to demystify it somewhat, covering deployment, data migration and application migration.

The Windows 7 deployment technologies build on each other and actually fit together like a jigsaw to present the whole picture.  Most guides to Windows 7 deployment start out explaining the underlying tools and components of a deployment but I think we sometimes need to picture the end goal first.  So what are the factors you need to consider?

Understanding the picture

To start out you need to determine what type of environment you have, who’s doing the deployment and even what the behavioural norms are of your users.  For example you might be in a position where you need to do everything for your users; either they don’t want to make backups and install Windows or they don’t have the capabilities (time / technical inclination).  Alternatively all your users might be highly skilled technical experts who need plenty of flexibility.  Either way the solutions are quite simple to build and maintain with the latest tools.  One option is to use the MAP toolkit to understand your environment.

The next thing you need to determine is the size of your environment and what tools you already have deployed.  If you’re on the medium to big size you’ll probably already have some System Center components deployed to manage your datacentre, servers and possibly your applications and operating system deployments.  If you’re on the medium to small end of the scale you probably have a bunch of those 3rd party tools cobbled together to provide a solution or you’ll be looking for something simple to deploy.  I’ve been intentionally vague with “small”, “medium” and “big” because they all depend on your self view.  Normally we consider “small” to be <100 and “big” to be >500 but I think you can self select better than that.

Do you have System Center?

With these few pieces of information we start identifying what type of deployment you need.  The next key consideration is if you’ve got System Center deployed.  If you do your Windows 7 deployment will be best with System Center at the helm leveraging MDT.  This will give you the ability to do a zero-touch or full automated deployment of Windows 7.  If you don’t have System Center deployed and you’re large enough that management has become a significant overhead then you’ll probably want to use your Windows 7 deployment to spearhead a System Center deployment to help take control of your environment.  System Center isn’t a fixed requirement though.

No, no problem!

What if you don’t have System Center in place?  Well then you’ll be looking at a tool called MDT (aka Microsoft Deployment Toolkit 2010 Update 1) which takes away lots of deployment pain for you and helps you deliver a dynamic and maintainable Windows 7 deployment environment.  It’s also free!  What MDT alone cannot do for you is provide a zero-touch Windows 7 deployment instead it provides a lite-touch (or semi automated) approach that does most of the work for your users.

Friends of MDT

Under MDT there’s another level of tools packaged up in something called the Windows Automated Installation Kit (better known as WAIK) which provides lots of the tools used by MDT to get the job done.  You’ll occasionally need to dip into this level to do more advanced things with your Windows 7 deployment (like service your images from the command line) and the WAIK actually includes a program for taking system images called ImageX.  If all you wanted was a very basic, repeatable installation of Windows 7 you could get away with just using WAIK but if you’ve got more than about 100 PCs you won’t want to go there.

Again to support an MDT based distribution you’ll need a couple more elements, a SQL Server and a Windows Deployment Services server (WDS).  For a SQL server it’s perfectly OK to use SQL Server Express or to use an existing managed SQL Server installation.  The SQL Server will house the configuration data used to dynamically provision computers.  WDS is a role of Windows Server 2008 and is used to provide PXE boot services (you can use a boot DVD if you need to install your customised Windows 7 install too).  WDS can also deploy XP and Vista, so you can move to a unified deployment infrastructure and it supports multi-stream multicasting, so if you use multi-cast deployment slower clients don’t slow faster clients.

So far we have key decisions made: Lite-touch or Zero-touch, dynamic deployments or static deployments but there are a couple more key considerations when thinking about your deployment, data and applications.

The data…

The data consideration drives whether you’ll need to migrate data from your users laptops or not and this in turn drives how you’ll migrate data if needs to be migrated.  If your users are storing data on their local machine you probably need to migrate it somewhere and you might well need to migrate their user settings too.  To achieve this you will want to use USMT 4.0  (User State Migration Tool) which is a component of WAIK.  USMT allows you to migrate users settings and files by either copying the files off the PC to a network share (which you might want to do it you want to take the opportunity to create a point in time backup of the users stuff) or to use hard link migration.  Hard link migration is cool!  It basically allows you to mark files to persist on the hard disk during migration to Windows 7 which saves you time and space by not having to move the files to a network share and back to the target PC again.  If you have technically savvy, or independent users you might want to use the Windows Easy Transfer too built into Windows 7 to transfer the files and settings as USMT isn’t user configurable so it’s conceivable you could miss stuff.  It is however the best approach to use en masse.

The apps…

Application compatibility is your only other real consideration.  You need to be sure that all the applications you need to deploy on your Windows 7 PCs will work on those PCs.  Again for that there’s a tool, ACT (Application Compatibility Toolkit) which can analyse your environment and tell you what applications are compatible and where they aren’t you can then workout a remediation strategy.  For example you could virtualise the application with XP mode and Virtual PC or App-V or if required with Med-V create an entirely virtualised desktop.

Why Dynamic deployment matters

Dynamic deployment really matters when you take application and data migration into consideration because the chances are that you can’t deploy purely to green field (new laptops and new users).  In fact you’ll probably have three deployment types as a minimum:

  • New – a new user and a new laptop = nothing to migrate
  • Replacement – an existing user and a new laptop = data and possibly apps to migrate
  • Refresh – an existing user and an existing laptop = data and apps to migrate

In addition to those different scenarios your users probably have their own individual application requirements and if you went for a purely imaged based route you wouldn’t be able to install applications as needed and you’d have multiple images and quite a management problem.  Finally you will want the advantages of dynamic deployment to help manage driver and patch updates without having to rebuild your image constantly.

Summary in a picture

Finally I thought I’d try to simplify with the use of a picture, let me know if it works for you or not…it doesn’t cover everything but it tells part of the story.

Understanding Windows 7 Deployment Backwards

Key resources to help you develop skills

MDT – Microsoft Deployment Toolkit – the easiest way to do a dynamic Windows 7 deployment

WAIK – Windows Automated Install Kit – mainly provides a tool set for the likes of MDT but you can use the tooling directly

MAP – Microsoft Assessment Planning Toolkit – can be used to understand your environment before deploying

WDS – Windows Deployment Services – you’ll use this for basic over the network installs and to provide PXE boot functionality.

USMT – User State Migration tool- for migrating users files and settings automagically

Springboard – THE place to learn about Windows 7 deployment.

Free eBook: Deploying Windows 7 Essential Guidance from the Windows 7 Resource Kit and TechNet Magazine – if you need all the in depth details, this is brilliant

How we did it, deploying Windows 7 at Microsoft

Understanding Windows 7 Deployment Backwards

WAIK me up before you go go

This isn’t a post about pop icons of the 80s, 90s, 00s and today it’s just that I can’t resist a pun in a headline. It’s time to have a little better look at the WAIK and we’ll start with the zero to hero guide that is the step-by-step guide.

This time I’m going to give you some tips for using the step-by-step deployment guide to get you started. The guide is simple stuff, I’m not going to go through it line by line, but it gets you from install to deployment in a couple of hours. It’s almost all you need if you’ve only got a couple of handfuls of clients to deploy.

I love a virtual environment, so I created 3 VMs to use with the step-by-step (ooh baby) guide:

  • Technician
  • Reference
  • Target

WAIK me up before you go go…and on the first, Technician, I installed the WAIK. You could always use physical boxes but where’s the fun? Then I came to the fun – trying to do this in a virtual environment. One of the key steps in this zero to hero guide is that you need to get the answer file you create (the WAIK shows you what to do) onto a removable drive. Why a removable drive? Well Windows 7 setup looks at any removable drives for an answer file to guide it through install.

Removable storage…oo er… that’s a bit tricky in a Virtual PC world. No you can’t even use USB device pass through and use a physical UFD (USB flash drive) since the option to connect a device isn’t available on a VM with no OS, which is what you’ll be using as your Reference PC for a start.

So how do we get that answer file onto removable media in a VM? The answer comes in the form of VFD (virtual floppy disks) and scripts which Ben Armstrong has documented on his blog. One thing is that you’ll also need a .vfd file for your disk…the way I created this was to use Hyper-V manager on a Windows 2008 R2 server (Action > New > Virtual Floppy Disk…) but there are lots of other ways.

All you need to do is:

  • Download Ben’s scripts (I used the VB script)
  • Open a Command prompt on the machine running Virtual PC
  • Use cscript to run the VB script like this
    •  Cscript /vm:”my vm’s name” /action:vfd /floppy:”e:blank.vfd”
  • In your VM you need to format the vfd
  • Copy your autounattend.xml to the floppy
  • Back in your command prompt
  • Disconnect the VFD from the technician VM with
    • Cscript /vm:”my vm’s name” /action:disconnect
  • Use the first cscript sample above again, but change to the reference VM
  • Make sure you have an ISO for the Windows 7 DVD connected
  • Start your reference VM
  • Marvel as Windows 7 installs without you having to do anything

If you’re new to deployment you might be thinking something like “I’ve created an answer file now so haven’t I got an automated deployment?” I guess the answer is yeah… but no.

What you’ve got at this stage is an easily repeatable deployment. From now on every time you want to build a Windows 7 machine it will end up with the same stuff on it sure. It won’t have ALL your stuff on it and it’s still really labour intensive. At this point to do your deployment you’d still need a DVD and a USB key, feet (or a good wheely chair) to get between PCs and lots of time. You could stop here if you only needed to hit say 10 or so machines but more than that and you’ll get bored.

TIP: If you’re in the UK, there’s a couple of gotchas with answer files…The code used for UK layouts isn’t en-UK as you might first guess, it’s en-GB (cy-GB for Welsh). If you use en-UK you’re fine automated install will get stuck on the first screen. There’s a second part to this gotcha too, you’ll need to leave ComponentsWindowsPEMicrosoft-Windows-International-Core-WinPEUILanguage set to en-US , but don’t worry everything will work out and you’ll have a UK locale everywere.

The rest of step 2 is pretty easy to follow…and so to step 3…

There’s a minor problem in the step-by-step guide here, that you need to fix, or it won’t work…oops! (you get a 0xc000000f error when booting the WinPE disk). Easy to fix though. Work through to the end of step 3 bullet 3 and then go to c:winpe_x86 or whatever name you used, and copy winpe.wim to the ISOsources folder and rename it to boot.wim. That’s it, all fixed!

The 5th bullet in step 4 says to burn the WinPE ISO you create to a CD, kinda obviously you don’t need to do that, you just need to get the ISO file off the VM. A simple way I like to do this (if I don’t have networking available) is to have a USB key inserted into my host PC and just attach it to the technician VM (USB > USB Mass Storage Device) copy the file to the key, then release it and copy it to the host.

WAIK me up before you go goFinally mount the ISO from your host onto your reference VM and boot it. Immediately hit SHIFT + ESC then on the black screen, hit DEL, then in the BIOS change the boot order to boot from CD first.  That’s an extra little tip, if you need to boot from a CD or ISO in Virtual PC when you see the progress bar showing the VM loading do the above and you can access it’s BIOS.

That’s it for now, my longest post so far, and more to come.

WAIK me up before you go go