If you're like me, you might be a little excited about the announcement and availability of Windows Server Nano. If not, go watch the video about it on channel9, I'll wait...
So, now that you are appropriately excited, you might want to try it out for yourself. Easier said than done I'm afraid, but worry not fearless internet person! Below the break is my guide for getting Nano Server up and running on Hyper-V in no time.
UPDATE 5/26/2015: There is a better script on GitHub located here. I am working to add more parameters and functionality to that script rather than keep going with my own. I have started my own fork here, but I will be putting in pull requests shortly to get it in the main fork too.
First of all, this is a guide for getting Nano Server running on Hyper-V, not VMware Workstation or VirtualBox or vSphere. Can you get it to work on those platforms? Probably, but it is going to take some serious legwork and here's why. Nano Server has no device drivers pre-installed, that's right NONE. So part of the process is to stream in the drivers you need for the hardware it will live on. It also is lacking the bits for most Windows features, which also need to be streamed into the image.
So what will you need? First get an ISO copy of Windows Server Technical Preview 2 from Microsoft. Once you have the ISO, mount it to the E: drive and run the following script from an elevated PowerShell prompt:
That script will produce the VHD file to use for a Hyper-V virtual machine. Consider the VHD your gold image. For the actual VM, make a copy of that VHD and drop it elsewhere. Then fire up your Hyper-V Manager and create a new VM. Select a Version 1 VM with 512MB of memory and a network that has a DHCP server on it. For the hard drive, select the VHD file you just made a copy of. Then finish the VM wizard and power on your NanoServer! It should boot in a matter of seconds and present you with the IP Address to use for connections. All control of the Nano Server is done through a remote PowerShell session. Take note of the IP Address and pull up a PowerShell prompt. Now run the following:
$ip = "the IP Address of Nano Server]
There is no password set for the Administrator account initially. You are now connected to your Nano Server. What are you going to do with it? I leave that up to you. If you come up with something awesome, let me know via Twitter or in the Comments section.
$user = "$ip\Administrator"
Enter-PSSession -ComputerName $ip -Credential $user
To create this guide I relied heavily on this MSDN article.
Labels: Microsoft Ignite, powershell, Scripts, Windows, Windows Nano Server