Orcharhino meets Windows (Windows Network Deploy)
Windows installations have been possible with orcharhino since version 4.5.0. This means that in addition to numerous Linux derivatives, all newer Windows versions from “Server 2012” can also be installed and managed with orcharhino.
orcharhino basically offers two ways to create a host system: The bare metal installation (complete new installation with network boot) and the image base installation (e.g. using a ready-made VMware template with pre-installed OS).
The finished Windows Host can be created at the push of a button. However, the following questions must first be answered:
- How is a universal Windows boot image created and what should I be aware of?
- How do you get orcharhino to boot into a Windows boot image and install the final OS?
- How is automatic customizing created for Windows (Unattended Installation)?
The answer: Universal Windows Boot Image
Microsoft offers a free tool to easily create a Windows boot image. The Microsoft ADK (Assessment and Deployment Kit) is available as an open-source download.
After installing the kit, a rudimentary WinPE 64Bit boot image is created with the command“copy amd64 c:\winpe“.
This simple boot image can be extended according to your needs. The addition of additional language packages as well as software (e.g. wget) and drivers (network drivers or HDD drivers) is thus possible.
Important: The more drivers you add to the image, the larger it will be (additional drivers are often several gigabytes in size). The advantage of this is that the boot image can be used both directly on a physical server and on a hypervisor such as VMware or Hyper-V.
With good preparation, this can be used universally for any Windows installation.
Solution: orcharhino boots the universal WinPE image
Two files are required to boot Windows systems. These are located in the orcharhino TFTP folder:
- wimboot
- ipxe.lkrn
Both files can be downloaded and used from the website of the open source project “iPXE”. Source: ipxe.org
Nun ist es generell möglich mit orcharhino das zuvor erstellte WinPE via TFTP zu booten. Die dafür notwendigen orcharhino Templates werden im Folgendem erläutert:
Once all preparations have been completed, the Windows ISO files are uploaded to the orcharhino and made available via the web (http).
To do this, the original Windows DVD or the ISO is mounted on the orcharhino and the complete content is copied to a web directory. For example, after: # /var/www/html/pub/images/Windows/{version}
In the last step, the original Windows Boot.wim must be replaced once with the previously created universal boot.wim.
The corresponding orcharhino boot template should have the type “PXELinux Template” set and have the following content.
#################### #!ipxe default Windows label Windows kernel ipxe.lkrn APPEND dhcp && kernel wimboot && initrd <%= foreman_url("script") -%> win_init.cmd && initrd <%= @host.os.medium_uri(@host) %>boot/bcd BCD && initrd <%= @host.os.medium_uri(@host) %>boot/boot.sdi boot.sdi && initrd <%= @host.os.medium_uri(@host) %>sources/boot.wim boot.wim && boot ####################
Figure 3 – Contents of the PXE template
After the boot start of the universal WinPE, it automatically pulls in another orcharhino template. Here, the hard disk layout can be determined directly or via snippets. Drivers can be reloaded or installed. Furthermore, the definition of the Windows version to be installed is possible here. Currently, the following versions are supported:
- Windows Server 2012
- Windows Server 2016 Core
- Windows Server 2016 Desktop
- Windows Server 2019 Core
- Windows Server 2019 Desktop
- Windows 10 Enterprise
Solution: Windows unattended installation
It is important to know how this mechanism works in Windows. Windows uses a file called “unattended.xml” for this purpose, which must be located in the “C:\Windows\Panther” folder when the system is started for the first time.
This XML can be customized via an orcharhino “Provisioning Template” and transferred to the Windows system during booting.
ATIX Example of the Windows Provisioning Template
In this ATIX template the following features are executed during the Windows installation:
- Setting the Administrator Password
- Automatic Domain Join
- Suppressing the installation pop-ups (unattend mode)
- Windows Serial Number / Key Entry
- Setting firewall rules (e.g. Allow WinRM, ICMP Echo, Remote Desktop)
- Setting Remote Desktop Settings
- WinRM configuration Management via Ansible
- User Add “ansible” Create a separate user for Ansible.
- Create or customize general registry entries
- Installing and configuring Puppet 5
- Configure BGinfo for Windows
Result:
After completing all preparations, creating all orcharhino templates and configuring the corresponding “installation media”, “operating systems” and “host groups” in orcharhino, the first Windows deployment can be started.
On Top:
ATIX offers a free webinar on orcharhino on September 28, 2019 with a focus on Windows installation (incl. live demo). If you are interested, you are cordially invited to participate in this free orcharhino session. You can of course also ask us your questions in the live chat.