Effective Automated Windows Lab Deployment Fons Mijnen Vincent van - - PowerPoint PPT Presentation

effective automated windows lab deployment
SMART_READER_LITE
LIVE PREVIEW

Effective Automated Windows Lab Deployment Fons Mijnen Vincent van - - PowerPoint PPT Presentation

Effective Automated Windows Lab Deployment Fons Mijnen Vincent van Dongen February 6, 2017 Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 1 / 33 Problem part 1 IT professionals, students, and


slide-1
SLIDE 1

Effective Automated Windows Lab Deployment

Fons Mijnen Vincent van Dongen February 6, 2017

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 1 / 33

slide-2
SLIDE 2

Problem part 1

IT professionals, students, and researchers use test labs for a variety of reasons. Many products and techniques exist to automatically deploy Windows systems. However, these tools only deploy Windows systems and don’t configure a realistic test environment Therefore: Manual configuration is required to create a useful testlab. Technical knowledge is required to build a testlab. These deployment tools require a lot of user input

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 2 / 33

slide-3
SLIDE 3

Problem part 2

In order to create a realistic testlab, traces of users and systems have to be added to the testlab. Examples of traces of user and systems are:

Groups and user account located in the user-database. Random files located in user folders. Mailboxes with email included. Client applications. Log and event files.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 3 / 33

slide-4
SLIDE 4

Research Question

Main question: Is it possible to automate a fast and easy rollout of a realistic Windows test environment with minimal user interaction? Sub question:

What kind of techniques and methods exist to deploy and configure a testlab? What is the most suitable option to automate the deployment and configuration of a testlab? What kind of techniques and methods exists to simulate system and user behavior on machines? What is the most suitable option to automate the simulation of system and user behavior

  • n windows machines?

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 4 / 33

slide-5
SLIDE 5

Defining the testlab

Figure: Overview of the domain structure of the testlab

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 5 / 33

slide-6
SLIDE 6

Defining the testlab

Defining the testlab with system requirements Multiple Active Directory Domain Controllers. Active Directory for a user database with users, groups and Organization Units. Email Server, Domain Name Server, Web server, DHCP server, SMB share. Client computer systems with internet access. Traces of user and system behavior.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 6 / 33

slide-7
SLIDE 7

Defining the testlab

Defining the testlab with functional requirements Relatively fast deployment (less than 12 hours). Minimal user interaction. Definable parameters such as domain names, IP-addresses and users/groups. The total costs should be as low as possible. The total amount of disk space should be as low as possible. Functionality to automatically update Windows servers and clients.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 7 / 33

slide-8
SLIDE 8

Background

Current techniques to deploy and configure a testlab

1 Configuration management 2 Image deployment 3 Virtual Machine Snapshot 4 Templates Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 8 / 33

slide-9
SLIDE 9

Background

Current techniques to simulate user and system behavior:

1 Groups and user account located in the user-database. 2 Random files located in user folders. 3 Mailboxes with email included. 4 Client applications. 5 Log and event files. Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 9 / 33

slide-10
SLIDE 10

Background

Conclusion: By using one these techniques and tools its only partially possible to automatically deploy a realistic testlab. Therefore, some requirements cannot be fulfilled

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 10 / 33

slide-11
SLIDE 11

New Windows testlab deployment mode

Model specification:

1 Deployment of server and OS installation. 2 Server provisioning. 3 Software installation and configuration on servers. 4 Deployment of clients and OS installation. 5 Client provisioning. 6 Software installation and configuration on client. 7 Log file and user behavior emulation. Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 11 / 33

slide-12
SLIDE 12

New Windows testlab deployment mode

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 12 / 33

slide-13
SLIDE 13

proving the model

Build a prototype conform to the model and the lab specification Prototype build on a Windows server.

Intel(R) Xeon(R) CPU E3-1240L v5 @ 2.10GHz 4 cores 16GB RAM 100GB disk Windows server 2012R2 OS

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 13 / 33

slide-14
SLIDE 14

Prototype: underlying architecture

Prototype build with Powershell, Windows native scripting

Includes many native functions for windows configuration that can be used in the prototype Now windows main focus instead of GUI making sure the prototype is viable in the future [3] [2]

Hyper-v used as Hypervisor All remote invocations and commands are called from the Hypervisor server

3http://searchwindowsserver.techtarget.com/tip/

How-and-why-Microsoft-is-killing-the-GUI-on-Windows-Server

2https://mva.microsoft.com/en-us/training-courses/

getting-started-with-powershell-3-0-jump-start-8276

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 14 / 33

slide-15
SLIDE 15

Phase 0: lab definition

The lab should be defined before deployment. The lab is defined in a XML file. IP range, AD domain(s) and a lab name is defined. For each machine in the lab:

A computer name Programs to be installed Windows OS and version Machine Domain

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 15 / 33

slide-16
SLIDE 16

Phase 1: Deployment of server and OS installation 1/3

Differencing disks are used to keep disk usage to a minimum. Uses a parent-child relationship where changes are written to the child disk. The parent disk is read only.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 16 / 33

slide-17
SLIDE 17

Phase 1: Deployment of server and OS installation 2/3

Sysprep is used to prepare the image for deployment.[1] unattend.xml is used to automate the final installation steps. Sysprep and differencing disks allow for a high level of automation.

1https://technet.microsoft.com/en-us/library/hh824938.aspx Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 17 / 33

slide-18
SLIDE 18

Phase 1: Deployment of server and OS installation 3/3

Images can be automatically added to the library of sysprepped disks

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 18 / 33

slide-19
SLIDE 19

Phase 2: Server provisioning

Servers get a static IP, computer names and new passwords Servers are contacted trough APIPA address

APIPA is a IP range windows uses if a NIC fails to get a DHCP address In the 169.254.0.0/16 range Polls for a DHCP server every 5 minutes

Hypervisor server has a 10.0.x.1 address and 169.254.1.x address on the virtual switch

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 19 / 33

slide-20
SLIDE 20

Phase 3: Software installation and configuration on servers

Windows features can be directly installed with Install-WindowsFeature cmdlet EXE, MSI and other installers can be transferred to the server and then called with Invoke-Command feature

Undocumented sandboxing and environment issues make installing some software difficult Environment can be broken out of by scheduling cronjob like tasks to do software installation

ISO, IMG and other image files can be mounted to the virtual DVD drive

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 20 / 33

slide-21
SLIDE 21

Phase 4: Deployment of client and OS installation

Virtually identical to server deployment In order to spread disk I/O load it is done during DC installation

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 21 / 33

slide-22
SLIDE 22

Phase 5: Client provisioning

Clients are given DHCP addresses instead of static addresses The clients are then given a new name and joined to a domain

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 22 / 33

slide-23
SLIDE 23

Phase 6: Software installation on client

Installers and versions can be stored in a library. Transferred and installed with Powershell. Allows for multiple clients with different versions of software in a single Lab.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 23 / 33

slide-24
SLIDE 24

Phase 7: Log file and user behavior emulation 1/4

Traces of use are generated by adding random folder, files and file extension to certain places

Windows user space (My documents, Desktop, Downloads) SMB shares Home folder

Mails in the exchange server are also sent with random content at a random time Log manipulation is very hard in windows, log files are not flat text files

Some tools are around for altering logs in older Windows versions [4] Log files will have to be generated in some other way

4http://www.securityfocus.com/tools/1726 Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 24 / 33

slide-25
SLIDE 25

Phase 7: Log file and user behavior emulation 2/4

Log files are generated by manipulating the time server Sync time with a clients / servers DC every 5 seconds DC’s jump time every 5 seconds by some amount of minutes in lock step Allow for a dynamic acceleration and of time and time it takes

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 25 / 33

slide-26
SLIDE 26

Phase 7: Log file and user behavior emulation 3/4

Scripts are offloaded to clients to sync with the system Hypervisor generates events for the servers, clients generate random events from offloaded scripts

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 26 / 33

slide-27
SLIDE 27

Phase 7: Log file and user behavior emulation 4/4

System works but not perfect AD depends on Kerberos and thus on time being within a certain skew Log entries for the time jumps are present on the system Not every user action can be created trough powershell and scripting

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 27 / 33

slide-28
SLIDE 28

Final overview of the prototype

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 28 / 33

slide-29
SLIDE 29

Results and Comparison

Findings and evaluation

1 Its possible to automatically deploy a realistic testlab. 2 Powershell was designed for maintenance. 3 Exchange has no function for remote installation. 4 Powershell isn’t able to alter timestamps in logfiles 5 The average installation time is approximately 5,5 hours. 6 The average disk space on the hypervisor is approximately 160 GB. 7 Replication time between DCs is 15 minutes. Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 29 / 33

slide-30
SLIDE 30

Results and Comparison

Comparison table part 1

CM WDS Snapshots Email- , DNS-, Web-, DHCP- , File-server X Configured DC with replications, sites and trust X User database with users, groups, OUs X X Clients, Mail and File-server connected to AD X X Automatically update windows servers and clients X Definable parameters such as DC, IP-addresses and users X Deployment in less than 7 hours X X Minimal user interaction X X Total costs should be less than 2000,- X X X Total amount of disk space should be less then 250 GB X X

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 30 / 33

slide-31
SLIDE 31

Results and Comparison

Comparison table part 2

Templates Our solution Email- , DNS-, Web-, DHCP- , File-server X X Configured DC with replications, sites and trust X X User database with users, groups, OUs X X Clients, Mail and File-server connected to AD X X Automatically update windows servers and clients X X Definable parameters such as DC, IP-addresses and users X X Deployment in less than 7 hours X X Minimal user interaction X Total costs should be less than 2000,- X Total amount of disk space should be less then 250 GB X

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 31 / 33

slide-32
SLIDE 32

Conclusion

This research has shown that it is possible to automate a fast and easy roll-out of a realistic Windows test environment with minimal user interaction by using methods and techniques specified in our prototype.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 32 / 33

slide-33
SLIDE 33

Acknowledgements

We would like to express our gratitude and appreciation towards our supervisors Marc Smeets and Mark Bergman. Their assistance and guidance during the whole research period have been really valuable to us.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 33 / 33

slide-34
SLIDE 34

Sysprep (generalize) a windows installation. https: //technet.microsoft.com/en-us/library/hh824938.aspx. Jason Helmick Jeffrey Snover. Mva: Getting started with microsoft powershell, 2013. Don Jones. How (and why) microsoft is killing the gui on windows server, 2011. Arne Vidstrom. Winzapper, a windows 2000 log alteration tool. http://www.securityfocus.com/tools/1726.

Fons Mijnen, Vincent van Dongen Effective Automated Windows Lab Deployment February 6, 2017 33 / 33