Evaluate This – an Introduction
The main reason my blog has been totally neglected for the last few months is because Simon and I have been on tour doing IT camps. Despite the number of these we have done there will be many of you of you who haven’t been able to attend these because of time constraints or because you simple didn’t realise that we were doing them. To correct this Simon and I are going to record some of the best demos we have done and publish these over the coming weeks. The series is called Evaluate This! For the simple reason that we want you to try some of this out yourselves just like we encourage you to do if you come along to camp.
Setting these up yourselves allows you to skill up, and work out how and if these new features will work in your organisation. Trying out these new features will also help you prepare for the exams if you want to get certified.
We have tried to engineer these demos to be run on a single laptop/desktop running Hyper-V either inside Windows Server 2012 or on Windows 8. The exceptions are where the demos are showing advanced features like the virtual machine migration options, replica, and Hyper-V.
To get you started particularly if you’re new to Hyper-V we need to introduce you to how to build a lab setup. Actually there’s some good resources on TechNet for this but I also wanted to show what to do to get to that, because these guides assume you have your virtualisation setup and you know how to build virtual machines and configure them.
Build your Virtual Machine Host for demos using Boot to VHD
Rather than fiddling around with partitions Windows 7/2008 R2 and later allow you to boot from a Virtual Hard Disk (VHD) rather than a real disk you can have multiple VHD each with its own operating system and each will have a corresponding entry in the BCD on your system. Each of these can be copied around and restored if things go wrong. So lets get started..
Download Windows Server 2012 and start to install it. To do this you might want to use the Windows 7 ISO to USB utility to make a bootable USB stick form this iso file. Start the installation and as soon as you have a dialog box up in the Pre execution Environment (PRE) stop! Hit SHIFT-F10 and this will bring up a command line.
diskpart
list volume this will help you identify which drive you want to use to host your VHD e.g. Drive D:
create vdisk file=”D:\SysPrep.VHD” type=flexible maximum=20000
this create a VHD, sysprep.vhd (you can call yours whatever you want) that is dynamic and 20Gb in size
select vdisk file=”D:\SysPrep.VHD”
attach vdisk
Now you can go back to the installation environment and customise the installation to install the operating system to your new volume.
When you have completed the installation you will want to find any drivers you need to get the display working properly as well as your various network card. I find that the windows x64 drivers are generally Ok for this if devices aren’t detected automatically. You may also wish to deploy the Remote Server Administration feature on your new deployment so you have the tools to manage all the new features in Windows Server 2012 as well as the Hyper-V role (which needs a reboot).
Once you have your new installation the way you like it sysprep the virtual machine (c:\windows\system32\sysprep\sysprep.exe) and set it for an OOB experience and to shutdown (not restart).
Boot the machine from the installation media again and again enter SHIFT F10 to get a command prompt.
diskpart
list volume this will help you identify which drive you want to use to host your VHD e.g. Drive D:
create vdisk file= “D:\Boot.VHD” parent=”D:\SysPrep.VHD”
this creates a differencing VHD, boot.VHD with a parent of the sysprep.vhd you created earlier
select vdisk file=”D:\Boot.VHD”
attach vdisk
list volume this will help you identify which drive your new VHD has been mounted to e.g. drive V:
exit
BCDBOOT V:\windows
this creates a new boot entry that will boot from the difference disk you have made
Reboot the machine and select the top boot option. The machine will come out of sysprep and all of the changes this makes will be written into the differencing disk leaving the parent disk unchanged (in a pre sysprep state). Go into the system configuration of you machine and remove the second boot option (the one that points to the sysprepped VHD that we started with) to ensure you don’t ever boot into that.
With setup you can use the sysprep.VHD as a parent for your VM’s and if you do one more thing..
copy Boot.VHD Boot-Backup.VHD
You can get back to a sysprepped state by copying the boot-backup.vhd over Boot.VHD to get back to where you started from. You could also back these files up to an external drive and copy them in again or onto another machine to repeat the process. Also I have a quick introduction to other BCD related command here which may be of interest.
Anyway in subsequent posts I’ll go through what you can do now you have this setup.
Comments
Anonymous
December 08, 2012
Nice post :)Anonymous
January 26, 2013
Nice. Informative.