There’s quite some documentation already available on how to run Windows Nano Server on Hyper-V or bare metal, but what about other hypervisors?
Here at Cloudbase Solutions we often need to build images for different platforms, so why not automate the process in a simple way for all relevant scenarios, including, to begin with: bare metal, Hyper-V, KVM and VMware?
Just clone this git repository…
1 2 |
git clone https://github.com/cloudbase/cloudbase-init-offline-install.git ` -b nano-server-support |
…and run the following PowerShell script, which will generate a Nano Server QcoW2 image ready for OpenStack and other clouds on KVM compute nodes:
1 2 3 4 5 6 7 8 9 |
$isoPath = "C:\ISO\Windows_Server_2016_Technical_Preview_4.ISO" $password = ConvertTo-SecureString -AsPlaintext -Force "P@ssw0rd" .\NewNanoServerImage.ps1 -IsoPath $isoPath ` -TargetPath "C:\VHDs\Nano.qcow2" ` -Platform "KVM" ` -AdministratorPassword $password ` -AddCloudbaseInit ` -MaxSize 800MB |
The interesting thing is that NewNanoServerImage.ps1 will take care of all the details, including downloading and adding the right VirtIO drivers, adding Cloudbase-Init, etc.
If you need an image for a different platform, just choose among Hyper-V, VMware, KVM or BareMetal:
1 |
-Platform BareMetal |
or
1 |
-Platform VMware |
The image is automatically converted to the target format provided in the TartgetPath extension, including: VHD, VHDX, RAW, RAW.GZ, RAW.TGZ, VMDK and QCOW2.
Additional Nano standard packages can be added by providing the corresponding command line switches, for example:
1 2 3 4 |
-Compute -Storage -Clustering -Containers |
On bare metal, you might want to add some extra network or storage drivers. Just include the path were you downloaded the drivers:
1 |
-ExtraDriversPaths C:\Dev\Drivers\NUC_2015_Intel_ndis64 |
Talking about bare metal, there’s also MAAS support baked in!
1 |
-AddMaaSHooks |
This should be enough to get you started. There are also many more available command line options for additional use cases!