Skip to content

Instantly share code, notes, and snippets.

@janegilring
Created July 21, 2017 06:12
Show Gist options
  • Select an option

  • Save janegilring/76c28caf2ea239f2b99e9a0547497e55 to your computer and use it in GitHub Desktop.

Select an option

Save janegilring/76c28caf2ea239f2b99e9a0547497e55 to your computer and use it in GitHub Desktop.
TOPIC
about_Lability
SHORT DESCRIPTION
Lability is a local Hyper-V lab provisioning framework.
LONG DESCRIPTION
The Lability module enables simple provisioning of local Windows Hyper-V development and testing lab
environments. The intended purpose is to enable the sharing and collaboration of lab environment
configurations in a standardised format.
It uses a declarative document for machine configuration. However, rather than defining configurations in an
external custom domain-specific language (DSL) document, Lability extends existing PowerShell Desired State
Configuration (DSC) configuration .psd1 documents with metadata that can be interpreted by the module.
By using this approach, it allows the use of a single confiugration document to describe all properties for
provisioning Windows-centric development and/or test environments.
The Lability module will parse the DSC configuration document and provision Hyper-V virtual machines according
to the metadata contained within. When invoked, Lability will parse a DSC configuration document and
automagically provision the following resources:
* Virtual machine disk images
- Download required evaluation Operating System installation media.
- Expand Windows Image (WIM) image files into Sysprep'd virtual machine parent disks.
- Apply required/recommended DSC Windows updates.
* Virtual networks
- Create internal and external Hyper-V switches.
* Virtual machines
- Connect to the correct virtual switches.
- Inject DSC resources from the host machine.
- Inject a dynamically created Unattend.xml file.
- Inject external ISO, EXE and ZIP resources.
- Inject the virtual machine's DSC document.
- Invoke the Local Configuration Manager (LCM) after Sysprep.
When Start-LabConfiguration is invoked with the above configuration document, it will:
* Create an internal Hyper-V virtual switch named 'CORPNET'.
* Download required Server 2012 R2 Standard Edition evaluation media.
* Create a Sysprep'd Server 2012 R2 Standard Edition parent VHDX file.
* Install required/recommended DSC hotfixes.
* Provision two Hyper-V virtual machines called 'DC1' and 'APP1'.
* Each VM will be given 2GB RAM (configurable default).
* 'DC1' will be assigned 2 virtual CPUs.
* 'APP1' will be assigned 1 virtual CPU.
* Attach each virtual machine to the 'CORPNET' virtual switch.
* Create differencing VHDX for each VM.
* Inject a dynamically created Unattend.xml file into the differencing VHDX.
For a full list of supported metadata, see about_ConfigurationData.
CONTRIBUTE
Lability is open source on GitHub:
https://github.com/VirtualEngine/Lability
As you run Lability and find what you believe to be are bugs, please submit them to:
https://github.com/VirtualEngine/Lability/issues
Better yet, fix the bug and submit a pull request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment