Sei sulla pagina 1di 301

Deploying System Center

Virtual Machine Manager


2016 – Step by Step
Volume 1

Dave Kawula - MVP


Allan Rafuse - MVP
Cristal Kawula - MVP
Cary Sun – Cisco Champion (CCIE )
PUBLISHED BY

MVPDays Publishing
http://www.mvpdays.com

Copyright © 2018 by MVPDays Publishing

All rights reserved. No part of this book may be reproduced or transmitted in any form or by any
means without the prior written permission of the publisher.

ISBN:TBA

Warning and Disclaimer


Every effort has been made to make this manual as complete and as accurate as possible, but no
warranty or fitness is implied. The information provided is on an “as is” basis. The authors and
the publisher shall have neither liability nor responsibility to any person or entity with respect to
any loss or damages arising from the information contained in this book.

Feedback Information
We’d like to hear from you! If you have any comments about how we could improve the quality
of this book, please don’t hesitate to contact us by visiting www.checkyourlogs.net or sending an
email to feedback@mvpdays.com.

iii
Acknowledgements

iii
Acknowledgements

Acknowledgements
From Dave
Cristal, you are my rock and my source of inspiration. For the past 20 + years you have been
there with me every step of the way. Not only are you the “BEST Wife” in the world you are my
partner in crime. Christian, Trinity, Keira, Serena, Mickaila and Mackenzie, you kids are so patient
with your dear old dad when he locks himself away in the office for yet another book. Taking the
time to watch you grow in life, sports, and become little leaders of this new world is incredible to
watch.

Thank you, Mom and Dad (Frank and Audry) and my brother Joe. You got me started in this crazy
IT world when I was so young. Brother, you mentored me along the way both coaching me in
hockey and helping me learn what you knew about PC’s and Servers. I’ll never forget us as
teenage kids working the IT Support contract for the local municipal government. Remember
dad had to drive us to site because you weren’t old enough to drive ourselves yet. A great
career starts with the support of your family and I’m so lucky because I have all the support one
could ever want.

A book like this filled with amazing Canadian MVP’s would not be possible without the support
from the #1 Microsoft Community Program Manager – Simran Chaudry. You have guided us
along the path and helped us to get better at what we do every day. Your job is tireless and
your passion and commitment make us want to do what we do even more.

Last but not least, the MVPDays volunteers, you have donated your time and expertise and
helped us run the event in over 20 cities across North America. Our latest journey has us
expanding the conference worldwide as a virtual conference. For those of you that will read this
book your potential is limitless just expand your horizons and you never know where life will take
you.

iv
About the Authors

About the Authors


Dave Kawula - MVP
Dave is a Microsoft Most Valuable Professional (MVP) with over 20 years of experience in the IT
industry. His background includes data communications networks within multi-server
environments, and he has led architecture teams for virtualization, System Center, Exchange,
Active Directory, and Internet gateways. Very active within the Microsoft technical and
consulting teams, Dave has provided deep-dive technical knowledge and subject matter
expertise on various System Center and operating system topics.

Dave is well-known in the community as an evangelist for Microsoft, 1E, and Veeam
technologies. Locating Dave is easy as he speaks at several conferences and sessions each year,
including TechEd, Ignite, MVP Days Community Roadshow, and VeeamOn.

Recently Dave has been honored to take on the role of Conference Co-Chair of TechMentor with
fellow MVP Sami Laiho. The lineup of speakers and attendees that have been to this conference
over the past 20 years is really amazing. Come down to Redmond or Orlando in 2018 and you
can meet him in person.

As the founder and Managing Principal Consultant at TriCon Elite Consulting, Dave is a leading
technology expert for both local customers and large international enterprises, providing optimal
guidance and methodologies to achieve and maintain an efficient infrastructure.

BLOG: www.checkyourlogs.net

Twitter: @DaveKawula

v
About the Authors

Allan Rafuse – MVP


Allan has worked as a senior member of the Windows and VMWare Platform Department at
Swedbank. He took part in the architecture and implementation of multiple datacenters in
several countries. He is responsible for the roadmap and lifecycle of the Windows Server
Environment, including the development of ITIL processes of global server OSD, configuration,
and performance.

He is an expert at scripting solutions and has an uncanny ability to reduce complexity and
maximize the functionality of PowerShell. Allan has recently rejoined the TriCon Elite Consulting
team again as a Principal Consultant.

BLOG: http://www.checkyourlogs.net

Twitter: @allanrafuse

vi
About the Authors

Cristal Kawula – MVP


Cristal Kawula is the co-founder of MVPDays Community Roadshow and #MVPHour live Twitter
Chat. She was also a member of the Gridstore Technical Advisory board and is the President of
TriCon Elite Consulting. Cristal is also only the 2nd Woman in the world to receive the prestigious
Veeam Vanguard award.

Cristal can be found speaking at Microsoft Ignite, MVPDays, and other local user groups. She is
extremely active in the community and has recently helped publish a book for other Women
MVP’s called Voices from the Data Platform.

BLOG: http://www.checkyourlogs.net

Twitter: @supercristal1

vii
About the Authors

Cary Sun – CCIE #4531 (Cisco Champion)

Cary Sun is CISCO CERTIFIED INTERNETWORK EXPERT (CCIE No.4531) and MCSE, MCIPT, Citrix
CCA with over twenty years in the planning, design, and implementation of network technologies
and Management and system integration. Background includes hands-on experience with multi-
platform, all LAN/WAN topologies, network administration, E-mail and Internet systems, security
products, PCs and Servers environment. Expertise analyzing user’s needs and coordinating
system designs from concept through implementation. Exceptional analysis, organization,
communication, and interpersonal skills. Demonstrated ability to work independently or as an
integral part of team to achieve objectives and goals. Specialties: CCIE /CCNA / MCSE / MCITP /
MCTS / MCSA / Solution Expert / CCA

Cary’s is a very active blogger at checkyourlogs.net and always available online for questions
from the community. He passion about technology is contagious and he makes everyone around
him better at what they do.

Blog:http://www.checkyourlogs.net

Twitter:@SifuSun

viii
About the Authors

ix
Contents

Contents

Acknowledgements ...................................................................................................... iv
From Dave ............................................................................................................. iv

About the Authors ......................................................................................................... v


Dave Kawula - MVP ..................................................................................................... v
Allan Rafuse – MVP .................................................................................................... vi
Cristal Kawula – MVP ................................................................................................ vii
Cary Sun – CCIE #4531 (Cisco Champion) .............................................................. viii

Contents......................................................................................................................... x

Introduction ................................................................................................................. 16

North American MVPDays Community Roadshow ................................................... 16


Sample Files ............................................................................................................. 17
Additional Resources ................................................................................................ 17

Chapter 1...................................................................................................................... 19

Pre-Requisites ............................................................................................................. 19
Lab Server Names .................................................................................................... 19
Building the Lab with BigDemo_VMM.PS1 ............................................................... 21
Enable Routing in the Lab ......................................................................................... 26
Software Requirements ............................................................................................ 40
Virtual Machine Manager Accounts Required for Build ......................................... 42

x
Contents

Add a 2 VHDx drives to the VMM Server for the SQL Install ..................................... 46
Install Windows ADK 1709 ........................................................................................ 55
SQL Command Line Utilities ..................................................................................... 58

Chapter 2...................................................................................................................... 59

Install SQL Server 2016 SP1 ....................................................................................... 59


SQL Server Service Accounts................................................................................... 59
Configure SQL Firewall Port Exceptions ................................................................... 60
Install Default Instance of SQL 2016 SP1 ................................................................. 64
Download and Install SQL Server Managemetn Studio (SSMS) ............................... 73
Configure SQL Server Memory Limits....................................................................... 75

Chapter 3...................................................................................................................... 79

Install System Center Virtual Machine Manager........................................................ 79


Download VMM 2016 Media and Update Rollup 4 .................................................... 79
Install System Center Virtual Machine Manager (SCVMM) 2016 .............................. 81
Install update Rollup 4 for System Center Virtual Machine Manager (SCVMM) 2016 88

Chapter 4...................................................................................................................... 90

Base Configuration of VMM ........................................................................................ 90


Create a Run As Account.......................................................................................... 90
Configure Network Settings ...................................................................................... 92
Create a New Host Group ......................................................................................... 94
Add Hyper-V Hosts ................................................................................................... 96

Chapter 5.................................................................................................................... 102

Configuring Host Networking for S2D with VMM .................................................... 102

xi
Contents

Sample – Network Configuration from Mellanox ..................................................... 102


Logical Network Configuration............................................................................ 104
Servers and Network Configuration .................................................................... 104
DHCP Service Configuration .............................................................................. 104
Sample Top of Rack Switch Configuration: ........................................................ 105
System Deployment ................................................................................................ 114
Install and Configure DataCenter Bridging – Optional ........................................ 114
Creating Logical Networks (MGMT, Cluster, LiveMigration, and Storage) ............... 115
Review the S2D Node Networking configuration ................................................ 115
Create MGMT Logical Network .......................................................................... 116
Create MGMT IP Pool ........................................................................................ 118
Create Cluster Logical Network .......................................................................... 122
Create Cluster IP Pool........................................................................................ 124
Create Live Migration Logical Network ............................................................... 128
Create Live Migration IP Pool ............................................................................. 130
Create Storage Logical Network ......................................................................... 134
Create Storage IP Pool ...................................................................................... 136
Create CorpNet Logical Network ........................................................................ 140
Create CorpNet IP Pool...................................................................................... 142
Validate the Logical Networks ............................................................................ 145
Create Logical Switch for the Storage Network .................................................. 146
Create Logical Switch for the CorpNet Network.................................................. 162
Deploy the Storage Logical Switch to S2D1-4 .................................................... 168
Deploy the CorpNet Logical Switch to S2D1-4 ................................................... 171

Chapter 6.................................................................................................................... 174


xii
Contents

Configure Failover Cluster and S2D with VMM ....................................................... 174


Build the Cluster and Storage Spaces Direct (S2D) ........................................... 174

Chapter 7.................................................................................................................... 178

Configure Storage Integration of S2D with VMM..................................................... 178


Review Storage Providers, Arrays, and Classifications ...................................... 178
Create Cluster Shared Volumes ......................................................................... 182

Chapter 8.................................................................................................................... 186

VM Templates ............................................................................................................ 186


Configure S2D Nodes with 8 GB RAM ............................................................... 186
Building a Gold VHDx......................................................................................... 188
Creating the VM Template.................................................................................. 200
Deploying a VM Template .................................................................................. 204

Chapter 9.................................................................................................................... 210

Host Patch Management with VMM .......................................................................... 210


Install the WSUS Feature on VMM01 ................................................................. 210
WSUS Configuration Wizard .............................................................................. 216
Add WSUS Server to VMM ................................................................................ 224
Verify that WSUS has been added Successfully ................................................ 225
Assign Computers to Built-In Update Baseline ................................................... 226
Scan S2D Hyper-V Hosts for Compliance .......................................................... 230
Remediate Hosts................................................................................................ 234

Chapter 10 .................................................................................................................. 236

Host Patching of Storage Spaces Direct (S2D) with VMM ...................................... 236

xiii
Contents

Patching Storage Spaces Direct nodes with VMM .................................................. 236


Check the Health of Your Virtual Disks before going into Maintenance Mode .... 236
Scan S2D Hyper-V Hosts for Compliance .......................................................... 238
Put the Node into Maintenance Mode ................................................................ 240
Remediate Hosts................................................................................................ 243
Turn off Maintenance Mode on the Host and verify Storage Spaces Direct Health
........................................................................................................................... 245

Chapter 11 .................................................................................................................. 248

Operational Maintenance of Storage Spaces Direct ............................................... 248


Restarting Storage Spaces Direct nodes with VMM ................................................ 248
Check the Health of Your Virtual Disks before going into Maintenance Mode .... 249
Put the Node into Maintenance Mode and Restart / Shutdown ........................... 250

Chapter 12 .................................................................................................................. 254

Bonus Community Content - Storage Spaces Direct (S2D) Scripts...................... 254


Using PowerShell to Document Storage Spaces Direct .......................................... 254
Using the Community PowerShell S2D-Audit.PS1 ............................................. 254
Using PowerShell to setup Email Alerting for Storage Spaces Direct ...................... 260
Using the Community PowerShell Monitor-S2D.PS1 .......................................... 260
Monitor S2D with Storage Spaces Direct Monitor GUI ............................................ 263
Using the Community PowerShell Monitor-S2D.PS1 .......................................... 263
Monitor S2D with Storage Spaces StarWind Manager (Preview) ............................ 266
Using StarWind Manager (Preview) ................................................................... 266

Appendix .................................................................................................................... 278

BigDemo_VMM.PS1................................................................................................... 278

xiv
Contents

S2D-Audit.PS1 ........................................................................................................... 296

Contact Info ............................................................................................................... 297

Join us at MVPDays and meet great MVP’s like this in person .............................. 297
Live Presentations .................................................................................................. 297
Video Training......................................................................................................... 297
Live Instructor-led Classes ...................................................................................... 298
Consulting Services ................................................................................................ 298
Twitter ..................................................................................................................... 299

xv
Introduction North American MVPDays Community Roadshow

Introduction

North American MVPDays


Community Roadshow
The purpose of this book is to showcase the amazing expertise of our guest speakers at the
North American MVPDays Community Roadshow. They have so much passion, expertise, and
expert knowledge that it only seemed fitting to write it down in a book.

MVPDays was founded by Cristal and Dave Kawula back in 2013. It started as a simple idea;
“There’s got to be a good way for Microsoft MVPs to reach the IT community and share their
vast knowledge and experience in a fun and engaging way” I mean, what is the point in
recognizing these bright and inspiring individuals, and not leveraging them to inspire the
community that they are a part of.

We often get asked the question “Who should attend MVPDays”?

Anyone that has an interest in technology, is eager to learn, and wants to meet other like-
minded individuals. This Roadshow is not just for Microsoft MVP’s it is for anyone in the IT
Community.

Make sure you check out the MVPDays website at: www.mvpdays.com. You never know maybe
the roadshow will be coming to a city near you.

The goal of this particular book is to bring you real world step-by-step guidance from our expert
MVP Authors on Microsoft System Center Virtual Machine Manager. These are the same experts
you come to see in person at the MVPDays Roadshow. This book is written in the format of a
Step-by-Step learning guide. We really hope you find some immense value in what we have
written.

16
Introduction North American MVPDays Community Roadshow

Sample Files
All sample files for this book can be downloaded from www.checkyourlogs.net and
www.github.com/dkawula

Additional Resources
In addition to all tips and tricks provided in this book, you can find extra resources like articles
and video recordings on our blog http://www.checkyourlogs.net.

17
Introduction North American MVPDays Community Roadshow

18
Chapter 1 Pre-Requisites

Chapter 1

Pre-Requisites
Lab Server Names
The follow table describes the required Virtual Machines to build this lab. This lab is designed to
be built on a Hyper-V Host Server with a minimum of 16 GB of RAM. An automation script called
BigDemo_VMM.PS1 has been used to provision this lab environment. A copy of this script can
be found in the appendices.

Hostname Role Operating System

VMM01 System Center Virtual Windows Server 2016


Machine Manager 2016 with
SQL Server 2016 will be
installed locally

DC01 Primary Domain Controller Windows Server 2016


running Active Directory
Certificate Services as an
Enterprise Root

S2D1 Storage Spaces Direct – Hyper- Windows Server 2016


V Cluster Node

S2D2 Storage Spaces Direct – Hyper- Windows Server 2016


V Cluster Node

S2D3 Storage Spaces Direct – Hyper-


V Cluster Node

S2D4 Storage Spaces Direct – Hyper- Windows Server 2016


V Cluster Node

Router01 Windows NAT Router for the Windows Server 2016


LAB

19
Chapter 1 Pre-Requisites

DHCP01 DHCP Server for the Lab Windows Server 2016

Management01 Management01 Windows Server 2016

AZHVHost DS8 Virtual Machine in Azure Windows Server 2016


running Nested Virtualization
and Hyper-V. This will be the
host that we run the lab on.
This could also be a Laptop or
physical server in your
environment.

20
Chapter 1 Pre-Requisites

Building the Lab with BigDemo_VMM.PS1


For the purpose of this book we wanted to help you build a lab that you could easily follow along
with. If you have read some of our other books you would have seen a script that we use called
BigDemo. Basically, BigDemo is a PowerShell script that builds a lab environment including: AD,
DHCP, Management Servers, Clients, Application Servers, and others. It is highly customizable
and we have created a very special edition just for this book. Follow the instructions below to
download the script from our Github Repository and start building your very own lab to follow
along with.

Instructions Screenshot (if applicable)

1. Logon to the AZHVHost


machine in Azure as
Administrator

2. Open an administrative
Invoke-WebRequest -Uri "
PowerShell prompt and https://raw.githubusercontent.com/dkawula/Deploying-
System-Center-Virtual-Machine-Manager-
type: 2016/master/BigDemo_VMM.ps1" -OutFile "C:\Post-
Install\BigDemo_VMM.ps1"

3. Next Download a copy of https://www.microsoft.com/en-us/evalcenter/evaluate-


windows-server-2016/
Windows Server 2016
RTM from the Microsoft
Eval Center. For our lab
we have a drive on our
Hyper-V Host F:\

21
Chapter 1 Pre-Requisites

Save the ISO to


F:\DCBuild_VMM

4. Copy BigDemo_VMM.PS1
from C:\Post-Install to
F:\BigDemo_VMM

5. Open
BigDemo_VMM.PS1 with
the PowerShell ISE edit
lines 425 and 434 putting
in Your Product key
received with the EVAL
Version of Windows
Server 2016 Downloaded
above

6. Edit line 422 $ServerISO


with the actual path and
name of your Server ISO
Downloaded which should
have been downloaded to
something like
F:\DCBuild_VMM

Save BigDemo_VMM.PS1

22
Chapter 1 Pre-Requisites

7. Open an administrative
PowerShell prompt. Run
BigDemo_VMM.PS1

For this book we have


used the following
parameters:

WorkingDir:
f:\dcbuild_VMM

Organization: MVPDays
Rockstarts

Owner: Dave Kawula

TimeZone: Mountain
Standard Time

AdminPassword:
P@ssw0rd

DomainName:
MVPDays.com

DomainAdminPassword:
P@ssw0rd

VirtualSwitchName:
MVPDays_VMM_VSwitch

Subnet: 172.16.100.
ExtraLabFiles: C:\

23
Chapter 1 Pre-Requisites

8. It will take
approximately 1 hour
to build the Lab
Environment

24
Chapter 1 Pre-Requisites

25
Chapter 1 Pre-Requisites

Enable Routing in the Lab


This step-by-step lab guide requires access to the Internet for configurations. To enable access
to the internet from the Nested Hyper-V Host running in Azure run the following. This will
create a Gateway IP Address of 192.168.0.1 which will be used by the Router VM to get out to
the Internet. After the NAT Switch is created you will modify the DHCP Scope in the Lab to point
to the IP Address of the Router and then configure Windows Routing and Remote Access on the
Router VM.

Instructions Screenshot (if applicable)

1. Logon to the AZHVHost


machine in Azure as
Administrator

2. Open an administrative New-VMSwitch -SwitchName "InternalNATSwitch" -


SwitchType Internal
PowerShell prompt Get-NetAdapter
New-NetIPAddress 192.168.0.1 -PrefixLength 24 -
InterfaceIndex 23
New-NetNat -Name "InternalNat" -
InternalIPInterfaceAddressPrefix 192.168.0.0/24

3. Open the Hyper-V


Management Console,
Right-Click on
Router01, and click
Settings

26
Chapter 1 Pre-Requisites

4. Click on Add Hardware,


Network Adapter, click
Add

5. Click the newly added


Network Adapter, Click
on Virtual Switch, and
Select Internal Nat
Swtich¸and click OK

6. Logon to Router01 with


using Administrator
and a password of
P@ssw0rd

27
Chapter 1 Pre-Requisites

7. Open an administrative Add-WindowsFeature -Name RemoteAccess,Routing,RSAT-


RemoteAccess-Mgmt -verbose
PowerShell prompt and
run the command

This will install the


Routing and Remote
Access Feature

8. Right-Click Start, click


Run, type ncpa.cpl

Rename the Adapters:


Ethernet to Corpnet
Ethernet 2 to Internet

9. Configure the following CorpNet:


IP Address settings: IP = 172.16.100.254
Subnet = 255.255.255.0
Gateway = Blank
DNS = 172.16.100.1

Internet: 192.168.0.254
Subnet = 255.255.255.0
Gateway = 192.168.0.1

28
Chapter 1 Pre-Requisites

10. Open an Administrative


Command Prompt, try
to ping 4.2.2.2

Ensure that the


Router01 VM can ping
the internet address by
IP prior to continuing.

This validates that the


NAT Switch is working
properly.

11. Open the Routing and


Remote Access
Management Console

12. Right-Click on Router01


and click, Configure
and Enable Routing
and Remote Access

29
Chapter 1 Pre-Requisites

13. On the Routing and


Remote Access Server
Setup Wizard page
select Custom
Configuration and click
Next

14. On the Custom


Configuration Page
Select NAT and click
Next

30
Chapter 1 Pre-Requisites

15. On the Completing the


Routing and Remote
Access Server Setup
Wizard page click Finish

16. When prompted click


Start Service

31
Chapter 1 Pre-Requisites

17. In the Routing and


Remote Access
management console,
expand Router01, IPv4,
NAT. Then Right-Click
NAT and click New
Interface…

18. Select CorpNet and


click OK

32
Chapter 1 Pre-Requisites

19. On the Nat page ensure


Private interface
connected to the
private network is
selected and click OK

33
Chapter 1 Pre-Requisites

20. In the Routing and


Remote Access
management console,
expand Router01, IPv4,
NAT. Then Right-Click
NAT and click New
Interface…

21. Select Internet and


click OK

34
Chapter 1 Pre-Requisites

22. On the Nat page select


Public Interface
connected to the
Internet and select
Enable NAT on this
Interface and click OK

35
Chapter 1 Pre-Requisites

23. Logon to DHCP01 as


MVPdays\Administrat
or
24. Open the Network
Control Panel
(NCPA.CPL) and add a
default gateway on the
Ethernet adapter of
172.16.100.254

25. Open the DHCP


Management Console
(DHCPMGMT.MSC)
26. Expand DHCP01, IPv4,
Scope (172.16.100.0),
Scope Options
27. Right-Click on Scope
Options and click
Configure Options

36
Chapter 1 Pre-Requisites

28. Select 003 Router and


in IP Address type
172.16.100.254 and
click Add then click OK

37
Chapter 1 Pre-Requisites

29. Logon to DC01 as


MVPDays\Administrat
or and add a Gateway
of 172.16.100.254 to
the Ethernet Adapter

38
Chapter 1 Pre-Requisites

30. Open an Administrative


command prompt and
try pinging: 4.2.2.2 and
www.google.com

31. Restart the following


VM’s:
S2D1-S2D4
Management01
VMM01

This will ensure that


they all get updated IP
Addresses from the
DHCP01 Server

39
Chapter 1 Pre-Requisites

Software Requirements
The following table provides a summary of the Microsoft software that is used in this guide.

Software Additional Information

System Center Virtual Machine Manager 2016

SQL 2016 SP1 Volume License Media Standard Edition

40
Chapter 1 Pre-Requisites

41
Chapter 1 Pre-Requisites

Virtual Machine Manager Accounts Required for Build


The following accounts have automatically been created in Active Directory with the
BigDemo_VMM.PS1 Script. These are the only accounts required for the base installation in our
lab for this book.

Service Account / Groups Scope

svc_SQL SQL Server Agent / SQL Server Database


Engine / SQL Server Reporting Services are
running from this account

SVC_SCVMM SCVMM Service Account used for the


SCVMM Services locally installed

MVPDays-Admin Domain Admin Account that will be used for


the RunAS Account in SCVMM. You cannot
use the SCVMM Service account for this.

42
Chapter 1 Pre-Requisites

Virtual Machine Manager Service Accounts for MVPDays Domain

The Computer Accounts as they have been joined to the MVPDays Domain

43
Chapter 1 Pre-Requisites

44
Chapter 1 Pre-Requisites

45
Chapter 1 Pre-Requisites

Add a 2 VHDx drives to the VMM Server for


the SQL Install
The following steps will add an additional Virtual Hard Disk to the VMM Server that will be used
to host the installation and site server components (SQL and VMM binaries).

Instructions Screenshot (if applicable)

1. Logon to the Hyper-V


Host Server and open
Hyper-V Manager

Right-Click on VMM01
and click Settings

2. Click on SCSI Controller,


click Hard Drive and
click Add

46
Chapter 1 Pre-Requisites

3. Click New

4. In the New Virtual Hard


Disk Wizard before you
begin page click Next

5. On the Choose Disk


Type page select
Dynamically Expanding
and click Next

47
Chapter 1 Pre-Requisites

6. On the Specify Name


and Location page type:

Name: VMM01-
D.VHDX
Location:
F:\DCBuild_VMM\VMs
\

and then click Next

7. On the Configure Disk


page change the size to
400 GB

48
Chapter 1 Pre-Requisites

8. On the Summary page


click Finish
9. Click Apply

10. On the Hyper-V


Settings Page for
VMM01 click OK

49
Chapter 1 Pre-Requisites

11. Return the VMM01 and


open Diskmgmt.msc,
rick click on Disk 1 and
click Online

12. Right-Click on Disk 1


and click Initialize Disk

13. On the Initialize Disk


page click Ok

50
Chapter 1 Pre-Requisites

14. Right-Click on Disk 1’s


unallocated space and
click New Simple
Volume

15. In the Welcome to the


New Simple Volume
Wizard Page click Next

51
Chapter 1 Pre-Requisites

16. On the Specify Volume


Size page click Next

17. On the Assign Drive


Letter or Path page
click Next

52
Chapter 1 Pre-Requisites

18. On the Format


Partition page change
the Volume Label to
VMM and click Next

19. On the Completing the


New Simple Volume
Wizard page click Finish

53
Chapter 1 Pre-Requisites

20. Repeat the steps above


to add another Disk for
the SQL Installation. As
the SQL Installation will
be on the Same Server
as the VMM Server and
will require a difference
block size we will add
another disk. Create
the F: with 200 GB size
format as NTFS with a
Block Size of 64KB

21. The end result should


look like the screen
shot here.

54
Chapter 1 Pre-Requisites

Install Windows ADK 1709


Instructions Screenshot (if applicable)

1. Download the ADK 1709 from


https://go.microsoft.com/fwlink/p/?linkid=859
206

2. Open Windows Explorer and navigate to


the location of the downloaded
adksetup.exe

3. Right-click adksetup.exe and select Run as


Administrator

4. When prompted by UAC, select Yes to


proceed

5. The Assessment and Deployment Kit


installation program starts.

6. The Specify Location screen appears

7. Leave the default path D:\Program Files


(x86)\Windows Kits\10\ selected

8. Click Next

55
Chapter 1 Pre-Requisites

9. The Join the Customer Experience


Improvement Program (CEIP) screen
appears

10. Leave the radio button set to “No”

11. Click Next

12. The License Agreement screen appears

13. Click Accept

14. The Select the features you want to install


screen appears

15. Install the following components:

Deployment Tools
Windows Pre-installation Environment
(Windows PE)

16. Click Install

56
Chapter 1 Pre-Requisites

17. The Installing features screen will appear


with a progress bar showing the
installation progress

18. Depending on network connection and


disk speed, the download and installation
can take several minutes.

19. When the installation is complete, the


Welcome to the Assessment and
Deployment Kit screen will appear

20. Click Close

57
Chapter 1 Pre-Requisites

SQL Command Line Utilities

Instructions Screenshot (if applicable)

1. Download the SQL


Command Line Utilities
from from
https://www.microsoft.com
/en-
ca/download/details.aspx?i
d=36433

https://www.microsoft.com
/en-
ca/download/details.aspx?i
d=36434

2. Install msodbcsql.msi
3. Accept all defaults

4. Install
MSSqlCmdLnUtils.msi
5. Accept all defaults

58
Chapter 2 Install SQL Server 2016 SP1

Chapter 2

Install SQL Server 2016 SP1


SQL Server Service Accounts
You will create three new accounts with these properties by following the steps below:

Full Name User Logon Name Forest Password

SQL Server Agent MVPDays\SVC_SQL MVPDays.com P@ssw0rd

SQL Server Database MVPDays\SVC_SQL MVPDays.com P@ssw0rd


Engine

SQL Server Reporting MVPDays\SVC_SQL MVPDays.com P@ssw0rd


Services

For the purpose of this book we have pre-created the SQL Service account as part of the
BigDemo_VMM1 Script.

Note: These accounts must have Log on as a Service rights on the SQL server. This can be
achieved via Group Policy or via local policy. You cannot set via local policy if a domain group
policy is already setting a list of user accounts that can log in as a service.

The policy is configured at Computer Configuration -> Policies -> Windows Settings -> Security
Settings -> Local Policies -> User Rights Assignment and the setting is Log on as a Service.

For the purpose of this book / lab we have added the SVC_SQL Service account as a local
administrator on the VMM01 Server.

59
Chapter 2 Install SQL Server 2016 SP1

Configure SQL Firewall Port Exceptions


These steps are executed even if SQL is co-located with Configuration Manager.

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Open the local firewall


configuration. Note, if
you are managing
firewall settings via
Group Policy you will
need to manage
exceptions through
GPO.

3. Add port exceptions


for 1433, 1434, 4022,
80 and 443 by
following these steps.

4. Navigate to Inbound
rules

60
Chapter 2 Install SQL Server 2016 SP1

5. In the Actions Pane,


select New Rule

6. Select a new Port rule


and click Next

7. Maintain the radio


button on TCP.

8. Add in ports 1433,


1434, 4022, 80, 443

Note: If SQL were


configured on a
remote server, add
135 as well

9. Click Next

61
Chapter 2 Install SQL Server 2016 SP1

10. Keep the setting


“Allow the
connection”

11. Click Next

12. Select this to apply in


the Domain profile
only.

13. Click Next

14. Name the rule SQL


2016 Exceptions

15. Click Finish

62
Chapter 2 Install SQL Server 2016 SP1

16. Close the Firewall


manager
17. If applying via GPO be
sure to gpupdate
/force on the server
before proceeding.

63
Chapter 2 Install SQL Server 2016 SP1

Install Default Instance of SQL 2016 SP1

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Mount SQL media to the Media available from the volume license download site
media drive of the site
server
3. Open File Explorer,
navigate to Computer
and then double-click
the Media Drive
4. When prompted by
User Account Control
(UAC), click Yes to
continue with the
installation.
5. The SQL Server
Installation Center
screen launches

6. In the left-hand pane,


select Installation

64
Chapter 2 Install SQL Server 2016 SP1

7. The right-hand pane


options change when
the Installation choice is
selected.

1. Select the top-most


installation option,
“New SQL Server stand-
alone installation or
add features to an
existing installation.”
2. The Product Key screen
appears

3. The license key should


be embedded with
volume license media. If
not, retrieve the license
key from the volume
license media site.

65
Chapter 2 Install SQL Server 2016 SP1

4. Click Next

5. The License Terms


screen appears
6. Select the checkbox that
states “I accept the
license terms.”

7. Click Next

8. The Microsoft Update


screen appears.

9. Select the checkbox to


Use Microsoft Update.

10. Click Next

66
Chapter 2 Install SQL Server 2016 SP1

11. A rules validation


process runs.

12. The Install Rules screen


appears.

13. Check/remediate any


warnings that appear.

14. Click Next.

15. The Feature Selection


screen appears

16. Under Instance


Features, select
Database Engine
Services and Reporting
Services – Native

17. If the server contains a


separate volume for SQL
databases, change the
install directories from
C:\ to the alternate
drive letter F:\.

18. Click Next

67
Chapter 2 Install SQL Server 2016 SP1

19. The Instance


Configuration screen
will appear

20. The first instance we


will install is the default
SQL instance
(MSSQLSERVER). The
default instance is used
for Reporting Services.

21. Leave the radio button


for “Default instance”
selected

22. Leave the instance ID as


MSSQLSERVER

23. Click Next


24. The Server
Configuration screen
will appear. We will now
configure services to run
under the alternate user
accounts created earlier
in this document.

25. Next to SQL Server


Agent under Account
Name, enter
MVPDays\SVC_SQL,
under Password, enter
the P@ssw0rd.

26. Next to SQL Server


Database Engine under
Account Name, enter
MVPDays\SVC_SQL,
under Password, enter

68
Chapter 2 Install SQL Server 2016 SP1

the P@ssw0rd.

27. Next to SQL Server


Reporting Services
under Account Name,
enter
MVPDays\SVC_SQL,
under Password, enter
the P@ssw0rd.
28. Select Grant Perform
Volume Maintenance
Task privilege to SQL
Server Database Engine
Service
29. The Database Engine
Configuration screen
appears. Ensure
Windows
authentication mode is
selected and click on
Add Current User.
Then click Next

30. Click Next

69
Chapter 2 Install SQL Server 2016 SP1

31. The Reporting Services


Configuration screen
appears

32. Change the radio button


to “Install only” for the
Reporting Services
Native Mode

33. Click Next

34. The Ready to


Install screen appears

35. This screen


summarizes the choices
made in installing this
instance of the SQL
Server.

36. Note that a


ConfigurationFile.Ini is
saved to the C:\ drive.
This ini file can be used
to perform unattended
SQL installations that
match this
configuration. When
planning for a large
deployment of SQL
servers, you can set up a
server once using the
menu system and then
use the
ConfigurationFile.ini for
unattended installations

70
Chapter 2 Install SQL Server 2016 SP1

for the remaining


servers.

37. Click Install


38. The installation begins.
The progress is
displayed on the
Installation Progress
screen

39. Once complete, the


Complete screen will
appear.

40. Click Close to exit the


installation

41. The SQL Server


Installation Center
screen will re-appear,
with the Installation
option selected in the
left-hand pane.

71
Chapter 2 Install SQL Server 2016 SP1

42. Close the SQL server


Installation Center by
clicking the Red X in the
upper right corner
43. Eject the SQL media

72
Chapter 2 Install SQL Server 2016 SP1

Download and Install SQL Server


Management Studio (SSMS)
The steps below will install the SQL Server Management Studio (SMSS) in the lab.

Instructions Screenshot (if applicable)

1. Logon to VMM01 as

2. Download SSMS from Browse to: https://docs.microsoft.com/en-


Microsoft us/sql/ssms/download-sql-server-management-studio-ssms

Download SSMS-Setup-ENU.exe to C:\Post-Install

3. Launch the SSMS-Setup-


ENU.exe installer
4. On the Welcome page
click Install

73
Chapter 2 Install SQL Server 2016 SP1

5. On the Restart required


in order to complete
setup page click Restart

74
Chapter 2 Install SQL Server 2016 SP1

Configure SQL Server Memory Limits

Instructions Screenshot (if applicable)

1. Logon to VMM01
as
MVPDays\Administrat
or

2. Launch SQL Server


Management
Studio

3. Click Connect to
connect to the
local database

75
Chapter 2 Install SQL Server 2016 SP1

4. Within the
Management
Studio, right-click
the Server and
select Properties

76
Chapter 2 Install SQL Server 2016 SP1

5. Select the
Memory node

6. Reset the
maximum
memory to one
half the memory
of the site server.
In other words, if
the site server is
configured with 16
GB of RAM,
configure SQL to
only consume 8
GB maximum.

77
Chapter 2 Install SQL Server 2016 SP1

7. Save settings.

8. If available
configure VMM01
with 16 GB of
RAM

Configuration
Manager will
perform better in
the lab with 16 GB
of RAM

78
Chapter 3 Install System Center Virtual Machine Manager

Chapter 3

Install System Center Virtual


Machine Manager
Download VMM 2016 Media and Update
Rollup 4

Instructions Screenshot (if applicable)

1. Logon to VMM as
MVPDays\Administrator

2. Download System Center 2016 https://www.microsoft.com/en-


Trial Virtual Machine Manager us/evalcenter/evaluate-system-center-2016
from

79
Chapter 3 Install System Center Virtual Machine Manager

3. Save the Binary


SC2016_SCVMM.EXE to
d:\Sysytem Center 2016 Virtual
Machine Manager

4. Download Update Rollup 4 for https://support.microsoft.com/en-us/help/4041074


System Center 2016 Virtual
Machine Manager
5. Ensure that you get the Server
and Console Updates
6. Download them to D:\Post-Install

80
Chapter 3 Install System Center Virtual Machine Manager

Install System Center Virtual Machine


Manager (SCVMM) 2016

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Browse to d:\System
Center Virtual
Machine Manager
3. Run Setup.exe

4. Click on Install

81
Chapter 3 Install System Center Virtual Machine Manager

5. On the Select Features


to Install page select
VMM Management
Server and VMM
Console, and then click
Next

6. On the Product
Registration
Information fill in your
details. Thanks for the
Easter Egg in the Script
@MrThomasRayner

82
Chapter 3 Install System Center Virtual Machine Manager

7. On the Please read this


license Agreement
page select I have
read, understood, and
agree with the terms
of the license
agreement and click
Next

8. On the Diagnostic and


Usage Data page click
Next

83
Chapter 3 Install System Center Virtual Machine Manager

9. On the Installation
Location page change
the path to
D:\Program
Files\Microsoft System
Center 2016\Virtual
Machine Manager

10. On the Please review


the prerequisite
warnings page check
for errors and correct.
Do not move past this
point until all the
prerequisites have
been cleaned up.
Once done click next

84
Chapter 3 Install System Center Virtual Machine Manager

11. On the Database


Configuration page,
you can leave all the
defaults because we
are installing the VMM
Database locally.
When ready click Next

12. On the Configure


Service account and
distributed key
management page,
type
MVPDays\SVC_VMM
with a password of
P@ssw0rd

85
Chapter 3 Install System Center Virtual Machine Manager

13. On the Port


Configuration page
click Next

14. On the Library


configuration page
change the path of the
VMM Library share to
D:\MSSCVMMLibrary

86
Chapter 3 Install System Center Virtual Machine Manager

15. On the Installation


summary page click
Install

16. On the Setup


Completed
Successfully page click
Close

87
Chapter 3 Install System Center Virtual Machine Manager

Install update Rollup 4 for System Center


Virtual Machine Manager (SCVMM) 2016

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Browse to D:\Post-Install\Update
Rollup 4 for Microsoft System Center
2016 – Virtual Machine Manager
Server (KB4041074) and double click
on the cabinet file.

3. Double click on
kb4041074_vmmserver_amd64.msp

88
Chapter 3 Install System Center Virtual Machine Manager

4. On the Select a Destination page type


d:\VMMRU4-Server and click Extract

5. run
d:\kb4041074_vmmserver_amd64.ms
p

6. Repeat the steps above for the Console


RU4 Patch

89
Chapter 4 Base Configuration of VMM

Chapter 4

Base Configuration of VMM


Create a Run As Account

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administr
ator

2. Launch the Virtual


Machine Manager
Console

90
Chapter 4 Base Configuration of VMM

3. Click on the Settings


node, Right-click on
Run As
Accounts¸click Create
Run As Account

4. On the Provide the


details for this Run
As account page
type:

Name: MVPDays-
Admin
User Name:
MVPDays\MVPDays-
Admin

Password: P@ss0wrd

91
Chapter 4 Base Configuration of VMM

Configure Network Settings

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administr
ator

2. Click on the Settings


node, Double-click on
Network Settings,
uncheck Create
Logical Networks
Automatically and
click Finish

92
Chapter 4 Base Configuration of VMM

3. On the Provide the


details for this Run
As account page
type:

Name: MVPDays-
Admin
User Name:
MVPDays\MVPDays-
Admin

Password: P@ss0wrd

93
Chapter 4 Base Configuration of VMM

Create a New Host Group

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Click on the Fabric node,


right click All Hosts and
click Create Host Group

3. Type MVPDays HQ

94
Chapter 4 Base Configuration of VMM

95
Chapter 4 Base Configuration of VMM

Add Hyper-V Hosts

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. Click on the Fabric


node, right click All
Hosts and click Add
Hyper-V Hosts and
Clusters

96
Chapter 4 Base Configuration of VMM

3. On the Resource
Location page ensure
Windows Server
Computers in a
Trusted Active
Directory Domain is
selected and click
Next

4. On the Specify the


credentials to use for
discovery page select
use and existing Run
As Account and hit
Browse

97
Chapter 4 Base Configuration of VMM

5. On the Select a Run


As Account Page
Select MVPDays-
Admin and click OK
6. Then click Next

98
Chapter 4 Base Configuration of VMM

7. On the Specify the


search scope for
virtual machine host
candidates page type
S2D1,S2D2,S2D3,S2D
4 in the Computer
Names Field and click
Next

8. On the Target
Resources page select
all of the Hyper-V
Servers and click Next

99
Chapter 4 Base Configuration of VMM

9. On the Host Settings


page click Next

10. On the Summary page


click Finish

100
Chapter 4 Base Configuration of VMM

11. On the Jobs window


that popped up
validate that each
host was added
successfully.

12. Validate that each of


the hosts show up
and that they are
reporting back. As
you can see in this
screen shot only one
of the four Hyper-V
Hosts has reported
back. It may take a
few minutes for the
Hosts to fully register.

101
Chapter 5 Configuring Host Networking for S2D with VMM

Chapter 5

Configuring Host Networking


for S2D with VMM
Sample – Network Configuration from
Mellanox
For the purpose of this lab we will be basing our configuration on the Mellanox Storage Spaces
Direct Networking Build Guide and their associated Switch Configuration. All of the existing
VLans that we will configure below will match the configuration in this guide.

https://community.mellanox.com/docs/DOC-2778

We will be emulating this design in our lab by Virtualizing the components on our Nested Hyper-
V environment in Azure.

102
Chapter 5 Configuring Host Networking for S2D with VMM

103
Chapter 5 Configuring Host Networking for S2D with VMM

Logical Network Configuration


The table below shows the configuration of networks with the VLAN ID
Network Subnet Mask VLAN ID Gateway DNS server
Name

MGMT 172.16.1.0 24 616 172.16.100.254 172.16.100.1


Cluster 172.17.1.0 24 617 No
LiveMigration 172.18.1.0 24 618 No
Storage 172.19.1.0 24 619 No

Servers and Network Configuration


The table below shows the server names and their network configuration.

Server type Server name IP and NICS


Deploy network MGMT network
DC (AD DS, DNS) DC01 Not part of this network IP:1 72.16.100.1/24
GW: 172.16.100.254
DNS: 172.16.100.1
SCVMM VMM01 Not part of this network IP:172.16.100.11/24
GW:172.16.100.254
DNS: 172.16.100.254
Compute, Storage S2D1 By DHCP from DC From Pool via SCVMM
Compute, Storage S2D2 By DHCP from DC From Pool via SCVMM
Compute, Storage S2D3 By DHCP from DC From Pool via SCVMM
Compute, Storage S2D4 By DHCP from DC From Pool via SCVMM

DHCP Service Configuration


DHCP01 will provide the DHCP service for the MGMT Networks and has been configured
according to:

IP: 172.16.100.100-150/24

GW: 172.16.100.254

DNS: 172.16.100.1

104
Chapter 5 Configuring Host Networking for S2D with VMM

Sample Top of Rack Switch Configuration:


## Hostname: swx-wrd-01

##

##

## Running-config temporary prefix mode setting

##

no cli default prefix-modes enable

##

## MLAG protocol

##

protocol mlag

##

## Interface Ethernet configuration

##

interface port-channel 1

interface ethernet 1/1 speed 40000 force

interface ethernet 1/1-1/30 mtu 9216 force

interface ethernet 1/2 switchport mode hybrid

interface ethernet 1/3 switchport mode hybrid

interface ethernet 1/4 switchport mode hybrid

interface ethernet 1/5 switchport mode hybrid

interface ethernet 1/6 switchport mode hybrid

interface ethernet 1/7 switchport mode hybrid

interface ethernet 1/8 switchport mode hybrid

interface ethernet 1/9 switchport mode hybrid

105
Chapter 5 Configuring Host Networking for S2D with VMM

interface ethernet 1/10 switchport mode hybrid

interface ethernet 1/11 switchport mode hybrid

interface ethernet 1/12 switchport mode hybrid

interface ethernet 1/13 switchport mode hybrid

interface ethernet 1/14 switchport mode hybrid

interface ethernet 1/15 switchport mode hybrid

interface ethernet 1/16 switchport mode hybrid

interface ethernet 1/17 switchport mode hybrid

interface ethernet 1/18 switchport mode hybrid

interface ethernet 1/19 switchport mode hybrid

interface ethernet 1/20 switchport mode hybrid

interface ethernet 1/21 switchport mode hybrid

interface ethernet 1/22 switchport mode hybrid

interface ethernet 1/23 switchport mode hybrid

interface ethernet 1/24 switchport mode hybrid

interface ethernet 1/25 switchport mode hybrid

interface ethernet 1/26 switchport mode hybrid

interface ethernet 1/27 switchport mode hybrid

interface ethernet 1/28 switchport mode hybrid

interface ethernet 1/29 switchport mode hybrid

interface ethernet 1/30 switchport mode hybrid

interface ethernet 1/31-1/32 channel-group 1 mode active

##

## LAG configuration

##

lacp

106
Chapter 5 Configuring Host Networking for S2D with VMM

##

## VLAN configuration

##

vlan 616-621

vlan 666

vlan 999

vlan 616 name "MGMT"

vlan 617 name "Cluster"

vlan 618 name "LiveMigration"

vlan 619 name "Storage"

vlan 621 name "Deploy"

interface ethernet 1/2 switchport access vlan 621

interface ethernet 1/2 switchport hybrid allowed-vlan all

interface ethernet 1/3 switchport access vlan 621

interface ethernet 1/3 switchport hybrid allowed-vlan all

interface ethernet 1/4 switchport access vlan 621

interface ethernet 1/4 switchport hybrid allowed-vlan all

interface ethernet 1/5 switchport access vlan 621

interface ethernet 1/5 switchport hybrid allowed-vlan all

interface ethernet 1/6 switchport access vlan 621

interface ethernet 1/6 switchport hybrid allowed-vlan all

interface ethernet 1/7 switchport access vlan 621

interface ethernet 1/7 switchport hybrid allowed-vlan all

interface ethernet 1/8 switchport access vlan 621

interface ethernet 1/8 switchport hybrid allowed-vlan all

interface ethernet 1/9 switchport access vlan 621

interface ethernet 1/9 switchport hybrid allowed-vlan all

interface ethernet 1/10 switchport access vlan 621

107
Chapter 5 Configuring Host Networking for S2D with VMM

interface ethernet 1/10 switchport hybrid allowed-vlan all

interface ethernet 1/11 switchport access vlan 621

interface ethernet 1/11 switchport hybrid allowed-vlan all

interface ethernet 1/12 switchport access vlan 621

interface ethernet 1/12 switchport hybrid allowed-vlan all

interface ethernet 1/13 switchport access vlan 621

interface ethernet 1/13 switchport hybrid allowed-vlan all

interface ethernet 1/14 switchport access vlan 621

interface ethernet 1/14 switchport hybrid allowed-vlan all

interface ethernet 1/15 switchport access vlan 621

interface ethernet 1/15 switchport hybrid allowed-vlan all

interface ethernet 1/16 switchport access vlan 616

interface ethernet 1/16 switchport hybrid allowed-vlan all

interface ethernet 1/17 switchport access vlan 621

interface ethernet 1/17 switchport hybrid allowed-vlan all

interface ethernet 1/18 switchport access vlan 621

interface ethernet 1/18 switchport hybrid allowed-vlan all

interface ethernet 1/19 switchport access vlan 621

interface ethernet 1/19 switchport hybrid allowed-vlan all

interface ethernet 1/20 switchport access vlan 621

interface ethernet 1/20 switchport hybrid allowed-vlan all

interface ethernet 1/21 switchport access vlan 621

interface ethernet 1/21 switchport hybrid allowed-vlan all

interface ethernet 1/22 switchport access vlan 621

interface ethernet 1/22 switchport hybrid allowed-vlan all

interface ethernet 1/23 switchport access vlan 621

interface ethernet 1/23 switchport hybrid allowed-vlan all

interface ethernet 1/24 switchport access vlan 621

108
Chapter 5 Configuring Host Networking for S2D with VMM

interface ethernet 1/24 switchport hybrid allowed-vlan all

interface ethernet 1/25 switchport access vlan 621

interface ethernet 1/25 switchport hybrid allowed-vlan all

interface ethernet 1/26 switchport access vlan 621

interface ethernet 1/26 switchport hybrid allowed-vlan all

interface ethernet 1/27 switchport access vlan 621

interface ethernet 1/27 switchport hybrid allowed-vlan all

interface ethernet 1/28 switchport access vlan 621

interface ethernet 1/28 switchport hybrid allowed-vlan all

interface ethernet 1/29 switchport access vlan 621

interface ethernet 1/29 switchport hybrid allowed-vlan all

interface ethernet 1/30 switchport access vlan 621

interface ethernet 1/30 switchport hybrid allowed-vlan all

##

## STP configuration

##

no spanning-tree

##

## L3 configuration

##

ip routing vrf default

interface ethernet 1/1 no switchport force

interface loopback 0

interface vlan 616

interface vlan 617

interface vlan 618

109
Chapter 5 Configuring Host Networking for S2D with VMM

interface vlan 619

interface vlan 621

interface vlan 999

interface ethernet 1/1 ip address 192.168.223.1 255.255.255.252

interface loopback 0 ip address 172.22.0.1 255.255.255.255

interface vlan 616 ip address 172.16.254.251 255.255.0.0

interface vlan 617 ip address 172.17.1.251 255.255.0.0

interface vlan 618 ip address 172.18.1.251 255.255.0.0

interface vlan 619 ip address 172.19.1.251 255.255.0.0

interface vlan 621 ip address 172.21.1.251 255.255.0.0

interface vlan 999 ip address 192.168.222.1 255.255.255.252

##

## DCBX PFC configuration

##

dcb priority-flow-control enable force

dcb priority-flow-control priority 3 enable

interface ethernet 1/1-1/32 dcb priority-flow-control mode on force

interface port-channel 1 dcb priority-flow-control mode on force

##

## LLDP configuration

##

lldp

##

## DHCP relay configuration

##

110
Chapter 5 Configuring Host Networking for S2D with VMM

ip dhcp relay address vrf default 172.16.1.251

##

## MAGP configuration

##

protocol magp

interface vlan 616 magp 16

interface vlan 617 magp 17

interface vlan 618 magp 18

interface vlan 619 magp 19

interface vlan 621 magp 21

interface vlan 616 magp 16 ip virtual-router address 172.16.254.253

interface vlan 617 magp 17 ip virtual-router address 172.17.1.253

interface vlan 618 magp 18 ip virtual-router address 172.18.1.253

interface vlan 619 magp 19 ip virtual-router address 172.19.1.253

interface vlan 621 magp 21 ip virtual-router address 172.21.1.254

interface vlan 616 magp 16 ip virtual-router mac-address


00:01:02:10:01:FF

interface vlan 617 magp 17 ip virtual-router mac-address


00:01:02:11:01:FF

interface vlan 618 magp 18 ip virtual-router mac-address


00:01:02:12:01:FF

interface vlan 619 magp 19 ip virtual-router mac-address


00:01:02:13:01:FF

interface vlan 621 magp 21 ip virtual-router mac-address


00:01:02:15:01:FF

##

## MLAG configurations

111
Chapter 5 Configuring Host Networking for S2D with VMM

##

mlag-vip neo-mlag-vip-999 ip 10.7.214.201 /24 force

no mlag shutdown

mlag system-mac 00:11:22:33:44:99

interface port-channel 1 ipl 1

interface vlan 999 ipl 1 peer-address 192.168.222.2

##

## AAA remote server configuration

##

# ldap bind-password ********

# radius-server key ********

# tacacs-server key ********

##

## SNMP configuration

##

no snmp-server host 10.7.215.46 disable

snmp-server host 10.7.215.46 traps version 2c public

##

## Network management configuration

##

# web proxy auth basic password ********

clock timezone Asia Middle_East Jerusalem

no ntp server 192.114.62.250 disable

ntp server 192.114.62.250 keyID 0

112
Chapter 5 Configuring Host Networking for S2D with VMM

no ntp server 192.114.62.250 trusted-enable

ntp server 192.114.62.250 version 4

##

## X.509 certificates configuration

##

# Certificate name system-self-signed, ID


b3fbbb1d475e067acc23eb57a54a1ee34b5c1171

# (public-cert config omitted since private-key config is hidden)

##

## Persistent prefix mode setting

##

cli default prefix-modes enable

113
Chapter 5 Configuring Host Networking for S2D with VMM

System Deployment
Install and Configure Data Center Bridging – Optional
The Steps below will configure the core roles for Storage Spaces Direct Nodes including the
settings for Data Center Bridging in the lab. Failover Clustering and Hyper-V have been
predeployed as part of the BigDemo_VMM.PS1 Script. If you are following this lab guide in Azure
or nested in Hyper-V you can skip this step because RDMA is not supported in this configuration.
We will however document it so you can see how to deploy it. If you want refer to the book
Master Storage Spaces Direct for more details on how to Setup RDMA and RoCE properly.

It is a best practice to not configure RDMA if your adapters and environment don’t support it.

Instructions Screenshot (if applicable)


1. Logon to VMM01 as
MVPDays\Administrator

2. Open an Administrative $nodes = ("S2D1", "S2D2", "S2D3", "S2D4")


PowerShell Prompt and Invoke-Command $nodes {Install-
run WindowsFeature Data-Center-Bridging}

3. Run the following lines Invoke-Command $nodes {Get-NetAdapter | ?


InterfaceDescription -Match "Mellanox*" |
next Sort-Object number |% {$_ | Set-
NetAdapterAdvancedProperty -RegistryKeyword
"*JumboPacket" -RegistryValue 9000}}

Invoke-Command $nodes {New-NetQosPolicy


“SMB” –NetDirectPortMatchCondition 445 –
PriorityValue8021Action 3}

Invoke-Command $nodes {Enable-


NetQosFlowControl –Priority 3}

Invoke-Command $nodes {Disable-


NetQosFlowControl –Priority 0,1,2,4,5,6,7}

114
Chapter 5 Configuring Host Networking for S2D with VMM

Invoke-Command $nodes {Get-NetAdapter | ?


InterfaceDescription -Match "Mellanox" |
Enable-NetAdapterQos}

Invoke-Command $nodes {New-


NetQosTrafficClass "SMB" -Priority 3 -
BandwidthPercentage 50 -Algorithm ETS}

Creating Logical Networks (MGMT, Cluster,


LiveMigration, and Storage)
Review the S2D Node Networking configuration
The current configuration of the S2D Nodes has been modified by the BigDemo_VMM.PS1 Script.
4 additional Network Adapters have been added to each node and they have been renamed as
per the following screenshot:

The LOM network Adapters will be used for the MGMT SET Team and the Riser network adapters
will be used for the Storage SET Team.

115
Chapter 5 Configuring Host Networking for S2D with VMM

Create MGMT Logical Network


Instructions Screenshot (if applicable)
1. Logon to VMM01 as
MVPDays\Administra
tor

2. Click on the Fabric


node, click on
Networking, and
select Logical
Networks
3. Right-click on Logical
Networks and click
Create Logical
Network

4. On the Name page


type MGMT and click
Next

116
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Settings page


ensure One
Connected Network is
selected and select
Create a VM Network
with the same name
to allow virtual
machines to access
this logical network
directly and click Next

6. On the Network Site


page click Add
7. On Host Groups that
can use this network
site select MVPDays
HQ
8. On Associated VLANs
and IP Subnets Click
Insert Row
9. On VLAN type 616
and IP Subnet
172.16.1.0/24 and
click Next

10. On the Summary


page click Finish

117
Chapter 5 Configuring Host Networking for S2D with VMM

Create MGMT IP Pool


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Networks
3. Right-click on MGMT,
and click Create IP Pool

4. On the Name page type


MGMT_IP_Pool
5. Ensure the Logical
Network is set to
MGMT and click Next

118
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Specify and


Existing Network Site
and IP Subnet click
Next

Note: Make sure that


the existing site
MGMT_0 existing. If
not, you missed
something in the
previous step

7. On the IP Address
Range page click Next

119
Chapter 5 Configuring Host Networking for S2D with VMM

8. On the Gateway page


click Next

9. On the Specify One or


More DNS Servers page
click Next

120
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Specify One or


more WINS Servers
page click Next

11. On the Confirm the


Settings page click
Finish

121
Chapter 5 Configuring Host Networking for S2D with VMM

Create Cluster Logical Network


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Networks
3. Right-click on Logical
Networks and click
Create Logical
Network

4. On the Name page


type Cluster and click
Next

122
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Settings page


ensure One Connected
Network is selected
and select Create a VM
Network with the
same name to allow
virtual machines to
access this logical
network directly and
click Next

6. On the Network Site


page click Add
7. On Host Groups that
can use this network
site select MVPDays
HQ
8. On Associated VLANs
and IP Subnets Click
Insert Row
9. On VLAN type 617 and
IP Subnet
172.17.1.0/24 and
click Next

10. On the Summary page


click Finish

123
Chapter 5 Configuring Host Networking for S2D with VMM

Create Cluster IP Pool


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrato
r

2. Click on the Fabric node,


click on Networking, and
select Logical Networks
3. Right-click on Cluster,
and click Create IP Pool

4. On the Name page type


Cluster_IP_Pool
5. Ensure the Logical
Network is set to Cluster
and click Next

124
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Specify and


Existing Network Site
and IP Subnet click Next

Note: Make sure that


the existing site
Cluster_0 exists. If not,
you missed something
in the previous step

7. On the IP Address Range


page click Next

125
Chapter 5 Configuring Host Networking for S2D with VMM

8. On the Gateway page


click Next

9. On the Specify One or


More DNS Servers page
click Next

126
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Specify One or


more WINS Servers
page click Next

11. On the Confirm the


Settings page click Finish

127
Chapter 5 Configuring Host Networking for S2D with VMM

Create Live Migration Logical Network


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Networks
3. Right-click on Logical
Networks and click
Create Logical
Network

4. On the Name page


type Live Migration
and click Next

128
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Settings page


ensure One Connected
Network is selected
and select Create a VM
Network with the
same name to allow
virtual machines to
access this logical
network directly and
click Next

6. On the Network Site


page click Add
7. On Host Groups that
can use this network
site select MVPDays
HQ
8. On Associated VLANs
and IP Subnets Click
Insert Row
9. On VLAN type 618 and
IP Subnet
172.18.1.0/24 and
click Next

10. On the Summary page


click Finish

129
Chapter 5 Configuring Host Networking for S2D with VMM

Create Live Migration IP Pool


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. Click on the Fabric


node, click on
Networking, and
select Logical
Networks
3. Right-click on Live
Migration, and click
Create IP Pool

4. On the Name page


type Cluster_IP_Pool
5. Ensure the Logical
Network is set to Live
Migration and click
Next

130
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Specify and


Existing Network Site
and IP Subnet click
Next

Note: Make sure that


the existing site Live
Migration_0 exists. If
not, you missed
something in the
previous step

7. On the IP Address
Range page click Next

131
Chapter 5 Configuring Host Networking for S2D with VMM

8. On the Gateway page


click Next

9. On the Specify One or


More DNS Servers
page click Next

132
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Specify One or


more WINS Servers
page click Next

11. On the Confirm the


Settings page click
Finish

133
Chapter 5 Configuring Host Networking for S2D with VMM

Create Storage Logical Network


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Networks
3. Right-click on Logical
Networks and click
Create Logical
Network

4. On the Name page


type Storage and click
Next

134
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Settings page


ensure One Connected
Network is selected
and select Create a VM
Network with the
same name to allow
virtual machines to
access this logical
network directly and
click Next

6. On the Network Site


page click Add
7. On Host Groups that
can use this network
site select MVPDays
HQ
8. On Associated VLANs
and IP Subnets Click
Insert Row
9. On VLAN type 619 and
IP Subnet
172.19.1.0/24 and
click Next

10. On the Summary page


click Finish

135
Chapter 5 Configuring Host Networking for S2D with VMM

Create Storage IP Pool


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. Click on the Fabric


node, click on
Networking, and
select Logical
Networks
3. Right-click on Storage,
and click Create IP
Pool

4. On the Name page


type Cluster_IP_Pool
5. Ensure the Logical
Network is set to
Storage and click Next

136
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Specify and


Existing Network Site
and IP Subnet click
Next

Note: Make sure that


the existing site
Storage_0 exists. If
not, you missed
something in the
previous step

7. On the IP Address
Range page click Next

137
Chapter 5 Configuring Host Networking for S2D with VMM

8. On the Gateway page


click Next

9. On the Specify One or


More DNS Servers
page click Next

138
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Specify One or


more WINS Servers
page click Next

11. On the Confirm the


Settings page click
Finish

139
Chapter 5 Configuring Host Networking for S2D with VMM

Create CorpNet Logical Network


Instructions Screenshot (if applicable)

11. Logon to VMM01 as


MVPDays\Administrat
or

12. Click on the Fabric


node, click on
Networking, and select
Logical Networks
13. Right-click on Logical
Networks and click
Create Logical
Network

14. On the Name page


type Storage and click
Next

140
Chapter 5 Configuring Host Networking for S2D with VMM

15. On the Settings page


ensure One Connected
Network is selected
and select Create a VM
Network with the
same name to allow
virtual machines to
access this logical
network directly and
click Next

16. On the Network Site


page click Add
17. On Host Groups that
can use this network
site select MVPDays
HQ
18. On Associated VLANs
and IP Subnets Click
Insert Row
19. On VLAN type 619 and
IP Subnet
172.19.1.0/24 and
click Next

20. On the Summary page


click Finish

141
Chapter 5 Configuring Host Networking for S2D with VMM

Create CorpNet IP Pool


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Networks
3. Right-click on CorpNet,
and click Create IP Pool

4. On the Name page


type Cluster_IP_Pool
5. Ensure the Logical
Network is set to
CorpNet and click Next

142
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Specify and


Existing Network Site
and IP Subnet click
Next

Note: Make sure that


the existing site
Storage_0 exists. If
not, you missed
something in the
previous step

7. On the IP Address
Range page change the
range to
172.16.100.150-250
click Next

8. On the Gateway page


click Insert on Default
Gateways and type
172.16.100.254 and
click Next

143
Chapter 5 Configuring Host Networking for S2D with VMM

9. On the Specify One or


More DNS Servers
page click Insert on the
DNS Server addresses
in the order of use and
type 172.16.100.1 and
click Next

10. On the Specify One or


more WINS Servers
page click Next

11. On the Confirm the


Settings page click
Finish

144
Chapter 5 Configuring Host Networking for S2D with VMM

Validate the Logical Networks


Once created you can view the logical networks and they should look like the screen shot below.

145
Chapter 5 Configuring Host Networking for S2D with VMM

Create Logical Switch for the Storage Network

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Switches
3. Right-click on Logical
Switches and click
Create Logical Switch

4. On the Getting Started


with a Logic Switch
page click Next

146
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Enter name and


description for the
logical switch page type
Storage SET Switch
6. On the Uplink Mode
select Embedded Team

7. On the Specify Logical


Switch Setting page
click Next

8. On the Choose the


Extensions you want to
use with this logical
switch page clear all
selections and click
Next

9. On the Specify the port


classifications for
virtual ports part of
this logical switch page
click add

147
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Configure the


Virtual Port page click
Browse

11. On the Select a Port


Profile Classification
page click Host
Management and click
OK

12. On the Configure the


Virtual Port Page Select
Include a Hyper-V
Virtual Network
Adapter Port Profile in
this Virtual Port and
click Browse

13. On the Select a Virtual


Network Adapter Port
Profile page select Host
Management and click
OK Twice

148
Chapter 5 Configuring Host Networking for S2D with VMM

14. Back on the Virtual Port


page click Add again

15. On the Configure the


Virtual Port page click
Browse

16. On the Select a Port


Profile Classification
page click Host Cluster
Workload and click OK

17. On the Configure the


Virtual Port Page Select
Include a Hyper-V
Virtual Network
Adapter Port Profile in
this Virtual Port and
click Browse

149
Chapter 5 Configuring Host Networking for S2D with VMM

18. On the Select a Virtual


Network Adapter Port
Profile page select
Cluster and click OK
Twice

19. Back on the Virtual Port


page click Add again

20. On the Configure the


Virtual Port page click
Browse

21. On the Select a Port


Profile Classification
page click Live
Migration workload
and click OK

22. On the Configure the


Virtual Port Page Select
Include a Hyper-V
Virtual Network
Adapter Port Profile in

150
Chapter 5 Configuring Host Networking for S2D with VMM

this Virtual Port and


click Browse

23. On the Select a Virtual


Network Adapter Port
Profile page select
Cluster and click OK
Twice

24. Back on the Virtual Port


page click Add again

25. On the Configure the


Virtual Port page click
Browse

26. On the Select a Port


Profile Classification
page click Create Port
Classification

151
Chapter 5 Configuring Host Networking for S2D with VMM

27. On Specify a name and


description for the port
classification page type
Storage and click Finish

28. On the Select a Port


Profile Classification
Page select Storage and
click OK

29. On the Configure


Virtual Port page select
Include a Hyper-V
Virtual Network
Adapter port profile in
this virtual port and
click Browse

30. On the Select a Virtual


Network Adapter port
profile page click Create

31. On the Enter name and


description for the
Virtual Network
Adapter Port Profile

152
Chapter 5 Configuring Host Networking for S2D with VMM

page type Storage and


click Next

32. On the Configure the


Virtual Port Page Select
Include a Hyper-V
Virtual Network
Adapter Port Profile in
this Virtual Port and
click Browse

33. On the Select the


Offload settings for the
virtual network
adapter port profile
select Enable Virtual
Machine Queue and
Enable IPSec Task
Offload and click Next

NOTE: In Production
we would normally
select RDMA here if we
had RDMA Adapters.
As this is a Virtual Lab
we do not so leave it
unchecked.

153
Chapter 5 Configuring Host Networking for S2D with VMM

34. On the Select the


security settings for the
virtual network
adapter port profile
page click Next

35. On the Select the


bandwidth settings for
the virtual network
adapter port profile
page type 50 in the
weight field and click
Next

154
Chapter 5 Configuring Host Networking for S2D with VMM

36. On the Confirm the


Settings page click
Finish

37. On the Select a Virtual


Network Adapter Port
Profile Page Select
Storage and click OK
Twice

155
Chapter 5 Configuring Host Networking for S2D with VMM

38. On the Specify the Port


classifications for
virtual ports part of
this logical switch page
click Next

39. On the Uplinks page


click Add and click New
Uplink Port Profile

40. In Name Type:


Storage_VSW01

Change Load Balancing


Algorithm to: Dynamic
41. Select Cluster_O, Live
Migration_0,MGMT_0,
and Storage_0 in
Network Site

156
Chapter 5 Configuring Host Networking for S2D with VMM

42. Click on New Virtual


Network Adapter

Name: Cluster
Static: Cluster_IP_Pool
Classification: Host
Cluster Workload

157
Chapter 5 Configuring Host Networking for S2D with VMM

43. Click on
Storage_VSW01 and
click New Virtual
Network Adapter
Name: Live Migration
Static: Live Migration
_IP_Pool
Classification: Live
Migration Workload

44. Click on
Storage_VSW01 and
click New Virtual
Network Adapter

Name: MGMT
Static: MGMT_IP_Pool
Classification: Host
Management

158
Chapter 5 Configuring Host Networking for S2D with VMM

45. Click on
Storage_VSW01 and
click New Virtual
Network Adapter

Name: SMB1
Static: Storage_IP_Pool
Classification: Storage

46. Click on
Storage_VSW01 and
click New Virtual
Network Adapter

Name: SMB2
Static: Storage_IP_Pool
Classification: Storage
47. Click Next

159
Chapter 5 Configuring Host Networking for S2D with VMM

48. On the Confirm the


Settings page click
Finish

160
Chapter 5 Configuring Host Networking for S2D with VMM

161
Chapter 5 Configuring Host Networking for S2D with VMM

Create Logical Switch for the CorpNet Network

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on
Networking, and select
Logical Switches
3. Right-click Logical
Switches and click
Create Logical Switch

4. On the Getting Started


with a Logic Switch
page click Next

162
Chapter 5 Configuring Host Networking for S2D with VMM

5. On the Enter name and


description for the
logical switch page type
CorpNet SET Switch
6. On the Uplink Mode
select Embedded Team

7. On the Specify Logical


Switch Setting page
click Next

8. On the Choose the


Extensions you want to
use with this logical
switch page clear all
selections and click
Next

9. On the Specify the port


classifications for
virtual ports part of this
logical switch page click
add

163
Chapter 5 Configuring Host Networking for S2D with VMM

10. On the Configure the


Virtual Port page click
Browse

11. On the Select a Port


Profile Classification
page click High
Bandwidth and click OK

12. On the Configure the


Virtual Port Page Select
Include a Hyper-V
Virtual Network
Adapter Port Profile in
this Virtual Port and
click Browse

164
Chapter 5 Configuring Host Networking for S2D with VMM

13. On the Select a Virtual


Network Adapter Port
Profile page select Host
Management and click
OK Twice

14. On the Specify the Port


classifications for
virtual ports part of this
logical switch page click
Next

15. On the Uplinks page


click Add and click New
Uplink Port Profile

16. In Name Type:


CorpNet_VSW01

Change Load Balancing


Algorithm to: Dynamic
17. Select Cluster_O, Live
Migration_0,MGMT_0,

165
Chapter 5 Configuring Host Networking for S2D with VMM

and Storage_0 in
Network Site

18. Click on New Virtual


Network Adapter

Name: CorpNet
Static:
CorpNet_IP_Pool
Classification: High
Bandwidth

166
Chapter 5 Configuring Host Networking for S2D with VMM

19. On the Confirm the


Settings Page click
Finish

20. On the Confirm the


Settings page click
Finish

167
Chapter 5 Configuring Host Networking for S2D with VMM

Deploy the Storage Logical Switch to S2D1-4

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on Servers,
and select MVPDays
HQ
3. Right-click on
S2D1.Mvpdays.com
and click Properties
4. Click on Virtual
Switches

5. Click on New Virtual


Switch, and click New
Logical Switch

168
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Physical
Adapters change to
Riser_P0 and Riser_P1

7. Verify the Virtual


Adapters that will be
created and click OK

8. On the Warning click


Yes

169
Chapter 5 Configuring Host Networking for S2D with VMM

9. Click on Jobs and view


the status of the
Deployment

10. Repeat Steps 1-9 on


S2D2-4

11. Logon to S2D1 as


MVPDays\Administrat
or

12. Verify the Networking


Configuration and new
Virtual Adapters

170
Chapter 5 Configuring Host Networking for S2D with VMM

Deploy the CorpNet Logical Switch to S2D1-4

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on Servers,
and select MVPDays
HQ
3. Right-click on
S2D1.Mvpdays.com
and click Properties
4. Click on Virtual
Switches

5. Click on New Virtual


Switch, and click New
Logical Switch

171
Chapter 5 Configuring Host Networking for S2D with VMM

6. On the Physical
Adapters change to
LOM-P0

7. On the Warning click


Yes

172
Chapter 5 Configuring Host Networking for S2D with VMM

8. Click on Jobs and view


the status of the
Deployment

9. Repeat Steps 1-8 on


S2D2-4

10. Logon to S2D1 as


MVPDays\Administrat
or

11. Verify the Networking


Configuration and new
Virtual Adapters

173
Chapter 6 Configure Failover Cluster and S2D with VMM

Chapter 6

Configure Failover Cluster


and S2D with VMM
Build the Cluster and Storage Spaces Direct (S2D)

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on Create,
and select Hyper-V
Cluster

174
Chapter 6 Configure Failover Cluster and S2D with VMM

3. On the Specify the


cluster name and host
group type S2DCluster
4. Select Enable Storage
Spaces Direct and click
next

5. On the Select the type


of resources that you
want to add click
browse and ensure
Existing Servers running
Windows Server
Operating System is
selected

175
Chapter 6 Configure Failover Cluster and S2D with VMM

6. Select the MVPDays-


Admin run As Account
and click OK and also
ensure that the Skip
Cluster Validation is
selected

We are only doing in


the lab  Always
Validate your cluster in
production to ensure
support from Microsoft.

7. On the Select the Hosts


to include in the cluster
select all nodes and
click next

8. On the Static IP Address


cannot be specified for
the cluster click next

176
Chapter 6 Configure Failover Cluster and S2D with VMM

9. On the Confirm the


Settings page click
Finish

10. You can view the status


of the Cluster build in
the Jobs Pane

177
Chapter 7 Configure Storage Integration of S2D with VMM

Chapter 7

Configure Storage Integration


of S2D with VMM
Review Storage Providers, Arrays, and Classifications

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. Click on the Fabric


node, click on Storage,
and select Providers -
Notice how there is
already a Storage
Provider. This was
pre-created by VMM
when we build the S2D
Cluster in earlier steps.

If VMM Didn’t build


the S2D Cluster you
would have to
manually add the
Storage Provider.

178
Chapter 7 Configure Storage Integration of S2D with VMM

3. Double-click on
S2DCluster and review
the settings

4. Click on the Fabric


node, click on Storage,
and select Arrays -
Notice how there is
already a Storage
Provider. This was
pre-created by VMM
when we build the S2D
Cluster in earlier steps.

179
Chapter 7 Configure Storage Integration of S2D with VMM

5. Click on the Fabric


node, click on Storage,
and Right-Click Arrays.
Select Manage Pools.

6. On the Virtual
Machine Manager
Warning click OK

180
Chapter 7 Configure Storage Integration of S2D with VMM

7. On the Managed Pools


page click S2D on
S2DCluster and click
Edit

8. On the Modify Storage


Pool page click New
on Classification

9. On the Create Storage


Classification page
type Tier 0 – SSD

10. Click on Physical Disks


and review the
settings and then click
OK and then Finish

181
Chapter 7 Configure Storage Integration of S2D with VMM

Create Cluster Shared Volumes

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the Fabric


node, click on Servers,
and right-click
S2DCluster and click
Properties

182
Chapter 7 Configure Storage Integration of S2D with VMM

3. Click on Shared
Volumes

4. On the Shared
Volumes page click
Add

5. On the Select a
Storage Pool page type
CSV01 in the Name and
select Tier 0 – SSD in
the Classification field
and then click Next

183
Chapter 7 Configure Storage Integration of S2D with VMM

6. On the Capacity page


type 200 and click Next

7. On the Confirm the


Settings page click
Finish and click OK

Although it doesn’t
look like anything was
created the job will
proceed as soon as you
click OK

8. Click on Jobs and


validate that the CSV
has been created.
9. Verify this by going to
\\s2d1\c$\clusterstora
ge

184
Chapter 7 Configure Storage Integration of S2D with VMM

10. Repeat Steps 1-9 and


Create CSV02 and
CSV03 50 GB each

185
Chapter 8 VM Templates

Chapter 8

VM Templates

Configure S2D Nodes with 8 GB RAM

Instructions Screenshot (if applicable)

1. Logon to AZHVHost
with an
Administrative
Account

2. Open Hyper-V
Manager, right-click
S2D1, and click
Shutdown.

3. Right-click S2D1 and


click Settings

186
Chapter 8 VM Templates

4. Modify the Static


Memory to 8192
and click OK

5. Repeat steps 1-4 on


S2D2-4

187
Chapter 8 VM Templates

Building a Gold VHDx

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Download the Windows https://www.microsoft.com/en-us/evalcenter/evaluate-


Server 2016 ISO Trial windows-server-2016
Media for the Lab
3. Save it to
d:\MSSCVMMLibrary\ISO
s

4. Open the VMM Console,


and click on VMs and
Services, and then click
Create Virtual Machine

188
Chapter 8 VM Templates

5. On the Select the Source


for the new virtual
machine select Create the
new Virtual Machine with
a blank virtual hard disk
and click Next

6. On the Specify Virtual


Machine Configure with
the following settings and
click Next

VM name: WS2016_Gold
Description: Windows
Server 2016 Gold VM
Generation: Generation 2

189
Chapter 8 VM Templates

7. On the Configure
Hardware for the Virtual
Machine page configure
with the following settings
and click Next.
Compatibility: Hyper-V
Memory: 2048
Disk Size: 60GB
Availability: High

Leave the rest of the


settings as default

8. On the Choose whether to


deploy or store the virtual
machine change
Destination to MVPDays
HQ

190
Chapter 8 VM Templates

9. On the Select a
Destination for the Virtual
Machine page select S2D1

10. On the Review the Virtual


Machine Settings page
click Next

11. On the Specify Which


Virtual Switches to use for
this Virtual Machine page
select CorpNet and change
the Port Classification to
High Bandwidth and click
Next

191
Chapter 8 VM Templates

12. On the Automatic actions


page click Next

13. On the Confirm the


Settings page click Create

14. Right click on


WS2016_Gold and click
Power ON

192
Chapter 8 VM Templates

15. Right-click on
WS2016_Gold and click
Connect or View and
select

16. When Prompted press any


key to boot from the
Windows Server 2016 ISO

17. At the Windows Setup


page click Next

193
Chapter 8 VM Templates

18. At the Install page click


Install Now

19. At the Select the


Operating system you
want to install page select
Windows Server
Datacenter Edition
(Desktop Experience)

194
Chapter 8 VM Templates

20. On the Applicable notices


and license terms page
click I Accept the license
terms and then click Next

21. On the Which type of


installation do you want?
Page click Custom: Install
Windows only (Advanced)

22. On the Where do you


want to install Windows?
Page click Next

195
Chapter 8 VM Templates

23. Wait for the installation to


complete before
proceeding with the next
steps. From our testing in
Azure with using the
Managed Disks it was
taking about 10 minutes
to deploy the Double
Nested (Nested) Virtual
Machine

Once at the Customize


Settings page type
P@ssw0rd for the
password

24. Logon as Administrator

Run Windows Updates


and fully Patch the Gold
Template

196
Chapter 8 VM Templates

25. After you are happy with


your Gold Template next
we will Sysprep the VM
and Shut it down.
26. Right-click Start click Run
and type
c:\windows\system32\sy
sprep
sysprep.exe

27. On the System


Preparation Tool 3.14
page change Shutdown
Options to Shutdown and
click OK

28. Copy the Gold VHDX File


to the VMM Library

d:\MSSCVMMLibrary\
Templates
\WS2016_Gold.vhdx

197
Chapter 8 VM Templates

29. Refresh the VMM Library

30. Validate that the


WS2016_Gold VHDx
shows up in the Library

31. Create a new Answer File <?xml version="1.0" encoding="utf-8"?>


<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing></servicing>
and save it in the VMM <settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup"
Library processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
You will need to update <ComputerName>*</ComputerName>
<ProductKey>****</ProductKey>
<ProductKey> with your <RegisteredOrganization>Organization</RegisteredOrganization>
<RegisteredOwner>Owner</RegisteredOwner>
key <TimeZone>TZ</TimeZone>
</component>
32. Save this file to </settings>
<settings pass="oobeSystem">
d:\MSSCVMMLibrary\ <component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
Templates\WS2016_Gold. language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xml <OOBE>
<HideEULAPage>true</HideEULAPage>
33. A copy of the source .xml
<HideLocalAccountScreen>true</HideLocalAccountScreen>
answer file can be
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
downloaded from here: <NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
https://github.com/dkawula/Deploying- </OOBE>
System-Center-Virtual-Machine-Manager- <UserAccounts>
<AdministratorPassword>
2016/blob/master/WS2016_Gold.xml <Value>password</Value>
<PlainText>True</PlainText>
</AdministratorPassword>
</UserAccounts>
</component>
<component name="Microsoft-Windows-International-Core"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>

198
Chapter 8 VM Templates

<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
</settings>
</unattend>

34. Refresh the VMM Library

35. Validate that the


WS2016_Gold XML shows
up in the Library

Real World Note: During the writing of this book a bug in SCVMM was identified where the
creation of VMM Templates would fail. The issue was resolved by fully patching the S2D nodes
and SCVMM Server with the latest Cumulative Update. Once this was completed the build of
the VMM Templates succeeded.

199
Chapter 8 VM Templates

Creating the VM Template


Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. In the Library
Workspace, click
Templates, and then
right-click on VM
Templates and select
Create VM Template

3. On the Select a source


for the new VM
template select use an
existing VM template or
Virtual Hard Disk
storage in the library
and click Browse

200
Chapter 8 VM Templates

4. On the Select a virtual


hard disk or an existing
VM Template as the
source for the new VM
Template page select
WS2016_Gold_disk_1.vh
dx click ok, and then
click Next

5. On the VM Template
Identify page type
WS2016_Gold
6. On Generation select
Generation 2 and then
click Next

201
Chapter 8 VM Templates

7. On the Configure
hardware for the virtual
machine. You can
import settings from a
hardware profile or save
a new profile based on
your settings page
change the following:

Memory = 2048
Network = CorpNet
Availability = High
8. Once done click Next

9. On the Configure
identity, network
settings, and scripts for
the new virtual
machine. You can
import settings from a
guest OS profile or save
a new profile based on
your settings page
configure the following:

Guest OS Profile =
Create new Windows
operating System
customization settings

Admin Password =
P@ssw0rd

202
Chapter 8 VM Templates

Domain / Workgroup =
MVPDays.com
MVPDays-Admin run As
Account

Answer File =
WS2016_Gold_Disk_1.x
ml

GUI Rune Once = w32tm


/resync /force

10. On the Application


Configuration select
Window Server 2016
and click Next

11. On the SQL Server


Configuration click Next

12. On the Before you


create the new VM
Template, review the
settings that you chose
click Create

203
Chapter 8 VM Templates

Deploying a VM Template

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Click on the VMs and


Services Workspace
3. Click on Create Virtual
Machine, and Create
Virtual Machine

4. On the Select the


source for the new
Virtual Machine click
Browse

204
Chapter 8 VM Templates

5. On the Select a VM
Template, Virtual Hard
Disk, or Virtual
Machine as the source
for the new Virtual
Machine select
WS2016_Gold VM
Template, click OK,
and then click Next

6. On the Specify Virtual


Machine Identity Type
Management Server
and then click Next

205
Chapter 8 VM Templates

7. On the Configure
hardware for the
virtual machine. You
can import settings
from a hardware
profile or save a new
profile based on your
settings page click
Next

8. On the Configure
identity, network
settings, and scripts
for the new virtual
machine. You can
import settings form a
guest OS profile or
save a new profile
based on your settings
page click Next

206
Chapter 8 VM Templates

9. On the Choose
whether to deploy or
store the virtual
machine page click
Next

10. On the Select a


destination for the
virtual machine page
select S2D2 and click
Next

207
Chapter 8 VM Templates

11. On the Review the


machine Settings type
MGMT-01 in the
Computer Name and
click Next

12. On the Add Properties


page click Next

13. On the Confirm the


Settings page click
Create

208
VM Templates

14. You can view the


status of the
deployment under the
Jobs Workspace

209
Chapter 9 Host Patch Management with VMM

Chapter 9

Host Patch Management with


VMM
Install the WSUS Feature on VMM01

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. In Server Manager,
click Manage, and
then click add Roles
and Features.

3. On the Before you


begin page, click
Next.

210
Chapter 9 Host Patch Management with VMM

4. In the select
installation type
page, confirm that
Role-based or
feature-based
installation option is
selected and click
Next

5. On the select
destination server
page, click Next.

6. On the select server


roles page, select
Windows Server
Update Services. Add
features that are
required for
Windows Server
Update Services
opens. Click Add
Features, and then
click Next.

211
Chapter 9 Host Patch Management with VMM

7. On the select
features page. retain
the default selections,
and then click Next.

212
Chapter 9 Host Patch Management with VMM

8. On the Windows
Server Update
Services page, click
Next.

9. On the Select Role


Services page, leave
the default selections,
and then click Next.

10. On the Content


location selection
page, type a valid
location to store the
updates. For example,
you can create a
folder named
WSUS_database at
the root of drive K
specifically for this
purpose, and type
k:\WSUS_database
as the valid location.

11. Click Next. The Web


Server Role (IIS) page

213
Chapter 9 Host Patch Management with VMM

opens. Review the


information, and then
click Next. In select
the role services to
install for Web Server
(IIS), retain the
defaults, and then
click Next.

12. On the Confirm


installation selections
page, review the
selected options, and
then click Install. The
WSUS installation
wizard runs. This
might take several
minutes to complete.

13. Once WSUS


installation is
complete, in the
summary window on
the Installation
progress page, click
Launch Post-
Installation tasks. The
text changes,
requesting: Please
wait while your
server is configured.
When the task has

214
Chapter 9 Host Patch Management with VMM

finished, the text


changes to:
Configuration
successfully
completed. Click
Close.

14. In Server Manager,


verify if a notification
appears to inform you
that a restart is
required. This can
vary according to the
installed server role. If
it requires a restart
make sure to restart
the server to
complete the
installation.

215
Chapter 9 Host Patch Management with VMM

WSUS Configuration Wizard

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. In the Server Manager


navigation pane, click
Dashboard, click
Tools, and then click
Windows Server
Update Services.

3. The Windows Server


Update Services
Wizard opens. On the
Before You Begin
page, review the
information, and then
click Next.

216
Chapter 9 Host Patch Management with VMM

4. Read the instructions


on the Join the
Microsoft Update
Improvement
Program page and
evaluate if you want to
participate. If you
want to participate in
the program. retain
the default selection,
or clear the check box,
and then click Next.

5. On the Choose
Upstream Server
page, Click Next

217
Chapter 9 Host Patch Management with VMM

6. After selecting the


proper options for
your deployment, click
Next to proceed.
7. On the Specify Proxy
Server page, select the
Use a proxy server
when synchronizing
check box, and then
type the proxy server
name and port
number (port 80 by
default) in the
corresponding boxes.

8. Click Next. On the


Connect to Upstream
Server page, click start
Connecting.
9. When it connects, click
Next to proceed.

10. On the Choose


Languages page, you
have the option to
select the languages
from which WSUS will

218
Chapter 9 Host Patch Management with VMM

receive updates - all


languages or a subset
of languages. selecting
a subset of languages
will save disk space,
but it is IMPORTANT to
choose all of the
languages that are
needed by all the
clients of this WSUS
server. if you choose
to get updates only for
specific languages,
select Download
updates only in these
languages, and then
select the languages
for which you want
updates; otherwise,
leave the default
selection.
11. After selecting the
appropriate language
options for your
deployment, click Next
to continue.

219
Chapter 9 Host Patch Management with VMM

12. The Choose Products


Make sure you select
all the Windows
Server Products Here.

For the purposes of


this Lab we will start
with only Patches for
Windows Server 2016.
These can be easily
extended in your
environment
depending on what
you will patch with
this WSUS Server
13. select the appropriate
product options for
your deployment, and
then click Next.

14. On the Choose


Classifications page,
select the update
classifications that you
want to obtain.
Choose all the
classifications or a
subset of them, and
then click Next.

For this lab we will

220
Chapter 9 Host Patch Management with VMM

add Service Packs and


Update Rollups

15. The Set Sync Schedule


page enables you to
select whether to
perform
synchronization
manually or
automatically.

For our lab we will


setup Automatic
Synchronization

16. On the Finished page,


you have the option to
start the
synchronization now
by selecting the Begin
initial synchronization
check box. if you do
not select this option,
you need to use WSUS
Management Console
to perform the initial
synchronization. Click
Next if you want to
read more about
additional settings, or
you can click Finish to
conclude this wizard

221
Chapter 9 Host Patch Management with VMM

and finish the initial


WSUS setup.

17. After you click Finish,


the WSUS
Management Console
appears.

222
Chapter 9 Host Patch Management with VMM

223
Chapter 9 Host Patch Management with VMM

Add WSUS Server to VMM

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Click on the Fabric node,


click on Infrastructure,
and Right-Click on
Update Server

3. On the Specify the


Windows Server Update
Servers (WSUS) Server
type:

Computer Name: WSUS


Port: 8530
Run As Account:
MVPDays-Admin
4. Then click Add

224
Chapter 9 Host Patch Management with VMM

Verify that WSUS has been added Successfully

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. In the Update Servers pane,


you should now see
VMM01.MVPDays.com
Responding

3. In the Library Workspace,


review Update Catalog and
Baselines

You should see the Updates in


Update Baselines and Update
Catalog

225
Chapter 9 Host Patch Management with VMM

Assign Computers to Built-In Update Baseline

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Open the Library


workspace.

3. On the Library pane,


expand Update Catalog
and Baselines, and
then click Update
Baselines.

4. On the Baselines pane,


Right-click Update
Baselines and click
Create Baseline

5. The Specify a Unique


Name and Description
for this update type
Critical Updates for
S2D Hyper-V Hosts

226
Chapter 9 Host Patch Management with VMM

6. On the Updates page,


add all of the available
updates and click Add

7. On the Add Updates to


Baseline page click Add

227
Chapter 9 Host Patch Management with VMM

8. Click on the
Assignment Scope in
the left and select
MVPDays HQ and then
click OK

9. On the Confirm the


Settings Page click
Finish

228
Chapter 9 Host Patch Management with VMM

229
Chapter 9 Host Patch Management with VMM

Scan S2D Hyper-V Hosts for Compliance

Instructions Screenshot (if applicable)

1. Logon to VMM01
as
MVPDays\Admini
strator

2. Open the Fabric


workspace.

3. In the Fabric pane,


click Servers

4. On the Home tab,


click Compliance

Notice that the


compliance status
is unknown
because no scans
have been
completed yet.

230
Chapter 9 Host Patch Management with VMM

5. Select S2DCluster
and click Scan
6. The status should
chance to
Scanning

7. During the build of


this Lab I forgot to
finish Patching my
VM’s including the
VMM Server and
was receiving
error 8024401c

I did some
research and there
is a fix in the
October 2017
Cumulative
Update. So, I

231
Chapter 9 Host Patch Management with VMM

guess not patching


the WSUS Server
broke my WSUS
Server.

8. After Patching you


can see things are
working now.

Ensure that after


applying
KB4056890 you
immediately apply
KB 4057142 to fix
issues caused by
the first KB

9. Try to Scan the


cluster again after
the hotfixes have
been applied.
10. Select S2DCluster
and click Scan
11. The status should
chance to
Scanning
12. Then as the job
runs it should
change to Non-
Compliant

232
Chapter 9 Host Patch Management with VMM

13. In this screen shot


you can see all the
hosts have
checked in.

233
Chapter 9 Host Patch Management with VMM

Remediate Hosts

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Open the Fabric


workspace.
3. In the Fabric pane, click
Servers
4. On the Home tab, in the
Show group, click
Compliance

5. Right-click on S2D(x) and


click Remediate

6. Select the Allow


remediation of cluster
nodes already in
maintenance mode
check box
7. Select Live Migration to
remove virtual machines
from a host before
performing update
remediation

234
Chapter 9 Host Patch Management with VMM

8. Click Remediate to start


update remediation of
the host cluster node

235
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

Chapter 10

Host Patching of Storage


Spaces Direct (S2D) with VMM
Patching Storage Spaces Direct nodes with
VMM

Check the Health of Your Virtual Disks before going into


Maintenance Mode

Instructions Screenshot (if applicable)

1. Logon to S2D1 as
MVPDays\Administrat
or

2. Open a PowerShell Get-VirtualDisk

Prompt as
Administrator and
type:

236
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

3. Ensure that there are


no errors with the
Virtual Disks prior to
proceeding

237
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

Scan S2D Hyper-V Hosts for Compliance

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Open the Fabric


workspace.

3. In the Fabric pane, click


Servers

4. On the Home tab, click


Compliance

5. Select S2DCluster and


click Scan
6. The status should
chance to Scanning

238
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

7. In this screen shot you


can see all the hosts
have checked in.

239
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

Put the Node into Maintenance Mode

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Open the VMM Admin


Console, click on the
Fabric Workspace,
Servers, and then
select S2DCluster,
right-click on S2D1 and
select Start
Maintenance Mode

240
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

3. In the Select the


action to perform
when starting
maintenance mode on
S2D1.mvpdays.com
page select Move all
Virtual Machines to
other hosts in the
cluster and click Finish

4. Validate that the Node


has been paused by
opening Failover
Cluster Manager

5. Logon to S2D2 and Get-VirtualDisk


Get-StorageJob
check the health of Get-StorageSubSystem clu* | Debug-StorageSubSystem
Storage Spaces Direct
by opening an
administrative
PowerShell Prompt
and typing

241
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

6. Turn on S2D1 once Get-VirtualDisk


Get-StorageJob
online re-run these Get-StorageSubSystem clu* | Debug-StorageSubSystem
commands on S2D2

Notice the Storage Job


running. Re-Run Get-
StorageJob until there
are no more jobs
queued up and Get-
VirtualDisk has
returned to a healthy
state

7. After the Storage Jobs


have completed you
can now return to the
VMM Console

242
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

Remediate Hosts

Instructions Screenshot (if applicable)

9. Logon to VMM01 as
MVPDays\Administrator

10. Open the Fabric


workspace.
11. In the Fabric pane, click
Servers
12. On the Home tab, in the
Show group, click
Compliance

13. Right-click on S2D(x) and


click Remediate

14. Select the Allow


remediation of cluster
nodes already in
maintenance mode
check box
15. Select Live Migration to
remove virtual machines
from a host before
performing update
remediation

243
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

16. Click Remediate to start


update remediation of
the host cluster node

244
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

Turn off Maintenance Mode on the Host and verify Storage


Spaces Direct Health

Instructions Screenshot (if applicable)

1. Open the VMM


Admin Console,
click on the
Fabric
Workspace,
Servers, and
then select
S2DCluster,
right-click on
S2D1 and select
Stop
Maintenance
Mode

2. You can also


validate in
Failover Cluster
Manager that
the node is no
longer paused

245
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

3. Logon to S2D2 Get-VirtualDisk


Get-StorageJob
and check the Get-StorageSubSystem clu* | Debug-StorageSubSystem
health of
Storage Spaces
Direct by
opening an
administrative
PowerShell
Prompt and
typing

4. Turn on S2D1 Get-VirtualDisk


Get-StorageJob
once online re- Get-StorageSubSystem clu* | Debug-StorageSubSystem
run these
commands on
S2D2

Notice the
Storage Job
running. Re-
Run Get-
StorageJob until
there are no
more jobs
queued up and
Get-VirtualDisk
has returned to
a healthy state

246
Chapter 10 Host Patching of Storage Spaces Direct (S2D) with VMM

5. After the
Storage Jobs
have completed
you can now
return to the
VMM Console

6. At this time
once the jobs
have completed
successfully can
you repeat the
steps and patch
(Remidiate) the
next node.

247
Chapter 11 Operational Maintenance of Storage Spaces Direct

Chapter 11

Operational Maintenance of
Storage Spaces Direct
Restarting Storage Spaces Direct nodes with
VMM
Direct from the Storage Spaces Direct community Kristopher Jon Turner has done a really nice
job documenting the process to properly restart S2D nodes. Thanks for letting me use your
notes in the book we really appreciate it.

One of the common maintenance tasks is restarting a node due to patching or some other task
that may require the node to be restarted. Normally within VMM you would just right click a
node in the cluster, select Start Maintenance Mode, then wait for the VM’s on that node to
migrate off to the other nodes in that cluster. Restart the node then wait for the node to come
up, right click and select Stop Maintenance Mode and bingo you are ready to put the next node
into Maintenance mode and restart that one. With S2D clusters, you can’t do that and
shouldn’t do that!

If you go to the Microsoft Doc’s page, Taking a Storage Spaces Direct server offline for
maintenance they do explain how to properly restart a node in the cluster as a standalone S2D
cluster. On the Microsoft’s Doc page for VMM the only thing I could find is how to put a node
into maintenance mode.

https://docs.microsoft.com/en-us/windows-server/storage/storage-spaces/maintain-servers

248
Chapter 11 Operational Maintenance of Storage Spaces Direct

Check the Health of Your Virtual Disks before going into


Maintenance Mode

Instructions Screenshot (if applicable)

1. Logon to S2D1 as
MVPDays\Administrat
or

2. Open a PowerShell Get-VirtualDisk

Prompt as
Administrator and
type:

3. Ensure that there are


no errors with the
Virtual Disks prior to
proceeding

249
Chapter 11 Operational Maintenance of Storage Spaces Direct

Put the Node into Maintenance Mode and Restart / Shutdown

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administra
tor

2. Open the VMM Admin


Console, click on the
Fabric Workspace,
Servers, and then slect
S2DCluster, right-click
on S2D1 and select
Start Maintenance
Mode

250
Chapter 11 Operational Maintenance of Storage Spaces Direct

3. In the Select the


action to perform
when starting
maintenance mode
on
S2D1.mvpdays.com
page select Move all
Virtual Machines to
other hosts in the
cluster and click Finish

4. Validate that the Node


has been paused by
opening Failover
Cluster Manager

5. Now turn off S2D1


simulating
maintenance of a
hardware component.

6. Logon to S2D2 and Get-VirtualDisk


Get-StorageJob
check the health of Get-StorageSubSystem clu* | Debug-StorageSubSystem
Storage Spaces Direct
by opening an
administrative

251
Chapter 11 Operational Maintenance of Storage Spaces Direct

PowerShell Prompt
and typing

7. Turn on S2D1 once Get-VirtualDisk


Get-StorageJob
online re-run these Get-StorageSubSystem clu* | Debug-StorageSubSystem
commands on S2D2

Notice the Storage


Job running. Re-Run
Get-StorageJob until
there are no more
jobs queued up and
Get-VirtualDisk has
returned to a healthy
state

8. After the Storage Jobs


have completed you
can now return to the
VMM Console

252
Chapter 11 Operational Maintenance of Storage Spaces Direct

9. Open the VMM Admin


Console, click on the
Fabric Workspace,
Servers, and then slect
S2DCluster, right-click
on S2D1 and select
Stop Maintenance
Mode

10. You can also validate


in Failover Cluster
Manager that the
node is no longer
paused

11. At this time, you can


proceed with
Maintenance tasks on
the next node

253
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Chapter 12

Bonus Community Content -


Storage Spaces Direct (S2D)
Scripts
Using PowerShell to Document Storage
Spaces Direct

Using the Community PowerShell S2D-Audit.PS1


Fellow MVP Romain Serre did some amazing work on this script that automatically documents
the build of Storage Spaces Direct and Hyper-V. So, I thought it would be fun to do this as part
of this MVPDays Publishing lab that we build with BigDemo.

https://github.com/SerreRom/TechCoffee/blob/master/PowerShell/Audit-S2D/Audit-S2D.ps1

Instructions Screenshot (if applicable)

1. Logon to
VMM01 as
MVPDays\Admi
nistrator

254
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

2. Download S2D- Invoke-WebRequest -uri


https://raw.githubusercontent.com/SerreRom/TechCoffee/mas
Audit.PS1 ter/PowerShell/Audit-S2D/Audit-S2D.ps1 -OutFile d:\Post-
Install\s2d-audit.ps1

3. Open an
Administrative
PowerShell
Prompt and run
the S2D-Audit-
S2D.PS1 script

When prompter
type:

Cluster =
s2dcluster

Domain Name =
MVPDays.com

Path = .\

4. When prompted
for credentials
type

MVPDays\Admi
nistrator

255
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Below is the really nice output from this script:

256
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

At the time of writing this book I was playing around with my network settings in the lab. And
look the script picked up my issues.

257
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

258
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

259
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Using PowerShell to setup Email Alerting for


Storage Spaces Direct

Using the Community PowerShell Monitor-S2D.PS1


Fellow MVP Charbel Nemnon has created a really nice post about configuring email alerting for
Storage Spaces Direct: https://charbelnemnom.com/2017/12/monitor-storage-spaces-direct-
health-with-powershell-s2d-ws2016-powershell/

This script works on disaggregated and Hyper-Converged S2D infrastructure. This script is written
to check the Health Service in Storage Spaces Direct Cluster across nodes. When the script
detects any issue in your S2D cluster, you will receive an HTML e-mail alert. (see example in this
repository).

To run Monitor-S2D.ps1 script once, update the following parameters:

$FromEmail = "fromemail@domain.com"

$ToEmail1 = "email1@domain.com"

$ToEmail2 = "email2@domain.com"

$smtpServer = "smtp.office365.com"

$smtpCreds = new-object Net.NetworkCredential("Username", "Password")

Then run the script as follows:

$Credential = Get-Credential

.\Monitor-S2D.ps1 -ClusterName "S2DCluster" -Credential $Credential

To run the script as recurring task, update the Cluster Name paramter in Monitor-S2D.ps1 script:

260
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

$ClusterName = "S2D-ClusterName"

Finally, save Monitor-S2D.ps1 script in a desired path, and then run the script named "Create-
S2DRecurringTask.ps1" in this repository to create a recurring S2D PowerShell task.

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrat
or

2. Download the Scripts Invoke-WebRequest -Uri


https://raw.githubusercontent.com/CharbelNemnom/Pow
for this solution er-MVP-Elite/master/Monitor-S2D/Create-
S2DRecurringTask.ps1 -OutFile d:\Post-
install\Create-S2DRecurringTask.ps1

Invoke-WebRequest -Uri
https://raw.githubusercontent.com/CharbelNemnom/Pow
er-MVP-Elite/master/Monitor-S2D/Monitor-S2D.ps1 -
OutFile d:\Post-install\Monitor-S2D.PS1

3. Simply fill in the https://github.com/dkawula/Deploying-System-Center-


Virtual-Machine-Manager-2016/blob/master/Monitor-
Parameters with your S2D-DK.ps1
mail server to and from
addresses. We have
done some minor
tweaks to the script
which can be found
here. Like cleaning up
the table formatting a
bit

261
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Here is a sample of the automated email that can be used as part of this solution:

262
Chapter 12 Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Monitor S2D with Storage Spaces Direct


Monitor GUI

Using the Community PowerShell Monitor-S2D.PS1


Fellow S2D fan Marcel Kuppers has built a cool little tool that moitors S2D with a nice little GUI.
Not to be confused with the previous script from Charbel this one is different it has a nice little
PowerShell GUI to check the health of S2D.

https://gallery.technet.microsoft.com/Storage-Spaces-Direct-6cafe551#content

This S2D-Monitor (v0.8.2) based on the Windows Server 2016 Health Service for daily
monitoring.

The Health Service provides the following real-time metrics:

263
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

IOPS (Read, Write, Total)

IO Troughput (Read, Write, Total)

IO Latency (Read, Write, Average)

Physical Capacity (Total, Remaining)

Pool Capacity (Total, Remaining)

Volume Capacity (Total, Remaining)

CPU Utilization % (All Machines Average)

Memory All Machines (Total, Available)

In addition, the service delivers the Faults and Actions of the cluster.

Instructions Screenshot (if applicable)

1. Logon to VMM01 as
MVPDays\Administrator

2. Download the Scripts for https://gallery.technet.microsoft.com/Storage-Spaces-


this solution and save to Direct-6cafe551#content
D:\Post-Install

264
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

3. Execute Monitor-
S2D.PS1 and click Collect
notice the nice output
here. Marcel has done
a great job with this little
tool I highly encourage
you to download it and
check it out.

265
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Monitor S2D with Storage Spaces StarWind


Manager (Preview)

Using StarWind Manager (Preview)


The IT industry is developing on a large scale and picking up steam all the time. The trend
towards Software-Defined Storage (SDS) solutions and hyperconvergence is catching on, offering
companies the ability to build out HA storage infrastructures from cheap commodity hardware
and storage software. So far, Microsoft Storage Spaces Direct (S2D), VMware vSAN, and Ceph are
considered among the most widespread solutions taking the industry of the Software-Defined
Storage by storm.

https://www.starwindsoftware.com/starwind-manager

Step-by-Step install guidance can be found here:


https://www.starwindsoftware.com/resource-library/starwind-manager-installation-and-
configuration-guidance

266
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Instructions Screenshot (if applicable)

1. Logon to VMM01
as
MVPDays\Admini
strator

2. Download the https://www.starwindsoftware.com/starwind-manager


Scripts for this
solution and save
to D:\Post-Install

3. Run the StarWind


Manager.MSI

267
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

4. On the Welcome
to the StarWind
Manager Setup
Wizard page click
Next

5. On the End-User
License
Agreement page
select I Accept the
terms in the
license Agreement
and click Next

268
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

6. On the Custom
Setup page only
install the
Starwind Manager
Core and click
Next

7. On the Ready to
install Starwind
Manager page
click Install

8. Logon to S2D1 as
MVPDays\Admini
strator

269
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

9. Run the StarWind


Manager.MSI

10. On the Welcome


to the StarWind
Manager Setup
Wizard page click
Next

270
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

11. On the End-User


License
Agreement page
select I Accept the
terms in the
license Agreement
and click Next

12. On the Custom


Setup page only
install the
Starwind Manager
Agent and click
Next

271
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

13. On the Ready to


install Starwind
Manager page
click Install

14. Repeat Steps 9-13


on S2D2-4

15. On VMM01
browse to
http://127.0.0.1:8
100/client/

272
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

16. Logon with root


and starwind
17. Click on Add new
Node

18. Add Each of the


S2D nodes

19. Note: I have


experience issues
with using the
StarWind Manager
app in IE and Edge
so download and
use Chrome for
these tasks if the
UI is not
responding.

Once the nodes


are added they
should

273
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

immediately show
up in the UI

20. Review the


Performance Tab

21. Review the


Storage Spaces
Direct Tab

274
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

Well folks that is going to about wrap up our time together in this book. We at MVPDays
publishing hope that you had a great time reading it and as always, we welcome your feedback.

Dave and the rest of the MVPDays Publishing Authors

275
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

276
Bonus Community Content - Storage Spaces Direct (S2D) Scripts

277
Appendix BigDemo_VMM.PS1

Appendix

BigDemo_VMM.PS1
Here is a copy of the BigDemo_VMM.PS1 script that we used in the book. It can be downloaded
from: https://github.com/dkawula/Deploying-System-Center-Virtual-Machine-Manager-
2016/blob/master/BigDemo_VMM.ps1

<#
Created: 2017-01-02
Version: 1.0
Author Dave Kawula MVP and Thomas Rayner MVP
Homepage: http://www.checkyourlogs.net

Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the authors or DeploymentArtist.

Author - Dave Kawula


Twitter: @DaveKawula
Blog : http://www.checkyourlogs.net

Author - Thomas Rayner


Twitter: @MrThomasRayner
Blog : http://workingsysadmin.com

.Synopsis
Creates a big demo lab.
.DESCRIPTION
Huge Thank you to Ben Armstrong @VirtualPCGuy for giving me the source
starter code for this :)
This script will build a sample lab configruation on a single Hyper-V
Server:

It includes in this version 2 Domain Controllers, 1 x DHCP Server, 1 x MGMT


Server, 16 x S2D Nodes

It is fully customizable as it has been created with base functions.

The Parameters at the beginning of the script will setup the domain name,
organization name etc.

278
Appendix BigDemo_VMM.PS1

You will need to change the <ProductKey> Variable as it has been removed for
the purposes of the print in this book.

.EXAMPLE
TODO: Dave, add something more meaningful in here
.PARAMETER WorkingDir
Transactional directory for files to be staged and written
.PARAMETER Organization
Org that the VMs will belong to
.PARAMETER Owner
Name to fill in for the OSs Owner field
.PARAMETER TimeZone
Timezone used by the VMs
.PARAMETER AdminPassword
Administrative password for the VMs
.PARAMETER DomainName
AD Domain to setup/join VMs to
.PARAMETER DomainAdminPassword
Domain recovery/admin password
.PARAMETER VirtualSwitchName
Name of the vSwitch for Hyper-V
.PARAMETER Subnet
The /24 Subnet to use for Hyper-V networking
#>

#region Parameters
[cmdletbinding()]
param
(
[Parameter(Mandatory)]
[ValidateScript({ $_ -match '[^\\]$' })] #ensure WorkingDir does not end in
a backslash, otherwise issues are going to come up below
[string]
$WorkingDir = 'c:\ClusterStoreage\Volume1\DCBuild',

[Parameter(Mandatory)]
[string]
$Organization = 'MVP Rockstars',

[Parameter(Mandatory)]
[string]
$Owner = 'Dave Kawula',

[Parameter(Mandatory)]
[ValidateScript({ $_ -in ([System.TimeZoneInfo]::GetSystemTimeZones()).ID
})] #ensure a valid TimeZone was passed
[string]
$Timezone = 'Pacific Standard Time',

[Parameter(Mandatory)]
[string]
$adminPassword = 'P@ssw0rd',

[Parameter(Mandatory)]
[string]
$domainName = 'MVPDays.Com',

[Parameter(Mandatory)]
[string]
279
Appendix BigDemo_VMM.PS1

$domainAdminPassword = 'P@ssw0rd',

[Parameter(Mandatory)]
[string]
$virtualSwitchName = 'Dave MVP Demo',

[Parameter(Mandatory)]
[ValidatePattern('(\d{1,3}\.){3}')] #ensure that Subnet is formatted like
the first three octets of an IPv4 address
[string]
$Subnet = '172.16.200.',

[Parameter(Mandatory)]
[string]
$ExtraLabfilesSource = 'C:\ClusterStorage\Volume1\DCBuild\Extralabfiles'

)
#endregion

#region Functions

function Wait-PSDirect
{
param
(
[string]
$VMName,

[Object]
$cred
)

Write-Log $VMName "Waiting for PowerShell Direct (using $($cred.username))"


while ((Invoke-Command -VMName $VMName -Credential $cred {
'Test'
} -ea SilentlyContinue) -ne 'Test')
{
Start-Sleep -Seconds 1
}
}

Function Wait-Sleep {
param (
[int]$sleepSeconds = 60,
[string]$title = "... Waiting for $sleepSeconds
Seconds... Be Patient",
[string]$titleColor = "Yellow"
)
Write-Host -ForegroundColor $titleColor $title
for ($sleep = 1; $sleep -le $sleepSeconds; $sleep++ ) {
Write-Progress -ParentId -1 -Id 42 -Activity "Sleeping
for $sleepSeconds seconds" -Status "Slept for $sleep Seconds:" -percentcomplete
(($sleep / $sleepSeconds) * 100)
Start-Sleep 1
}
Write-Progress -Completed -Id 42 -Activity "Done Sleeping"
280
Appendix BigDemo_VMM.PS1

function Restart-DemoVM
{
param
(
[string]
$VMName
)

Write-Log $VMName 'Rebooting'


stop-vm $VMName
start-vm $VMName
}

function Confirm-Path
{
param
(
[string] $path
)
if (!(Test-Path $path))
{
$null = mkdir $path
}
}

function Write-Log
{
param
(
[string]$systemName,
[string]$message
)

Write-Host -Object (Get-Date).ToShortTimeString() -ForegroundColor Cyan -


NoNewline
Write-Host -Object ' - [' -ForegroundColor White -NoNewline
Write-Host -Object $systemName -ForegroundColor Yellow -NoNewline
Write-Host -Object "]::$($message)" -ForegroundColor White
}

function Clear-File
{
param
(
[string] $file
)

if (Test-Path $file)
{
$null = Remove-Item $file -Recurse
}
}

function Get-UnattendChunk
{
param
281
Appendix BigDemo_VMM.PS1

(
[string] $pass,
[string] $component,
[xml] $unattend
)

return $unattend.unattend.settings |
Where-Object -Property pass -EQ -Value $pass `
|
Select-Object -ExpandProperty component `
|
Where-Object -Property name -EQ -Value $component
}

function New-UnattendFile
{
param
(
[string] $filePath
)

# Reload template - clone is necessary as PowerShell thinks this is a


"complex" object
$unattend = $unattendSource.Clone()

# Customize unattend XML


Get-UnattendChunk 'specialize' 'Microsoft-Windows-Shell-Setup' $unattend |
ForEach-Object -Process {
$_.RegisteredOrganization = 'Azure Sea Class Covert Trial' #TR-Egg
}
Get-UnattendChunk 'specialize' 'Microsoft-Windows-Shell-Setup' $unattend |
ForEach-Object -Process {
$_.RegisteredOwner = 'Thomas Rayner - @MrThomasRayner -
workingsysadmin.com' #TR-Egg
}
Get-UnattendChunk 'specialize' 'Microsoft-Windows-Shell-Setup' $unattend |
ForEach-Object -Process {
$_.TimeZone = $Timezone
}
Get-UnattendChunk 'oobeSystem' 'Microsoft-Windows-Shell-Setup' $unattend |
ForEach-Object -Process {
$_.UserAccounts.AdministratorPassword.Value = $adminPassword
}
Get-UnattendChunk 'specialize' 'Microsoft-Windows-Shell-Setup' $unattend |
ForEach-Object -Process {
$_.ProductKey = $WindowsKey
}

Clear-File $filePath
$unattend.Save($filePath)
}

Function Initialize-BaseImage
{

Mount-DiskImage $ServerISO
$DVDDriveLetter = (Get-DiskImage $ServerISO | Get-Volume).DriveLetter
282
Appendix BigDemo_VMM.PS1

Copy-Item -Path
"$($DVDDriveLetter):\NanoServer\NanoServerImageGenerator\Convert-
WindowsImage.ps1" -Destination "$($WorkingDir)\Convert-WindowsImage.ps1" -Force
Import-Module -Name
"$($DVDDriveLetter):\NanoServer\NanoServerImagegenerator\NanoServerImageGenerato
r.psm1" -Force

if (!(Test-Path "$($BaseVHDPath)\NanoBase.vhdx"))
{
New-NanoServerImage -MediaPath "$($DVDDriveLetter):\" -BasePath
$BaseVHDPath -TargetPath "$($BaseVHDPath)\NanoBase.vhdx" -Edition Standard -
DeploymentType Guest -Compute -Clustering -AdministratorPassword (ConvertTo-
SecureString $adminPassword -AsPlainText -Force)
# New-NanoServerImage -MediaPath "$($DVDDriveLetter):\" -BasePath
$BaseVDHPath -TargetPath "$($BaseVHDPath)\NanoBase.vhdx" -GuestDrivers -
DeploymentType Guest -Edition Standard -Compute -Clustering -Defender -Storage -
AdministratorPassword (ConvertTo-SecureString $adminPassword -AsPlainText -
Force)

#Copy-Item -Path '$WorkingDir\Convert-WindowsImage.ps1' -Destination


"$($WorkingDir)\Convert-WindowsImage.ps1" -Force
New-UnattendFile "$WorkingDir\unattend.xml"

#Build the Windows 2016 Core Base VHDx for the Lab

if (!(Test-Path "$($BaseVHDPath)\VMServerBaseCore.vhdx"))
{

Set-Location $workingdir

# Load (aka "dot-source) the Function


. .\Convert-WindowsImage.ps1
# Prepare all the variables in advance (optional)
$ConvertWindowsImageParam = @{
SourcePath = $ServerISO
RemoteDesktopEnable = $True
Passthru = $True
Edition = "ServerDataCenterCore"
VHDFormat = "VHDX"
SizeBytes = 60GB
WorkingDirectory = $workingdir
VHDPath = "$($BaseVHDPath)\VMServerBaseCore.vhdx"
DiskLayout = 'UEFI'
UnattendPath = "$($workingdir)\unattend.xml"
}

$VHDx = Convert-WindowsImage @ConvertWindowsImageParam

#Build the Windows 2016 Full UI Base VHDx for the Lab
283
Appendix BigDemo_VMM.PS1

if (!(Test-Path "$($BaseVHDPath)\VMServerBase.vhdx"))
{

Set-Location $workingdir

# Load (aka "dot-source) the Function


. .\Convert-WindowsImage.ps1
# Prepare all the variables in advance (optional)
$ConvertWindowsImageParam = @{
SourcePath = $ServerISO
RemoteDesktopEnable = $True
Passthru = $True
Edition = "ServerDataCenter"
VHDFormat = "VHDX"
SizeBytes = 60GB
WorkingDirectory = $workingdir
VHDPath = "$($BaseVHDPath)\VMServerBase.vhdx"
DiskLayout = 'UEFI'
UnattendPath = "$($workingdir)\unattend.xml"
}

$VHDx = Convert-WindowsImage @ConvertWindowsImageParam

Clear-File "$($BaseVHDPath)\unattend.xml"
Dismount-DiskImage $ServerISO
Clear-File "$($WorkingDir)\Convert-WindowsImage.ps1"

function Invoke-DemoVMPrep
{
param
(
[string] $VMName,
[string] $GuestOSName,
[switch] $FullServer
)

Write-Log $VMName 'Removing old VM'


get-vm $VMName -ErrorAction SilentlyContinue |
stop-vm -TurnOff -Force -Passthru |
remove-vm -Force
Clear-File "$($VMPath)\$($GuestOSName).vhdx"

Write-Log $VMName 'Creating new differencing disk'


if ($FullServer)
{
$null = New-VHD -Path "$($VMPath)\$($GuestOSName).vhdx" -ParentPath
"$($BaseVHDPath)\VMServerBase.vhdx" -Differencing
}

else
{

284
Appendix BigDemo_VMM.PS1

$null = New-VHD -Path "$($VMPath)\$($GuestOSName).vhdx" -ParentPath


"$($BaseVHDPath)\VMServerBaseCore.vhdx" -Differencing
}

Write-Log $VMName 'Creating virtual machine'


new-vm -Name $VMName -MemoryStartupBytes 4GB -SwitchName $virtualSwitchName
`
-Generation 2 -Path "$($VMPath)\" | Set-VM -ProcessorCount 2

Set-VMFirmware -VMName $VMName -SecureBootTemplate


MicrosoftUEFICertificateAuthority
Set-VMFirmware -Vmname $VMName -EnableSecureBoot off
Add-VMHardDiskDrive -VMName $VMName -Path "$($VMPath)\$($GuestOSName).vhdx"
-ControllerType SCSI
Write-Log $VMName 'Starting virtual machine'
Enable-VMIntegrationService -Name 'Guest Service Interface' -VMName $VMName
start-vm $VMName
}

function Create-DemoVM
{
param
(
[string] $VMName,
[string] $GuestOSName,
[string] $IPNumber = '0'
)

Wait-PSDirect $VMName -cred $localCred

Invoke-Command -VMName $VMName -Credential $localCred {


param($IPNumber, $GuestOSName, $VMName, $domainName, $Subnet)
if ($IPNumber -ne '0')
{
Write-Output -InputObject "[$($VMName)]:: Setting IP Address to
$($Subnet)$($IPNumber)"
$null = New-NetIPAddress -IPAddress "$($Subnet)$($IPNumber)" -
InterfaceAlias 'Ethernet' -PrefixLength 24
Write-Output -InputObject "[$($VMName)]:: Setting DNS Address"
Get-DnsClientServerAddress | ForEach-Object -Process {
Set-DnsClientServerAddress -InterfaceIndex $_.InterfaceIndex -
ServerAddresses "$($Subnet)1"
}
}
Write-Output -InputObject "[$($VMName)]:: Renaming OS to
`"$($GuestOSName)`""
Rename-Computer -NewName $GuestOSName
Write-Output -InputObject "[$($VMName)]:: Configuring WSMAN Trusted
hosts"
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value
"*.$($domainName)" -Force
Set-Item WSMan:\localhost\client\trustedhosts "$($Subnet)*" -Force -
concatenate
Enable-WSManCredSSP -Role Client -DelegateComputer "*.$($domainName)" -
Force
} -ArgumentList $IPNumber, $GuestOSName, $VMName, $domainName, $Subnet

Restart-DemoVM $VMName

285
Appendix BigDemo_VMM.PS1

Wait-PSDirect $VMName -cred $localCred


}

function Invoke-NodeStorageBuild
{
param
(
[string]$VMName,
[string]$GuestOSName
)

Create-DemoVM $VMName $GuestOSName


Clear-File "$($VMPath)\$($GuestOSName) - Data 1.vhdx"
Clear-File "$($VMPath)\$($GuestOSName) - Data 2.vhdx"
Get-VM $VMName | Stop-VM
Add-VMNetworkAdapter -VMName $VMName -SwitchName $virtualSwitchName
New-VHD -Path "$($VMPath)\$($GuestOSName) - Data 1.vhdx" -Dynamic -SizeBytes
200GB
Add-VMHardDiskDrive -VMName $VMName -Path "$($VMPath)\$($GuestOSName) - Data
1.vhdx" -ControllerType SCSI
New-VHD -Path "$($VMPath)\$($GuestOSName) - Data 2.vhdx" -Dynamic -SizeBytes
200GB
Add-VMHardDiskDrive -VMName $VMName -Path "$($VMPath)\$($GuestOSName) - Data
2.vhdx" -ControllerType SCSI
Set-VMProcessor -VMName $VMName -Count 2 -ExposeVirtualizationExtensions $True
Add-VMNetworkAdapter -VMName $VMName -SwitchName $virtualSwitchName
Add-VMNetworkAdapter -VMName $VMName -SwitchName $virtualSwitchName
Add-VMNetworkAdapter -VMName $VMName -SwitchName $virtualSwitchName
Get-VMNetworkAdapter -VMName $VMName | Set-VMNetworkAdapter -AllowTeaming On
Get-VMNetworkAdapter -VMName $VMName | Set-VMNetworkAdapter -
MacAddressSpoofing on
Start-VM $VMName
Wait-PSDirect $VMName -cred $localCred

Invoke-Command -VMName $VMName -Credential $localCred {


param($VMName, $domainCred, $domainName)
Write-Output -InputObject "[$($VMName)]:: Installing Clustering"
$null = Install-WindowsFeature -Name File-Services, Failover-Clustering,
Hyper-V -IncludeManagementTools
Write-Output -InputObject "[$($VMName)]:: Joining domain as
`"$($env:computername)`""

while (!(Test-Connection -ComputerName $domainName -BufferSize 16 -Count 1 -


Quiet -ea SilentlyContinue))
{
Start-Sleep -Seconds 1
}

do
{
Add-Computer -DomainName $domainName -Credential $domainCred -ea
SilentlyContinue
}
until ($?)
} -ArgumentList $VMName, $domainCred, $domainName

Wait-PSDirect $VMName -cred $domainCred

Invoke-Command -VMName $VMName -Credential $domainCred {


286
Appendix BigDemo_VMM.PS1

Rename-NetAdapter -Name 'Ethernet' -NewName 'LOM-P0'


Rename-NetAdapter -Name 'Ethernet 2' -NewName 'LOM-P1'
Rename-NetAdapter -Name 'Ethernet 3' -NewName 'Riser-P0'
Get-NetAdapter -Name 'Ethernet 5' | Rename-NetAdapter -NewName 'Riser-P1'
}

Restart-DemoVM $VMName
Wait-PSDirect $VMName -cred $domainCred

#endregion

#region Variable Init


$BaseVHDPath = "$($WorkingDir)\BaseVHDs"
$VMPath = "$($WorkingDir)\VMs"

$localCred = New-Object -TypeName System.Management.Automation.PSCredential `


-ArgumentList 'Administrator', (ConvertTo-SecureString -String $adminPassword -
AsPlainText -Force)

$domainCred = New-Object -TypeName System.Management.Automation.PSCredential `


-ArgumentList "$($domainName)\Administrator", (ConvertTo-SecureString -String
$domainAdminPassword -AsPlainText -Force)

#$ServerISO = "D:\DCBuild\10586.0.151029-
1700.TH2_RELEASE_SERVER_OEMRET_X64FRE_EN-US.ISO"
#$ServerISO = "d:\DCBuild\14393.0.160808-
1702.RS1_Release_srvmedia_SERVER_OEMRET_X64FRE_EN-US.ISO"
#ServerISO =
'D:\DCBuild\en_windows_server_2016_technical_preview_5_x64_dvd_8512312.iso'
#$ServerISO =
'c:\ClusterStorage\Volume1\DCBuild\en_windows_server_2016_x64_dvd_9327751.iso'
#Updated for RTM Build 2016
$ServerISO = 'f:\dcbuild_CM\en_windows_server_2016_x64_dvd_9718492.iso' #THIS
NEEDS to be Modified for your Lab

$WindowsKey = '****' #Dave's Technet KEY Remove for Publishing of Book

$unattendSource = [xml]@"
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing></servicing>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>*</ComputerName>
<ProductKey>****</ProductKey>
<RegisteredOrganization>Organization</RegisteredOrganization>
<RegisteredOwner>Owner</RegisteredOwner>
<TimeZone>TZ</TimeZone>
</component>
</settings>
<settings pass="oobeSystem">
287
Appendix BigDemo_VMM.PS1

<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>password</Value>
<PlainText>True</PlainText>
</AdministratorPassword>
</UserAccounts>
</component>
<component name="Microsoft-Windows-International-Core"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
</settings>
</unattend>
"@
#endregion

Write-Log 'Host' 'Getting started...'

Confirm-Path $BaseVHDPath
Confirm-Path $VMPath
Write-Log 'Host' 'Building Base Images'

if (!(Test-Path -Path "$($BaseVHDPath)\VMServerBase.vhdx"))


{
. Initialize-BaseImage
}

if ((Get-VMSwitch | Where-Object -Property name -EQ -Value $virtualSwitchName) -


eq $null)
{
New-VMSwitch -Name $virtualSwitchName -SwitchType Private
}

Invoke-DemoVMPrep 'DC01' 'DC01' -FullServer


Invoke-DemoVMPrep 'DHCP01' 'DHCP01'-FullServer
Invoke-DemoVMPrep 'Management01' 'Management01' -FullServer
Invoke-DemoVMPrep 'Router01' 'Router01' -FullServer
Invoke-DemoVMPrep 'VMM01' 'VMM01' -FullServer

288
Appendix BigDemo_VMM.PS1

$VMName = 'DC01'
$GuestOSName = 'DC01'
$IPNumber = '1'

Create-DemoVM $VMName $GuestOSName $IPNumber

Invoke-Command -VMName $VMName -Credential $localCred {


param($VMName, $domainName, $domainAdminPassword)

Write-Output -InputObject "[$($VMName)]:: Installing AD"


$null = Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Write-Output -InputObject "[$($VMName)]:: Enabling Active Directory and
promoting to domain controller"
Install-ADDSForest -DomainName $domainName -InstallDNS -NoDNSonNetwork -
NoRebootOnCompletion `
-SafeModeAdministratorPassword (ConvertTo-SecureString -String
$domainAdminPassword -AsPlainText -Force) -confirm:$false
} -ArgumentList $VMName, $domainName, $domainAdminPassword

Restart-DemoVM $VMName

Wait-PSDirect $VMName -cred $domainCred

Invoke-Command -VMName $VMName -Credential $domainCred {


param($VMName, $domainName, $domainAdminPassword)

Write-Output -InputObject "[$($VMName)]:: Installing ADCS"


$null = Install-WindowsFeature AD-Certificate -IncludeAllSubFeature -
IncludeManagementTools
} -ArgumentList $VMName, $domainName, $domainAdminPassword

Restart-DemoVM $VMName

$VMName = 'DHCP01'
$GuestOSName = 'DHCP01'
$IPNumber = '3'

Create-DemoVM $VMName $GuestOSName $IPNumber

Invoke-Command -VMName $VMName -Credential $localCred {


param($VMName, $domainCred, $domainName)
Write-Output -InputObject "[$($VMName)]:: Installing DHCP"
$null = Install-WindowsFeature DHCP -IncludeManagementTools
Write-Output -InputObject "[$($VMName)]:: Joining domain as
`"$($env:computername)`""
while (!(Test-Connection -ComputerName $domainName -BufferSize 16 -Count 1 -
Quiet -ea SilentlyContinue))
{
Start-Sleep -Seconds 1
}
do
{
Add-Computer -DomainName $domainName -Credential $domainCred -ea
SilentlyContinue
}
until ($?)
} -ArgumentList $VMName, $domainCred, $domainName

Restart-DemoVM $VMName
289
Appendix BigDemo_VMM.PS1

Wait-PSDirect $VMName -cred $domainCred

Invoke-Command -VMName $VMName -Credential $domainCred {


param($VMName, $domainName, $Subnet, $IPNumber)

Write-Output -InputObject "[$($VMName)]:: Waiting for name resolution"

while ((Test-NetConnection -ComputerName $domainName).PingSucceeded -eq


$false)
{
Start-Sleep -Seconds 1
}

Write-Output -InputObject "[$($VMName)]:: Configuring DHCP Server"


Set-DhcpServerv4Binding -BindingState $true -InterfaceAlias Ethernet
Add-DhcpServerv4Scope -Name 'IPv4 Network' -StartRange "$($Subnet)10" -
EndRange "$($Subnet)200" -SubnetMask 255.255.255.0
Set-DhcpServerv4OptionValue -OptionId 6 -value "$($Subnet)1"
Add-DhcpServerInDC -DnsName "$($env:computername).$($domainName)"
foreach($i in 1..99)
{
$mac = '00-b5-5d-fe-f6-' + ($i % 100).ToString('00')
$ip = $Subnet + '1' + ($i % 100).ToString('00')
$desc = 'Container ' + $i.ToString()
$scopeID = $Subnet + '0'
Add-DhcpServerv4Reservation -IPAddress $ip -ClientId $mac -Description
$desc -ScopeId $scopeID
}
} -ArgumentList $VMName, $domainName, $Subnet, $IPNumber

Restart-DemoVM $VMName

$VMName = 'DC01'
$GuestOSName = 'DC01'
$IPNumber = '1'

Wait-PSDirect $VMName -cred $domainCred

Invoke-Command -VMName $VMName -Credential $domainCred {


param($VMName, $password)

Write-Output -InputObject "[$($VMName)]:: Creating user account for Dave"


do
{
Start-Sleep -Seconds 5
New-ADUser `
-Name 'Dave' `
-SamAccountName 'Dave' `
-DisplayName 'Dave' `
-AccountPassword (ConvertTo-SecureString -String $password -AsPlainText
-Force) `
-ChangePasswordAtLogon $false `
-Enabled $true -ea 0
}
until ($?)
Add-ADGroupMember -Identity 'Domain Admins' -Members 'Dave'
} -ArgumentList $VMName, $domainAdminPassword

Invoke-Command -VMName $VMName -Credential $domainCred {


290
Appendix BigDemo_VMM.PS1

param($VMName, $password)

Write-Output -InputObject "[$($VMName)]:: Creating user account for SVC_SQL"


do
{
Start-Sleep -Seconds 5
New-ADUser `
-Name 'SVC_SQL' `
-SamAccountName 'SVC_SQL' `
-DisplayName 'SVC_SQL' `
-AccountPassword (ConvertTo-SecureString -String $password -AsPlainText
-Force) `
-ChangePasswordAtLogon $false `
-Enabled $true -ea 0
}
until ($?)
Add-ADGroupMember -Identity 'Domain Admins' -Members 'SVC_SQL'
} -ArgumentList $VMName, $domainAdminPassword

Invoke-Command -VMName $VMName -Credential $domainCred {


param($VMName, $password)

Write-Output -InputObject "[$($VMName)]:: Creating user account for SVC_VMM"


do
{
Start-Sleep -Seconds 5
New-ADUser `
-Name 'SVC_VMM' `
-SamAccountName 'SVC_VMM' `
-DisplayName 'SVC_VMM' `
-AccountPassword (ConvertTo-SecureString -String $password -AsPlainText
-Force) `
-ChangePasswordAtLogon $false `
-Enabled $true -ea 0
}
until ($?)
Add-ADGroupMember -Identity 'Domain Admins' -Members 'SVC_VMM'
} -ArgumentList $VMName, $domainAdminPassword

Invoke-Command -VMName $VMName -Credential $domainCred {


param($VMName, $password)

Write-Output -InputObject "[$($VMName)]:: Creating user account for MVPDays-


Admin"
do
{
Start-Sleep -Seconds 5
New-ADUser `
-Name 'MVPDays-Admin' `
-SamAccountName 'MVPDays-Admin' `
-DisplayName 'MVPDays-Admin' `
-AccountPassword (ConvertTo-SecureString -String $password -AsPlainText
-Force) `
-ChangePasswordAtLogon $false `
-Enabled $true -ea 0
}
until ($?)
Add-ADGroupMember -Identity 'Domain Admins' -Members 'MVPDays-Admin'
} -ArgumentList $VMName, $domainAdminPassword
291
Appendix BigDemo_VMM.PS1

Write-Output -InputObject "[$($VMName)]:: Enabling Active Directory Certificate


Enterprise Root CA with SHA 256"
icm -vmname $VMName -Credential $DomainCred {Install-AdcsCertificationAuthority
-CAType EnterpriseRootCa -CryptoProviderName "ECDSA_P256#Microsoft Software Key
Storage Provider" -KeyLength 256 -HashAlgorithmName SHA256 -confirm:$False -
verbose}
#icm -vmname DC01 -Credential $DomainCred {Install-AdcsCertificationAuthority -
CAType EnterpriseRootCa -CryptoProviderName "ECDSA_P256#Microsoft Software Key
Storage Provider" -KeyLength 256 -HashAlgorithmName SHA256 -confirm:$False -
verbose}

<#>
Invoke-Command -VMName $VMName -Credential $domainCred {
param($VMName, $domainName, $domainAdminPassword)

Write-Output -InputObject "[$($VMName)]:: Enabling Active Directory


Certificate Enterprise Root CA with SHA 256"
Install-AdcsCertificationAuthority -CAType EnterpriseRootCa -
CryptoProviderName "ECDSA_P256#Microsoft Software Key Storage Provider" -
KeyLength 256 -HashAlgorithmName SHA256 -confirm:$False -verbose
} -ArgumentList $VMName, $domainName, $domainAdminPassword

</#>

$VMName = 'Management01'
$GuestOSName = 'Management01'

Create-DemoVM $VMName $GuestOSName

Invoke-Command -VMName $VMName -Credential $localCred {


param($VMName, $domainCred, $domainName)
Write-Output -InputObject "[$($VMName)]:: Management tools"
$null = Install-WindowsFeature RSAT-Clustering, RSAT-Hyper-V-Tools
Write-Output -InputObject "[$($VMName)]:: Joining domain as
`"$($env:computername)`""
while (!(Test-Connection -ComputerName $domainName -BufferSize 16 -Count 1 -
Quiet -ea SilentlyContinue))
{
Start-Sleep -Seconds 1
}
do
{
Add-Computer -DomainName $domainName -Credential $domainCred -ea
SilentlyContinue
}
until ($?)
} -ArgumentList $VMName, $domainCred, $domainName

Restart-DemoVM $VMName

$VMName = 'VMM01'
$GuestOSName = 'VMM01'

Create-DemoVM $VMName $GuestOSName

Invoke-Command -VMName $VMName -Credential $localCred {


292
Appendix BigDemo_VMM.PS1

param($VMName, $domainCred, $domainName)


write-Output -InputObject "[$($VMName)]:: Management tools"
$null = Install-WindowsFeature RSAT-Clustering, RSAT-Hyper-V-Tools
Write-Output -InputObject "[$($VMName)]:: Joining domain as
`"$($env:computername)`""
while (!(Test-Connection -ComputerName $domainName -BufferSize 16 -Count 1 -
Quiet -ea SilentlyContinue))
{
Start-Sleep -Seconds 1
}
do
{
Add-Computer -DomainName $domainName -Credential $domainCred -ea
SilentlyContinue
}
until ($?)
} -ArgumentList $VMName, $domainCred, $domainName

$VMName = 'Router01'
$GuestOSName = 'Router01'

Create-DemoVM $VMName $GuestOSName

Invoke-Command -VMName $VMName -Credential $localCred {


param($VMName, $domainCred, $domainName)
Write-Output -InputObject "[$($VMName)]:: Joining domain as
`"$($env:computername)`""
while (!(Test-Connection -ComputerName $domainName -BufferSize 16 -Count 1 -
Quiet -ea SilentlyContinue))
{
Start-Sleep -Seconds 1
}
do
{
Add-Computer -DomainName $domainName -Credential $domainCred -ea
SilentlyContinue
}
until ($?)
} -ArgumentList $VMName, $domainCred, $domainName

#Wait-PSDirect 'Router01' -cred $localCred


Write-Log 'Done' 'Done!'

1..4 | ForEach-Object -Process {


Invoke-DemoVMPrep "S2D$_" "S2D$_" -FullServer
}

Wait-PSDirect 'S2D4' -cred $localCred

$VMName = 'S2D1'
$GuestOSName = 'S2D1'

1..4 | ForEach-Object -Process {


Invoke-NodeStorageBuild "S2D$_" "S2D$_"
}

Wait-PSDirect 'S2D4' -cred $domainCred


293
Appendix BigDemo_VMM.PS1

<#>
Invoke-Command -VMName 'MGMT1' -Credential $domainCred {
param ($domainName)
do
{
New-Cluster -Name S2DCluster -Node S2D1, S2D2, S2D3, S2D4 -NoStorage
}
until ($?)

while (!(Test-Connection -ComputerName "S2DCluster.$($domainName)" -BufferSize


16 -Count 1 -Quiet -ea SilentlyContinue))
{
ipconfig.exe /flushdns
Start-Sleep -Seconds 1
}
} -ArgumentList $domainName

Invoke-Command -VMName 'S2D1' -Credential $domainCred {


param ($domainName)
Enable-ClusterStorageSpacesDirect -PoolFriendlyName S2DPool -confirm:$false

# This will match the configuration that was done in the book
New-Volume -StoragePoolFriendlyName S2DPool -FriendlyName Mirror-2Way -
FileSystem CSVFS_REFS -Size 200GB -PhysicalDiskRedundancy 1
New-Volume -StoragePoolFriendlyName S2DPool -FriendlyName Mirror-3Way -
FileSystem CSVFS_REFS -Size 200GB -PhysicalDiskRedundancy 2
} -ArgumentList $domainName
</#>
Write-Log 'Done' 'Done!'

294
Appendix BigDemo_VMM.PS1

295
Appendix S2D-Audit.PS1

S2D-Audit.PS1
Here is a copy of the S2D-Audit.PS1 script that we used in the book. It can be downloaded from:
https://github.com/SerreRom/TechCoffee/blob/master/PowerShell/Audit-S2D/Audit-S2D.ps1

The script is quite long so grab a copy from the link above…

#requires -version 5.0

<#
.SYNOPSYS
This script audit an S2D hyperconverged infrastructure
.VERSION
0.1: Initial version
0.2: Add option to export path
0.3: Change consolidation rate to not take into account hyperthreading
0.4: Resolve bugs, add information
0.5: Force charset to UTF-8, resolve special char issue. Add trademark.
0.6: Resolve an issue to match the Network Adapter with VMNetworkAdapter
.AUTHOR
Romain Serre
Blog: https://www.tech-coffee.net
Twitter: @RomSerre
#>

##### Parameters #####


# ----------------------------------------------------------------

[CmdletBinding()]
param(
[Parameter(Mandatory=$True, HelpMessage='Specify the name of the cluster')]
[Alias('S2DCluster')]
[string]$ClusterName,
[Parameter(Mandatory=$True, HelpMessage='Specify the domain')]
[Alias('ComputerDomain')]
[String]$DomainName,
[Parameter(Mandatory=$True, HelpMessage='Specify the folder where the report
will be exported')]
[Alias('ExportPath')]
[String]$Path,
[Parameter(Mandatory=$True, HelpMessage='Specify Credentials')]
[Alias('Cred')]
[PSCredential]$Credential
)

##### Function #####


296
Contact Info Join us at MVPDays and meet great MVP’s like this in person

Contact Info

Join us at MVPDays and meet


great MVP’s like this in
person
If you liked their book, you will love to hear them in person.

Live Presentations
Dave frequently speaks at Microsoft conferences around North America, such as TechEd,
VeeamOn, TechDays, and MVPDays Community Roadshow.

Cristal runs the MVPDays Community Roadshow.

You can find additional information on the following blog:

www.checkyourlogs.net

www.mvpdays.com

Video Training
For video-based training, see the following site:

www.mvpdays.com

297
Contact Info Join us at MVPDays and meet great MVP’s like this in person

Live Instructor-led Classes


Dave has been a Microsoft Certified Trainer (MCT) for more than 15 years and presents
scheduled instructor-led classes in the US and Canada. For current dates and locations, see the
following sites:

 www.truesec.com

 www.checkyourlogs.net

Consulting Services
Dave and Cristal have worked with some of the largest companies in the world and have a
wealth of experience and expertise. Customer engagements are typically between two weeks
and six months.

298
Contact Info Join us at MVPDays and meet great MVP’s like this in person

Twitter
Dave, Cristal, Allan, Cary on Twitter tweet on the following aliases:

 Dave Kawula: @DaveKawula

 Cristal Kawula: @SuperCristal1

 Allan Rafuse: @AllanRafuse

 Cary Sun: @SifuSun

299

Potrebbero piacerti anche