https://github.com/AutomationD/wimaging
Windows Imaging Toolkit
https://github.com/AutomationD/wimaging
Last synced: 5 months ago
JSON representation
Windows Imaging Toolkit
- Host: GitHub
- URL: https://github.com/AutomationD/wimaging
- Owner: AutomationD
- Created: 2014-04-18T15:27:41.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-29T15:51:31.000Z (over 4 years ago)
- Last Synced: 2024-05-23T00:34:40.067Z (11 months ago)
- Language: PowerShell
- Size: 9.71 MB
- Stars: 105
- Watchers: 6
- Forks: 30
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: licenses/gpl-v3.license
Awesome Lists containing this project
- jimsghstars - AutomationD/wimaging - Windows Imaging Toolkit (PowerShell)
README
# Provision Windows hosts with [Foreman](http://theforeman.org/)
[](https://gitter.im/kireevco/wimaging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Update!
- Added UEFI suppot for foreman templates - see dedicated [upgrade guide](doc/upgrade-uefi.md)
- Updated templates to refelct my currently working versions## Introduction
`wimaging` is a set of scripts to prepare WIM images and templates for Foreman to provision Windows hosts.
Most of the time official Microsoft deployment tools are used; mostly `dism.exe`.All relevant configuration files like `unattend.xml` are rendered by Foreman and downloaded at build time.
### Features
- __Linux style installation__ using `http://` or `ftp://` installation media
- __No extra servers__ like WDS needed - all relevant settings can be configured in Foreman directly
- __Official Microsoft utilities__ are used for all relevant setup stages making it easy to add (future) operating systems
- __Driver installation__ during build time
- Support for __localization__ settings (like time zone, locale, UI language)
- Optional __domain join__ including target OU
- Optional __local user creation__
- Support for Foreman's __root password__ using Base64 Windows encoding
- Correctly __report finished host building__
- Optional software installation and user tasks at the end of the build (like __installing puppet__ etc)## Prerequisites:
The list requirements for using Foreman, all of them are __not__ covered by this guide.- A working Foreman __version 1.20+__ installation (obviously), capable of net booting clients along with a working DNS / DHCP infrastructure. If you plan on using PXELinux, make sure your Foreman instance runs [Syslinux 5+](http://www.syslinux.org/wiki/index.php?title=Syslinux_5_Changelog#Changes_in_5.10), witch is required for wimboot. PXELinux 5.10 is confirmed to work with wimboot.
- Currently, [Safe Mode Render](http://theforeman.org/manuals/1.9/index.html#3.5.2ConfigurationOptions) must be disabled in foreman
- A utility Windows VM or physical host to prepare the WIM images (Microsoft likes the term [Technician Computer](https://technet.microsoft.com/en-us/library/cc766148(v=ws.10).aspx))
- A file server serving http and/or ftp protocols; fast machine recommended for production
- Installation media for each Windows version
- Driver files (`.inf`) you want to inject
- A VM / bare metal machine to test your setup (start with VMs ;)## Getting started with wimaging
The tasks can be broken down in two steps:#### 1. [Configure wimaging and create WIM images](doc/wimaging.md)
#### 2. [Configuring Foreman](doc/foreman.md)#### [Script Reference](doc/reference.md)
## Provision work flow
An outline of the process to better understand the tasks witch need to be done. Basically, there are three phases:### Phase I
1. Create a new host in Foreman.Simple as that. For Bare Metal hosts [Foreman discovery](https://github.com/theforeman/foreman_discovery) is recommended.
### Phase II
1. (i)PXE / [wimboot](http://ipxe.org/wimboot) boots customized boot.wim (winpe)
2. Winpe downloads the script `foreman_url('script')`; executes it:
1. Drive 0 is cleaned, partitioned and mounted using foreman partition table (simple `diskpart` script)
4. `install.wim` is downloaded via http/ftp and applied using `dism.exe`
5. `unattend.xml` (`foreman_url('provision')`) is download and applied using `dism.exe`
6. Drivers are downloaded and added using `dism.exe`
6. Required tools are added to the new host (most prominently `wget`)
6. Optionally, download extra software (like puppet)
6. Optionally, domain join script (`foreman_url('user_data')`)
7. The finish script (`foreman_url('finish')`) is download and 'armed'
8. reboot to new OS### Phase III
1. Windows native finish tasks are done ('starting devices...')
1. The finish script gets called by [`SetupComplete.cmd`](https://technet.microsoft.com/en-us/library/cc766314%28v=ws.10%29.aspx)
1. Set the time server; sync time
2. Optionally, the local administrator account is activated
2. Optionally, join domain
3. Optionally, execute extra scripts (eg, install puppet)
3. Securely cleanup (sensitive) scripts using [`SDelete.exe`](https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx)
2. Reboot the host; ready for further configuration by Puppet, SCCM ect.## Acknowledgments
`wimaging` has a merged a fork of [wimaging-ng](https://github.com/helge000/wimaging-ng). Many thanks to [Daniel Helgenberger](https://github.com/helge000) for a large contribution portion.
SDelete and other PStools by SysInternals are the work of [Mark Russinovich](http://blogs.technet.com/b/markrussinovich/about.aspx).## License
[wimaging license](licenses/wimaging.license)Other licenses:
- [wimaging-ng Daniel Helgenberger](licenses/wimaging-ng.license)
- [SysInternals](licenses/sysinternals.license)
- [Gnu General Public License v3 for GNU wget and other utilities](licenses/gpl-v3.license)