Yes, there are heaps of blog posts and resources out there on this topic and this blog post has been in draft mode for a long time! Early this week, I wanted to create a fresh virtual machine for a very specific requirement and could not use my master virtual machine that I have configured to a state, where I can install any flavour of SharePoint 2010 without having to go through the complete build process – I might squeeze in a blog post on what is configured in may master virtual machine later next …
Back to the subject of this post… I wanted to create a fresh virtual machine and to have install Windows Server 2008 R2 is something I don’t enjoy… am sure you too would not want to do this couple of times in a month… hence the master virtual machine.
I have used this technique earlier and it has been a while since I have done builds, just realising now, that last time I did a small farm build for my home test lab – I did not use this method! DUH!!!!
This technique is all over the internet, but I am blogging this so I have a reference to when needed, so I can copy and paste and secondly this may eventuate into a series of blog posts as I build this virtual machine – hopefully
It’s basically WIM2VHD [Windows Image to Virtual Hard Drive]. Depending on the parameters specified, you can have a sys-prep image of the Windows Server 2008 R2 or Windows 7 in couple of minutes… no clicking nothing!!!
- A computer running one of the following Windows operating systems:
- Windows 7 RTM
- Windows Server 2008 R2 RTM
- Windows Server 2008 SP2 with Hyper-V RTM enabled (x64 only)
- The Windows 7 Automated Installation Kit (AIK) or Windows OEM Pre-Installation Kit (OPK) installed.
- A Windows 7 or Windows Server 2008 R2 installation source, or another Windows image captured to a .WIM file.
Just to get this working, I would not install AIK – I did it once and then copied the following files and this is what my folder structure looks like
This is located in C:\Install
So here is what you need to do
- Insert Windows Server 2008R2 disk in the CD-Rom Drive
- CSCRIPT "c:\install\WIM2VHD.WSF" /WIM:H:\sources\install.wim /SKU:SERVERENTERPRISE /VHD:Z:\JustSharePoint\SP2010VM\SP2010.VHD /disktype:fixed
Run this from the command prompt all in one line, please I cannot get it to fit here…
H:\ is my CD Rom Drive
Z:\<folder location> where I want the VHD create
/SKU ServerEnterprise Edition [You can see other examples on the source mentioned above]
/Disktype:Fixed – I wanted a fixed sized 40GbVHD, default is dynamic and 40GB
That’s it…. it will take a while since I have fixed sized vhd. Otherwise dynamic will be created in few minutes.
Now, I am not going to use this to boot into… I could but I am going to attach this to my VMWARE Virtual Machine… that’s next post… see I told you…this could eventuate into a series…