Hello everyone,

In the first post of “Nano Server” series, I have briefly introduced Nano Server.  Now is time to learn how to prepare Nano Server image.

Nano Server cannot be selected as installation option from DVD, ISO or bootable USB. In order to create .vhd / .vhdx file with installed Nano Server, you need to use PowerShell (with Nano Server module) or Nano Server Image Builder, GUI tool for creating .vhd / .vhdx file or creating bootable ISO from previously created virtual hard disk file.

Creating .vhd / .vhdx file is pretty simple with Nano Server Image Builder, but if you familiar with PowerShell,  process will be pretty easy. I will show you both methods for basic installation, although I prefer PowerShell because is faster 🙂

PowerShell commands

If you want to create Nano Server virtual hard disk using PowerShell, you must do these three steps.

  • Copy NanoServer folder from installation media to local hard drive
  • Import NanoServerImageGenerator PowerShell module
  • Run command for creating Nano Server image
# Copy Nano Server folder from installation media to local drive
Copy-Item F:\NanoServer -Recurse -Destination C:\ 

# Import Nano Server module 
Import-Module C:\NanoServer\NanoServerImageGenerator\NanoServerImageGenerator.psm1 

# Create IIS Nano Server image 
New-NanoServerImage ` 
-DeploymentType Guest ` 
-Edition Datacenter ` 
-MediaPath F: ` 
-BasePath C:\NanoServer ` 
-TargetPath D:\VMs\NanoServer\NanoServer.vhdx ` 
-ComputerName NanoServer

*Note that media drive (F: in my case) and image destination (D:\VMs\NanoIIS\NanoIIS.vhdx in my case), can vary depending on the configuration.

After these three command, your .vhdx will be created, and you can create VM and start Nano Server. But before creating VM, just quick explanation about few terms from PowerShell script.

  • F: is my DVD media. If your DVD media has different letter, you must change this.
  • C: is my selected destination, but can use any different location.
  • PS switch -DeploymentType define installation type. Guest for VM, Host for physical machine.
  • PS switch -MediaPath is path to your DVD media.
  • PS switch -BasePath is path to your local NanoServer folder copy.
  • PS switch -TargetPath is path for saving Nano Server image. including .vhd / .vhdx extension.

 

Nano Server Image Builder

As mentioned earlier, Nano Server Image Builder is GUI tool for creating Nano Server images. Basically, tool will run PowerShell script in background with parameters which you selected during steps. Installation is very fast and simple, but ADK (Assessment and Deployment Kit) is prerequisites for Nano Server Image Generator. You need to download and install Windows PE and Deployment Toolkit from ADK, in order to use Nano Server Image Generator.

 

After creating Nano Server image, you will be able to create VM and start playing with Nano Server.

 

Leave a Reply

Your email address will not be published. Required fields are marked *