Thursday, 2 June 2016

Installing Nano Server

Posted by Ashwin Venugopal

Initial Preparation

  1. Mount the Windows Server 2016 product DVD (or an ISO image of the DVD) on a Windows Server 2016 or Windows 10 computer.
  2. Copy NanoServerImageGenerator.psm1, and Convert-WindowsImage.ps1 from the \NanoServer folder on the Windows Server DVD to a local folder on your computer.
  3. Open Windows PowerShell, and then run the below cmdlet 
    1. Import-Module NanoServerImageGenerator.psm1. 
  4. To create a virtual hard disk (either a VHD or a VHDX file) for the Nano the the below cmdlet
    1. New-NanoServerImage -MediaPath <path to root of the contents of the Windows Server DVD> -BasePath .\Base -TargetPath .\NanoServerVM\NanoServerVM.vhd -ComputerName <computer name> -GuestDrivers / -OEMDrivers
      1. -BasePath specifies a folder that will be created to contain a copy of the Nano Server .wim file and packages.
      2. -TargetPath specifies the full path, including the file name and extension, where the resulting VHD or VHDX will be created.
      3. -Computer_name is the computer name you provide for the Nano Server you are creating.

To deploy Nano Server as a Hyper-V guest:
  1. Copy the virtual hard disk you just created to the appropriate location on your Hyper-V host.
  2. In Hyper-V, create a virtual machine and configure it to use the virtual hard disk you just created.
  3. Start the virtual machine, and then sign in by using the user name and password you are gave when running the earlier script.
  4. Use the Nano Server Recovery Console and configure the basic settings for the computer. 
    1. Such as IPv4 and Windows Firewall rule settings.
  5. Now you can connect to your Nano Server remotely and complete the configuration process.
To deploy Nano Server on a physical host:
  1. Copy the virtual hard disk you just created to an appropriate location [C:\NanoServer (in my case)] on the host that you intend to use as a Nano Server.
  2. Modify the startup settings of the target computer to use the virtual hard disk:
    1. Open an elevated command prompt and type - bcdedit /copy {current current boot loader entry} /d “Nano Server” command.
    2. Type bcdedit again
    3. Copy the GUID, including the braces ({ }), that appears in the ID field of the newly copied boot loader entry.
    4. Run the following commands,
      1. bcdedit /set {GUID} device vhd=[c:]\NanoServer\NanoServer.vhd
      2. bcdedit /set {GUID} osdevice vhd=[c:]\NanoServer\NanoServer.vhd
      3. bcdedit /set {GUID} path \windows\system32\boot\winload.exe
  3. Now open System Properties and Select Startup and Recovery settings. You should now see that System startup lists Nano Server.
Thanks for reading.

No comments:

Post a Comment