Having read about ESXi which can be bought from Dell / HP in an embedded manner, which lets you boot without harddrive I decided to go on the journey to accomplish the same thing with Hyper-V Server 2008 R2. The closest I got to an “embedded” storage thingie was a Kingston USB-stick with 16 GB of storage on it. Worth to note here is that USB-sticks doesn’t have the greatest read/write performance, which I was aware of before I started.
If you wanna see it in action you can always watch the 2½ minute video
filmed with iPhone (not the best quality, sorry!) New video shot with video-cam instead, looks a little better (I blame the rest on FLV…).
Updated: I’ve been informed through email that the OPK (OEM Preinstallation Kit) is freely available at Microsofts site.
Download it here: http://oem.microsoft.com/script/contentpage.aspx?PageID=561189 (You might need to register)
Starting off I first decided to install Hyper-V Server onto my USB-stick. That was an epic fail since it’s not (without a lot of trouble) installing Windows onto a removable drive. So I took the easy approach which saved me (and will save you) a lot of time. Boot from VHD! (click for a TechNet-video) This is a gift from Microsoft staff and Santa Claus to the rest of us. You just need to get everything right and keep track of which drive is which and why and when. But there’s a walktrough coming along nicely below this text.
Step 1: Get a USB-drive with at least 8 GB storage. This is minimum req’s for Hyper-V Server 2008 R2, but I’d recommend 16 GB. Shop the fastest one you can find, it’ll be worth it when you have to sit around and wait. You’ll also need the ISO for Hyper-V Server 2008 R2 and the Windows Automated Installation Kit (WAIK).
Either burn your ISO or use a program to mount it as a virtual drive. You could also extract the files to a directory
Step 2: Fire up CMD with admin-rights.
diskpart (starts the disk management CMD-utility)
create vdisk file=driveletter:virtualharddisk.vhd maximum=14500 type=fixed (creates a VHD on driveletter: of the size 14500 Mb and it’s fixed size for better performance)
select vdisk file=driveletter:virtualharddisk.vhd (selects the created disk)
attach vdisk (attaches it so Windows can see it)
list disk (shows you all the disks in the system, note the number of your newly created VHD)
select disk disknumber (selects the newly created VHD)
create partition primary (creates a primary partition)
select partition 1 (selects the primary partition)
active (sets it to active)
format fs=ntfs quick (format it with NTFS and do it quick)
assign (assigns a driveletter, note with driveletter it gets!)
Leave this window open and start a new CMD with administrative rights.
Step 3: Download Windows AIK from Microsoft (1.7 GB) and install it. You need this to get ImageX which we’ll need soon and you could use the WAIK to customize your installation but that’s beyond the scope of this post.
imagex /info dvddrive:sourcesinstall.wim (this will show you all the entries (or versions) available in the WIM-file, Hyper-V Server 2008 R2 has only one entry, index 1)
imagex /apply dvddrive:sourcesinstall.wim /check 1 vhddrive:
Step 5: Back to our diskpart-CMD
select vdisk file=driveletter:virtualharddisk.vhd
list volume (note the drive letter for the newly mounted VHD.)
bcdboot vhddrive:Windows /s usbdrive: /v (this copies the boot-files from your VHD’s Windows-directory to your USB-stick, which lets you boot later on)
When it’s finished, go back to the CMD with diskpart active and run
Now you can reboot your machine or test in another one with your USB-stick. Don’t forget to move USB to the top of the boot order since it’ll reboot a few times during installation (if you don’t wanna babysit it and press F9 / F12 / the any key)
If this approach doesn’t work you can always create a VHD, install Hyper-V Server 2008 R2 in Virtual PC / Virtual Server / Hyper-V / Virtualbox. When finished, log on and then run Sysprep with the generalize option. I’ve had some problems with certain hardware and it just freezes on the logon screen. This also happened when the VHD was expandable, but I haven’t investigated it further.
Questions? Ask in comments / send an email!
Why you should care about it? Well, I think that in the future most of your server workloads will be on one of these babies. No GUI since you won’t need it. All your management will be remote anyway, either through MMC, WinRS or even better automated through System Center Operations Manager.
But now you’ve installed Server Core? Finding it hard to manage? Some admins do NOT get along with that command prompt. And some admins are so young they don’t even remember that it actually was the only thing you had back in the days…
If you’ve read this far and still wonder what Server Core is you better hop on over to Andrew Mason’s blog. He’s Mr Server Core over at Microsoft and the guy who got it all started.
How do you actually manage it then? Well, there are actually at least 7 ways of taking care of that:
1) Local command prompt.
2) Remote Desktop Connection
3) Remote MMC
5) Powershell / WMI
The local command prompt requires you to know which command does what. It’s not that hard to actually type the commands, the hard part is usually figuring out which command to use. You can find the Server Core reference sheet over at Microsoft.com, which will get you started.
There are also a bunch of software available that will help you with the configuration. CCC, Core Configuration Console, is one of them. It’s written by me and Robin Granberg and is available for Windows Server 2008 Core. There’s not an R2 version available yet, but there might be in the future. CoreConfigurator by SmartX is another one and finally there’s Server Core Configurator over at Codeplex. In R2 Microsoft has added their own little utility called sconfig which will help you get the ball in motion.
In the next post we’ll take a look at the local command prompt and Remote Desktop. The last option needs some configuration before it works, but I’ll get to that!
Just got word from Arlindo Alves that my product demonstration is approved for TechEd Berlin. I always seem to hit the launch years, and being effective in the server-track isn’t that easy when the product teams get a hold of the session slots. But Arlindo nicely enough let me submit a product demo instead so I massaged my grey matter between the ears and came up with a PD that will get you both virtualized and highly available for (almost) free. More information to come when we get closer to the event.
Read more about the event here: http://www.microsoft.com/europe/teched/