• Stars
    star
    281
  • Rank 147,023 (Top 3 %)
  • Language
    PowerShell
  • License
    MIT License
  • Created about 9 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Virtual Engine test lab deployment and configuration module
master branch dev branch
Build status Build status

Lability

Lability logo

The Lability module enables simple provisioning of Windows Hyper-V development and testing environments. 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 configuration 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, including Server 2016 TP4 and Nano server
    • 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

Examples

An example DSC configuration document might look the following. Note: this is a standard DSC .psd1 configuration document, but has been extended with specific properties which the Lability module can interpret.

@{
    AllNodes = @(
        @{
            NodeName                = 'DC1';
            Lability_ProcessorCount = 2;
            Lability_SwitchName     = 'CORPNET';
            Lability_Media          = '2012R2_x64_Standard_EN_Eval';
        },
        @{
            NodeName                = 'APP1';
            Lability_ProcessorCount = 1;
            Lability_SwitchName     = 'CORPNET';
            Lability_Media          = '2012R2_x64_Standard_EN_Eval';
        }
    )
    NonNodeData = @{
        Lability = @{
            Network = @(
                @{
                    Name = 'CORPNET';
                    Type = 'Internal';
                }
            ) #end Network
        } #end Lability
    } #end NonNodeData
}

When Start-LabConfiguration is invoked with the above configuration document, it will:

  • Create an internal Hyper-V virtual switch named 'CORPNET'
    • If no network is defined, a default internal virtual switch will automatically be created
  • Download required Server 2012 R2 Standard Edition evaluation media
    • Create a Sysprep'd Server 2012 R2 Standard Edition parent VHDX
    • 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

More examples can be found in the .\Examples folder of the module's root directory.

Community Resources

A brief introduction to the VirtualEngineLab module presented at the European PowerShell Summit 2015 can be found here. Other generous members of the community have written some comprehensive guides to compliment the built-in documentation – a BIG thank you!

Lability image/logo attribution credit

More Repositories

1

XenDesktop7

Community Citrix XenDesktop 7 DSC resources
PowerShell
22
star
2

XenDesktop7Lab

Community Citrix XenDesktop 7 Lab composite DSC resources
PowerShell
20
star
3

LabilityBootstrap

PowerShell module for manually bootstrapping VMs using Lability configurations
PowerShell
9
star
4

VirtualEngineLab

Virtual Engine lab composite resources
PowerShell
8
star
5

Compression

PowerShell module for compressing and decompressing .ZIP archives
PowerShell
8
star
6

PrinterManagement

PowerShell DSC resource for managing printers
PowerShell
7
star
7

AppvProvider

Microsoft App-V 5.x Package Management Provider
PowerShell
7
star
8

FSLogixDsc

FSLogix container composite DSC resources
PowerShell
5
star
9

VirtualEngineTrainingLab

Virtual Engine training lab composite DSC resources
PowerShell
5
star
10

VirtualEngine.Build

The VirtualEngine.Build module contains PowerShell cmdlets that are used to bundle Powershell module and Visual Studio binary releases.
PowerShell
4
star
11

AppLockerEx

Programmatcally create AppLocker Policy (XML) documents with PowerShell.
PowerShell
4
star
12

LegacyNetworking

Legacy networking cmdlets and DSC resources for Windows 7 and Server 2008 R2
PowerShell
3
star
13

Storefront

Citrix Storefront PowerShell Desired State Configuration resources
PowerShell
3
star
14

cPfxCertificate

Powershell DSC resource for installing Personal Information Exchange (PFX) certificate bundles
PowerShell
2
star
15

VirtualEngineShowcaseLab

Virtual Engine Showcase lab composite DSC resources
PowerShell
2
star
16

VirtualEngineBaseLab

Virtual Engine base lab composite resources
PowerShell
1
star
17

RESONEServiceStore

RES ONE Service Store PowerShell DSC Resources
PowerShell
1
star
18

RESONEWorkspace

RES ONE Workspace PowerShell DSC Resources
PowerShell
1
star
19

Intune

PowerShell
1
star