0% found this document useful (0 votes)
32 views14 pages

Build Hyper-V Host with MDT 2012

Uploaded by

Jose A Jose A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views14 pages

Build Hyper-V Host with MDT 2012

Uploaded by

Jose A Jose A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

This video is part of the Microsoft Virtual Academy.

1
In this session we’re going to talk about building for the private cloud using the Microsoft
deployment toolkit 2012, my name’s Mike Niehaus, I’m a Senior Software Development Engineer
with the solution accelerator team.

2
What we want to start off with is just giving you some background on what Microsoft Deployment
toolkit is, it’s a free solution accelerator designed for deploying Windows, it can handle any
operating system from Windows XP and Server 2003 up to the present operating systems. The
processes and procedures that we make use of are all based on industry best practices from
customers and partners and others who have been deploying Windows for a long time so we try to
take all of those learnings and integrate them together into a easy to use toolkit that others can
make use of then to deploy Windows. It’s all about trying to simplify the deployment process so we
have a wizard driven process overall, we can inject drivers and updates as part of that deployment
process, install any operating roles or features that may be needed, in this case we’ll be looking at
Hyper V installation as part of this, we can install any applications that might be required on top of
the operating system to customize it to get it to be a little more useful then just a core simple OS
install and we can generate the boot images that are necessary to get the bare metal hardware to
connect up to the network and begin the installation process.

3
We’re presently working on MDT 2012 this new release has a variety of new features including
support for configuration manager 2012 with the new user driven installation wizard and designer,
we’ve also added some new capabilities for Lite Touch deployments to monitor deployments that
are currently running, we’ve integrated the diagnostics and recovery toolset into this, we’ve added
support for deploying to UEFI hardware for those new types of hardware that’s coming out now,
we’ve added the ability to deploy to a VHD which is to support the boot from VHD scenarios so that
you could have a physical machine which is set up to boot the operating system from a VHD file, and
we’ve added the ability to do a sys prep and shut down which is really going to be useful in these
virtualization scenarios so we’ll look at that later when we get into this. We’ve also added in some
general enhancements to the scenarios including integration with the security compliance manager
so that we can take the security templates that they've created and apply it to the operating system
to make the OS secure by default. We’ve added in the ability to run PowerShell scripts during the
task sequences and we’ve tried to improve the overall partitioning support to make sure we can set
up a machine using the recommended partition structures in the Windows Automation Installation
kit.

4
What we want to focus on first for this session is to describe how you would use MDT to build a
Hyper V host. So the first thing that you’ll need to decide when you’re building a Hyper V host is
which host operating system you want to make use of. You could use the Hyper V Server 2008 R2
with SP1 release which is the free version of Hyper V but if you’re doing that you don’t have any
actual virtual machine licenses so you get the Hyper V server for free but you have to provide your
Windows licenses to go on top of that for each virtual machine.
Or you could use Windows Server 2008 R2 enterprise which gives you the ability to run four virtual
machines. Or you could move up to Server 2008 R2 Data Center which allows an unlimited number
of virtual machines to run on top of that so which one that you want to use really depends on the
workload that you expect to run on this Hyper V host but you do have all these options. Now from
an MDT perspective it really doesn’t matter, we can deploy any of these equally well.
In the case of Server 2008 R2 enterprise and data center you do have a choice as to whether you
want to do a full install or a core install, if you do a core install you actually get rid of most of the GUI
components of the operating system so that you’re just left with a base operating system that just
boots to a command prompt so when you log in you just see a command prompt and you interact
and configure everything either from that command prompt or remotely using the remote
management tools. That is the only option for Hyper V server, it always installs in this core manner
but with the other two, with the enterprise and data center you can actually choose, so you pick
which one you want if your goal is to get as many virtual machines on this as possible then you’d
probably want to do a core install, if you would prefer to have more of the traditional Windows
environment to do management and interacting with the server then you can do a full install of
those. So which one you choose it’s up to you but as far as the Hyper V installation goes well it’s just
going to be a role installed on top of the operating system after it’s been installed.
In the case of Hyper V server the Hyper V role is automatically installed as part of the installation
process because that’s its sole purpose for being is to be a Hyper V machine for the other two for R2
enterprise and data center we have to explicitly specify that we want to install Hyper V but it’s fairly
easy to do we can just go into MDT to edit the task sequence to say we want to install this role as
part of the installation proces.

5
So the basic process that we’ll go through to build this Hyper V host is to gather all the necessary
pieces into an MDT deployment share so we’ll create just a network share to hold all the Windows
installation files as well as all the drivers and software updates that would be necessary to install the
operating system on the hardware that you’ve chosen. We can then deploy to that particular Hyper V
host we would take the boot images that MDT would generate along with some task sequences that
we’ll create. We’ll then initiate the installation and let it run through the whole OS install process,
the end result would then be a fully functioning Hyper V host that we can then make use of then for
more of the private cloud activity.

6
So to start off this process the first thing we want to do is launch the Microsoft deployment toolkit
deployment workbench and then we’ll create a deployment share to hold all the components that
we need for the actual operating system installation. So to create the deployment share it’s fairly
simple, I can right click and choose new deployment share, I will specify c:\demo with a share name
of demo$, specify a description and I can choose which actual wizard panes get displayed as part of
the deployment for right now I can just leave those as the default and now I have a deployment
share.
We’ll copy all of the MDT scripts and templates that are needed for the deployment process onto
that deployment share and as soon as that finishes up then we can start adding the additional files
that we need. So the first thing that we would want to add would be the operating systems
themselves so I can right click on operating systems and choose to import, choose a full set of source
files and then normally I would want to point to the DVD that contains the installation media, now
here I’ve just simplified things here a little bit by copying it to the hard drive so that it will copy over
a little bit faster so the first one I will add is Hyper V server and just to make this go really fast I’ll
move the files instead of copying them, specify a name here and the import runs fairly quick, so we
now have an operating system which is Hyper V server. We can add a second OS just to show what it
would look like if we were going to do this with a full operating system, so I can choose my Server
2008 R2 installation files and add those to my deployment share. And that added a set of options for
each of the different skews that are available for Server 2008 and then we can also see the
differences in this case between a full install which is what we would have with server enterprise and
a core install with server enterprise core.
Now if we were deploying to a machine that required additional drivers we would want to import
those here by running the import drivers wizard and pointing to a folder structure that contains the
drivers that needed to be added, in this case I don’t actually need any drivers so I can cancel out of
that.
We might want to apply patches as part of this installation process so we can import those into the
packages node, same basic process, run the wizard and then point to the folder that contains those
but I don’t actually need any since I’m deploying SP1 and I’ve got most of the security updates
installed as part of that already.
So what we’ll focus in on then is the task sequences, so the task sequence is basically are what ties
all of these different pieces together, so I’ll create a new task sequence, in this case I’ll call it Hyper V,

7
install Hyper V 2008 R2, I guess I should put the word server in there SP1, it is a
server task sequence so I can choose the server task sequence from the list, choose
the operating system that I imported previously, I don’t need a product key to do the
install, I can leave the defaults for the full name, organization, IE home page, I do
need to specify a password to be used for the local administrator account and then
the task sequence is created. So if we look at this task sequence it just contains all
the steps necessary to do the actual OS deployment. Because this is a bare metal
deployment we would more or less start in the pre-install phase where we could
format and partition the disk, configure the operating system installation parameters
and check the drivers and security updates, install the operating system, do some
additional customization on that and finally we can do any post OS customization
that’s required.
Now in this case since we’re deploying Hyper V server we don’t actually need to do
any real customization after the OS has been deployed because the Hyper V role is
automatically installed.
Let’s then create a second one to do Server 2008 R2 enterprise for the full
installation, we can choose the server template again, find the server enterprise
image in the list, specify a password again and there’s the second task sequence.
Now in this case if we wanted this to be a Hyper V server we’d need to edit this task
sequence to put a step into the new operating system which can be at any point in
here. To install roles and features, then if we scroll down the list we’ll see Hyper V,
check that one, and then apply our changes, so now as part of the installation process
we’ll automatically install the Hyper V role so that the machine is ready to host virtual
machines.
If we wanted to do a core installation of R2 enterprise, the process is pretty much the
same, we just need to specify the same type of details, server task sequence
template and we can choose our enterprise core OS here, specify an admin password
and then make the same edits to the task sequence that we made to the enterprise
task sequence to add a step in here to install the Hyper V role.
The last thing that we would need to do then is update the deployment share to
generate the boot images that are needed to do these OS installations in this case
I’ve already created a separate deployment share that already contains all of these
task sequences and I’ve already generated the boot images for that so we can go
ahead an open that and see what kind of a more flushed out deployment share looks
like where I just have some additional task sequences and operating systems in the
list to install a variety of different OS’s. But in this case we had the same ones to
install Hyper V Server 2008 R2 SP1 and to install data center the core install for R2
data center.
So now we’re on the physical host, and on this physical host we want to execute the
task sequence that we created before, so for this one I’ll choose the Hyper V server
2008 R2 SP1 task sequence and click next and just work my way through this wizard,
so I can specify the name of my host, I will call it Hyper V host, I can choose the

7
language, time zone settings, and in this case I’m not actually looking to create an
image I’m looking to deploy this physical machine so I don’t need to do any capturing
or sys prepping so I can leave the default, I don’t need bit locker on this particular
machine so I can leave that as the default, and at this point we’re ready to go install
the OS that we specified.
So I can click begin which will start the task sequence, which will initially format and
partition the disk, then begin the OS installation process and after a period of time
typically anywhere from 15 to 25 minutes depending on the speed of the hardware
we should have a fully functional operating system ready to go.
So our installation of Hyper V has finished successfully, we can click okay on the
button here to get the MDT wizard to go away and now after a few seconds we
should see the normal Hyper V server menu pop up and at this point you would go
through and do whatever additional configuration is necessary.
So at this point the Hyper V server is ready to be used to host virtual machines and
that gets us to the position where we can talk about the next step in the process
where we want to take a machine running Hyper V and manage it by a machine
virtual manager instance and then use MDT to create some templates that can be
deployed as new virtual machines using VMM.

7
So now we want to talk about building a virtual machine template in this case we have system center
virtual machine manager as the key tool for managing our private cloud and we have it managing our
Hyper V host. So at this point we want to use MDT to deploy a new operating system into a virtual
machine that’s managed by VMM and then turn that into a template that we can use for creating
multiple VMs after that point.
So the basic process that we need to go through for that is to install the operating system which
requires the typical MDT configuration task to create a task sequence for that operating system, but
then we also need to make sure that the virtual machine can boot a boot image and connect back to
the MDT deployment share to drive the whole deployment process, there are a couple ways that we
can go about doing that we could make sure that the machine is able to pixie boot and load that
from a WDS server, or we could take an easier route and just add the boot image into the VMM
library so that we can then configure the new virtual machine to boot from that library boot image.
So that’s the easier route, we’ll take that for the demo when we walk through it. After we’ve got
that in the library we can then create a new VM attaching the boot image to it make sure that we’ve
got the necessary VMM 2012 configuration in place for the virtual machine. We can then turn on the
virtual machine which will then boot into the boot image to the deployment share, we can then
choose the task sequence specifying that we want to sys prep this operating system after the
installation is complete. Once sys prep is complete we can then shut down the virtual machine and
tell virtual machine manager to turn it into a new template. After the template’s been created you
can deploy it as many times as you need because it is basically a sys prepped image at that point.

8
So let’s switch back over to a virtual machine and walk through that process. so on my deployment
server I have multiple task sequences already defined, one of those is for Windows 7 enterprise, x86,
that’s the operating system that we want to turn into a template so that we can use that for
deploying additional virtual machines from that. So, I’ve created the task sequence, I’ve already
updated my deployment share to create the boot images, I then copied those into my VMM library.
So if we switch over to the virtual machine manager 2012 console I can look at the VMM library and
see the ISOs folder that I’ve created and put the two boot images in so I’ve got an x64 boot image
and an x86 boot image.
When I create the virtual machine I want to use the x86 image because I’m installing an x86
operating system. Now when I look under VMs and services I’ve already created a private cloud
using virtual machine manager 2012, it doesn’t have any VMs in it now so I want to create a new
virtual machine with a blank virtual hard disk because I’m going to be doing an OS install into it, I can
specify a name, Windows 7 enterprise x86, I then need to configure a few things, like the capability
profile for Hyper V, I want to increase the memory from the default 512 MB to 2 GB, I need to
configure then the DVD drive to attach the boot image that we had already added here, x86,
configure the network adaptor to connect it to a specific network on my private cloud and at that
point the virtual machine is configured. For the destination since I do have a cloud created I’m going
to select cloud as the destination, so I can choose to deploy the virtual machine to a private cloud
and then virtual machine manager will try to figure out the best private cloud for me, now in this
case I’ve only got one, so the choice is going to be fairly obvious, but it will go through and make
sure that the cloud I selected actually meets the requirements for the virtual machine that I’ve
defined.
So as expected virtual machine manager says that my MDT cloud is a good choice for this particular
virtual machine and at that point I can go ahead and tell it to create the VM, so now it starts a job
that defines the virtual machine and copies all the necessary files over to it including that boot image
that we had defined and as soon as that job’s finished we can turn on the virtual machine and have it
boot into the MDT boot image to start the OS install process.
At this point the MDT wizard start up, gather information about the virtual machine and get us to the
point that we had seen before where we could choose the task sequence that we want to deploy. So
we want to choose the Windows 7 enterprise x86 task sequence and then specify some basic
information for the OS install process. In this case the computer name doesn’t matter because we’re

9
just going to use this as the base for a template, we want to leave it into a workgroup
because that’s what we want for sys prepping the actual image. We don’t have any
data to restore, time zone and local can be left at the default, in this case we’re going
to choose a new option in MDT 2012 to sys prep this computer so we’re not going to
capture an image because what we’re ending up creating then is just a virtual
machine with a VHD attached to it and that’s what we want to use to make our
template. Don’t need bit locker and I’m ready to begin.
So at this point we’ll begin the task sequence that will format and partition the disk,
do the full OS installation, reboot into the new OS, sys prep it and then at that point
we can shut the machine down and begin the template creation process back in the
VMM console.
So our OS deployment’s finished now, the machine has been sys prepped successfully
and we’re seeing the summary screen now showing us that everything went fine so
we can go ahead and click finish at this point and then shut the machine down and at
that point we’re then ready to create a template.
So let me go ahead and close the viewer, switch back to the virtual machine console
where we should be able to see that the machine is now shut down, okay, now it
shows that it is stopped, so we can right click and say that we want to create a VM
template and yes we need to confirm the message that says this will destroy the
virtual machine is in the process of turning into a template, yes, we want to continue.
We can use the same name for the template and the same settings for the hardware
profile, we don’t actually need the ISOs anymore so we could come in and remove
that but for right now we’ll just leave it there that doesn’t hurt anything. We can
then put in whatever operating system configuration we want, so you can put in any
settings that may be required for the OS here, you could also put in an answer file if
you wanted to do a specific configuration, I’ll just leave the default’s here for now, we
can then choose a library share to place this on and you can choose a path to put it
on a particular library so we’ll just put it at the root, nice and simple.
So now when we click create it will begin the process of turning that virtual machine
into a template, that will take a little bit as it moves the VHD into the library but as
soon as that process is done we then have a template that we can make use of for
creating additional virtual machines. So that process created a single template for
Windows 7 enterprise x86 if we needed additional templates for other operating
systems we would just repeat that same process again, we would create a virtual
machine, attach the MDT boot image to it, boot it up, choose the task sequence for
the OS that we wanted to install, specify that we want to sys prep the operating
system when we’re done installing it and then shut it down and begin the process of
turning it into a template. So that’s pretty much all there is to it.

9
So for more information about MDT you can go to [Link]/MDT where you can get to
the MDT downloads there’s different versions for x86 and x64 host OS’s although you could deploy
either OS so you want to pick the version that corresponds to the OS that you’ll be installing it on.
There’s also a link there to the connect site that has the beta versions for MDT 2012 so you can click
that link and sign up for the beta access and download and try out the new version that we’re
working on.
You can also visit the MDT forums on TechNet with the URL provided.
We also have a team blog at [Link]/msdeployment we’ll post announcements about
new releases or any significant issues that people might run into.
I also have my own blog at [Link]/mniehaus where I post a variety of OS related blog
entries.
And there’s a group of MCS consultants who call themselves the deployment guys who also have a
blog out on technet that posts all kinds of useful information for different scenarios that you might
want to try out around OS deployment.

10
This has been a presentation of the Microsoft Virtual Academy.

11

You might also like