Do the first basic steps using Hyper-V on a second PC; then after the first reboot throw the disk into the designated headless server.
Headless installation can be cumbersome and nerve-wrecking. “Did it boot from my USB stick correctly?”, “Is it hanging somewhere waiting for input?”, … Those are the kind of questions going through my head every time I did a headless installation in the past and waited, often for hours, until the server finally gave me some meaningful feedback.
No more, because a.) The new setup experience for Windows Server 2012 Essentails takes headless installations into account and b.) I now know a nice little trick that makes the installation experience an even better one.
The first part of the installation can be done on any PC running Hyper-V. Up to the first reboot of the setup there are no device specific things going on, so why not doing them with the benefit of full visual control?
Hyper-V makes everything easier
Who would have thought Hyper-V even makes installing hardware server easier? Not me.
But by making the soon-to-be server drive the main disk within a hyper-v session actually lets you start the installation process right up to the point where it is ready to be popped into the server to finish the installation.
To do that connect the new server drive to a second PC. I did this using the Sharkoon SATA QuickPort PRO HDD docking station. It’s a great piece of hardware, especially when you are experience hardware problems. And then it’s usually too late to order one, so my advice: Every house hold should have one anyway, so go out there and buy one now. I’ll wait here.
Did you buy one? Good.
For me the QuickPort PRO is best suited, because it has eSATA support, which from my experience will greatly speed up both restores and headless installs.
Mark the newly attached disk as offline and add it to Hyper-V
In order for the new drive to be consumed by Hyper-V it must be marked as offline for the host OS. For that go into the disk management MMC snap-in. I usually do that by right-clicking on “Computer” and selecting “Manage”. Finding the server disk, I right-click it and select “Offline”. In this screenshot Disk 2 is the server disk and it is now marked as offline.
With this done, I can now create a new virtual machine using the Hyper-V manager.
Going through the wizard, I select 2048MB of RAM, select no connection yet and select “Attach a virtual hard disk later”.
Now I open the settings dialog for the virtual machine, because I need to change a couple of things, in order for the installation to go through smoothly. First of all, I upgrade the number of processors to 2. Then I remove the Network Adapter and add a Legacy Network Adapter instead. Strictly speaking this is not necessary for this particular installation. But it helps and it is vital for restores. So I do it anyways. For the network I choose my external network that shares the network interface.
For the VM to boot into the installation I attach the ISO of the installation disk to the DVD drive on IDE Controller 1.
Finally I select the IDE Controller 0 and add a hard drive. Then I select “Physical hard disk” and in the dropdown I choose the server disk.
That’s it. Now the settings dialog should look like this:
Start the installation and watch out for the reboot
Now I start the VM in order to begin the installation. For the rest to work flawlessly it is important that I shut down the VM right before or at least during the very first reboot the installation initiates. In case of the Windows Server 2012 Essentials installation it is right after the installation screen looks this way:
Finishing the installation
Next thing to do is put the server disk as the primary disk into the server. And power on.
After a short while I am able to connect to the IP the DHCP server assigned to the new server and continue the installation via browser.
Here the installation for 2012 Essentials especially shines, since it lets me supervise the process of the final installation.
Finally, after the installation is done I am presented with a website that lets me connect my clients to my freshly baked server.
I hope you enjoyed this little trick. For me it became absolutely helpful, not just for the installation of the server, but especially during restores of client backups. Using the Hyper-V it is super easy to do the restore to a new drive without worrying about network drivers or flaky hardware.