<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Larryexchange Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/larryexchange/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/larryexchange/feed.xml</link>
    <description />
    <lastBuildDate>Fri, 04 Aug 2017 10:25:59 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure Stack WAP Connector - Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/azure-stack-wap-connector-part-1</link>
      <pubDate>Fri, 04 Aug 2017 10:22:09 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=4356</guid>
      <description><![CDATA[Azure Stack WAP connector is preview now. With WAP Connector, you can enable access from the Azure...]]></description>
      <content:encoded><![CDATA[Azure Stack WAP connector is preview now. With WAP Connector, you can enable access from the Azure Stack user portal to tenant virtual machines running on Windows Azure Pack. Tenants can use the Azure Stack portal to manage their existing IaaS virtual machines and virtual networks. These resources are made available on Windows Azure Pack through the underlying Service Provider Foundation (SPF) and Virtual Machine Manager (VMM) components. For more information about WAP connector, please refer to the link below.
https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-manage-windows-azure-pack

When we deployed WAP connector, the most challenging part is integrate the identity management systems between WAP and Azure Stack. Right now we support the following ID management scenarios.
<table width="1051">
<tbody>
<tr>
<td width="269">
<p style="text-align: left"><b>Azure Stack </b><b>Id Manager</b></p>
</td>
<td width="345" style="text-align: left"><b>CPS/WAP Id Manager</b></td>
<td width="437">
<p style="text-align: left"><b>Notes</b></p>
</td>
</tr>
<tr>
<td width="269" rowspan="3">
<p style="text-align: left">AAD</p>
</td>
<td width="345">AD-ADFS</td>
<td width="437">AD is synchronized with AAD</td>
</tr>
<tr>
<td width="345">AAD through ACS</td>
<td width="437">CPS using AAD instead of local</td>
</tr>
<tr>
<td width="345">3rd Party Id Manager</td>
<td width="437">Both sharing AAD</td>
</tr>
<tr>
<td width="269" rowspan="3">
<p style="text-align: left">ADFS</p>
</td>
<td width="345">AD-ADFS</td>
<td width="437">Both sharing same customer AD</td>
</tr>
<tr>
<td width="345">AAD through ACS</td>
<td width="437">Both sharing same AAD</td>
</tr>
<tr>
<td width="345">3rd Party Id Manager</td>
<td width="437">Both sharing 3rd Party solution</td>
</tr>
</tbody>
</table>
If you're using ASDK, you probably would find it's more challenging coz in ASDK (one-node deployment) the whole Azure Stack is behind NAT.

In this blog, I will demonstrate how to integrate ASDK and WAP's identity management systems. In my setup, Azure Stack uses built-in ADFS (adfs.local.azurestack.external) and WAP uses a separate ADFS (fs.blue.cloud).
<a href="https://msdnshared.blob.core.windows.net/media/2017/08/Architecture-blue.cloud_.png"><img width="1024" height="472" class="alignnone size-large wp-image-4385" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Architecture-blue.cloud_-1024x472.png" /></a>

&nbsp;
<h2>Pre-requisites</h2>
<ul>
 	<li>Deploy Azure Stack Development Kit (ASDK) and use ADFS type. https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-run-powershell-script#deploy-the-development-kit</li>
 	<li>Prepare a Separate AD forest (BLUE.CLOUD in my setup).</li>
 	<li>Deploy a WAP environment. In my setup, I put all the WAP roles on single VM (BLUE-WAP.BLUE.CLOUD). I hosted VMM and SPF are on another VM (BLUE-VMM.BLUE.CLOUD)</li>
</ul>
<h2>Prepare Certificates for *.BLUE.CLOUD</h2>
1. On BLUE-WAP.BLUE.CLOUD, run the following cmdlets to install CA.
<pre style="padding-left: 60px">Install-WindowsFeature -Name ADCS-Cert-Authority -IncludeAllSubFeature -IncludeManagementTools</pre>
2. Open Server Manager and following the wizard to configure the CA as standalone CA.

3. Create certificate request configuration file called "Bluecloud-Cert.inf".
<pre style="padding-left: 60px">[Version] 
Signature="$Windows NT$"

[NewRequest] 
Subject = "CN=*.blue.cloud"   ; For a wildcard use "CN=*.CONTOSO.COM" for example 
; For an empty subject use the following line instead or remove the Subject line entierely 
; Subject = 
Exportable = TRUE                  ; Private key is not exportable 
KeyLength = 2048                    ; Common key sizes: 512, 1024, 2048, 4096, 8192, 16384 
KeySpec = 1                         ; AT_KEYEXCHANGE 
KeyUsage = 0xA0                     ; Digital Signature, Key Encipherment 
MachineKeySet = True                ; The key belongs to the cph01 computer account 
ProviderName = "Microsoft RSA SChannel Cryptographic Provider" 
ProviderType = 12 
SMIME = FALSE 
RequestType = CMC

; At least certreq.exe shipping with Windows Vista/Server 2008 is required to interpret the [Strings] and [Extensions] sections below

[Strings] 
szOID_SUBJECT_ALT_NAME2 = "2.5.29.17" 
szOID_ENHANCED_KEY_USAGE = "2.5.29.37" 
szOID_PKIX_KP_SERVER_AUTH = "1.3.6.1.5.5.7.3.1" 
szOID_PKIX_KP_CLIENT_AUTH = "1.3.6.1.5.5.7.3.2"

[Extensions] 
%szOID_SUBJECT_ALT_NAME2% = "{text}"
_continue_ = "dns=*.blue.cloud&amp;"
_continue_ = "dns=enterpriseregistration.blue.cloud&amp;"
_continue_ = "dns=fs.blue.cloud&amp;"
_continue_ = "dns=certauth.fs.blue.cloud&amp;"
%szOID_ENHANCED_KEY_USAGE% = "{text}%szOID_PKIX_KP_SERVER_AUTH%,%szOID_PKIX_KP_CLIENT_AUTH%"

[RequestAttributes]</pre>
<div>4. Run the following cmdlets and submit a certificate request.</div>
<pre style="padding-left: 60px">cmd.exe /c "certreq -new Bluecloud-Cert.inf Bluecloud-Cert.req"
cmd.exe /c "certreq -submit Bluecloud-Cert.req"</pre>
<div>5. Open CA management console and issue the certificate and then copy it to the file "C:\Bluecloud-Cert.cer"</div>
<div><a href="https://msdnshared.blob.core.windows.net/media/2017/08/WAP01.png"><img width="754" height="236" class="alignnone size-full wp-image-4395" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WAP01.png" /></a></div>
<div></div>
<div>6. Run the following cmdlets and import the certificate to the local machine.</div>
<pre style="padding-left: 60px">cmd.exe /c "certreq -accept Bluecloud-Cert.cer"</pre>
7. Export certificates.
<pre style="padding-left: 60px">$cert = get-Childitem cert:\localmachine\my | where-object {$_.Subject -eq "CN=*.blue.cloud"}
$PfxPass = ConvertTo-SecureString "123" -AsPlainText -Force
Export-pfxCertificate -Cert $cert -FilePath c:\Bluecloud-Cert.pfx -Password $PfxPass
$CAcert = Get-Childitem cert:\localmachine\root | where-object {$_.Subject -eq "CN=blue-BLUE-WAP-CA"}
Export-Certificate -Cert $CAcert -FilePath c:\Bluecloud-CACert.cer</pre>
8. Configure all the Web Sites on BLUE-WAP to use the new certificate.
<pre style="padding-left: 60px">Import-Module WebAdministration
$sslBindings = Get-childItem IIS:\SslBindings\
$sslBindings | foreach-Object{$path = "IIS:\SslBindings\" + $_.IPAddress.IPAddressToString + "!" + $_.port; Remove-Item $path; $cert | new-item $path}</pre>
&nbsp;
<h2>Install ADFS in Domain "BLUE.CLOUD"</h2>
1. On the domain controller "BLUE-DC.BLUE.CLOUD", copy the above "bluecloud-cert.pfx" and "bluecloud-CAcert.cer" to the folder "C:\". Then run the following cmdlets to install and configure ADFS.
<pre style="padding-left: 60px">Install-WindowsFeature -Name ADFS-Federation -IncludeAllSubFeature -IncludeManagementTools

# Set these values:
$domainName = 'blue.cloud'
$adfsPrefix = 'fs'
$username = 'administrator' 
$password = 'User@123'
$dnsName = ($adfsPrefix + "." + $domainName)
$PfxPass = ConvertTo-SecureString "123" -AsPlainText -Force
$securePassword = ConvertTo-SecureString -String $password -Force -AsPlainText
$adfsServiceCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ($domainname + '\' + $username), $securePassword

Import-Certificate -FilePath C:\Bluecloud-CACert.cer -CertStoreLocation cert:\localmachine\root 
$cert = Import-pfxCertificate -FilePath C:\Bluecloud-Cert.pfx -CertStoreLocation cert:\localmachine\my -Exportable -Password $PfxPass

# Configure AD FS
Install-AdfsFarm `
    -CertificateThumbprint $cert.Thumbprint `
    -FederationServiceName $dnsName `
    -ServiceAccountCredential $adfsServiceCredential `
    -OverwriteConfiguration

Set-ADFSProperties -IgnoreTokenBinding $True
Set-ADFSWebConfig –HRDCookieEnabled $false
cmd.exe /c "setspn -U -S http/fs.blue.cloud administrator"
cmd.exe /c "setspn -U -S http/blue-dc.blue.cloud administrator"</pre>
&nbsp;
<h2>Configure the Name Resolution between Azure Stack and WAP</h2>
<ol>
 	<li>On ASDK Host Machine, open DNS management console and connect to AzS-DC01.AZURESTACK.LOCAL.</li>
 	<li>Add a conditional forwarding and forward the query for domain "BLUE.LCOUD" to IP address of the DNS server "BLUE-DC.BLUE.CLOUD".</li>
 	<li>On BLUE-DC.BLUE.CLOUD, open DNS management console and add a new DNS zone called "LOCAL.AZURESTACK.EXTERNAL".</li>
 	<li>Add an HOST record (A record) under that new created DNS zone "ADFS.LOCAL.AZURESTACK.EXTERNAL" and point to the external IP of AzS-BGPNAT01.</li>
</ol>
<h2>Configure the Trust between WAP Tenant Portal, Azure Stack's ADFS and BLUE.CLOUD's ADFS</h2>
1. On ASDK Host machine, create a text file "C:\Rules.txt". Copy and paste the following content to that file.
<pre style="padding-left: 60px">@RuleTemplate = "LdapClaims"
@RuleName = "LDAP UPN"
c:[Type == "https://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
 =&gt; issue(store = "Active Directory", types = ("https://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"), query = ";userPrincipalName;{0}", param = c.Value);

@RuleTemplate = "LdapClaims"
@RuleName = "LDAP Groups"
c:[Type == "https://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
 =&gt; issue(store = "Active Directory", types = ("https://schemas.xmlsoap.org/claims/Group"), query = ";tokenGroups(domainQualifiedName);{0}", param = c.Value);

@RuleTemplate = "PassThroughClaims"
@RuleName = "Passthru UPN"
c:[Type == "https://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"]
 =&gt; issue(claim = c);

@RuleTemplate = "PassThroughClaims"
@RuleName = "Passthru Groups"
c:[Type == "https://schemas.xmlsoap.org/claims/Group"]
 =&gt; issue(claim = c);</pre>
3. Copy Bluecloud-CACert.cer to the ASDK Host machine's C drive.

4. Open GPMC.MSC and edit default domain policy. Import Bluecloud-CACert.cer to the Root CA store in that GPO.

5. On ASDK Host machine, run the following cmdlets.
<pre style="padding-left: 60px">#Save Azure Stack's ADFS Metadata
invoke-webrequest https://adfs.local.azurestack.external/FederationMetadata/2007-06/FederationMetadata.xml -OutFile "C:\FederationMetadata-AzureStack.xml"
#Save Azure Stack's CA Certificate
Copy-Item \\su1fileserver\SU1_Infrastructure_1\AzureStackCertStore\Internal\Current\RootCert\AzureStackCertificationAuthority.cer C:\

#Publish ADFS's HTTPS port
Enter-PSSession AzS-BGPNAT01.azurestack.local
$externalNic = Get-NetIPConfiguration | ? { [string]$_.IPv4Address -ne "192.168.200.1" }
$externalNicName = $externalNic.InterfaceAlias
$externalIP = $externalNic.IPv4Address.IPAddress + "/" + $externalNic.IPv4Address.PrefixLength
Add-NetNatExternalAddress -NatName BGPNAT -IPAddress $externalNic.IPv4Address.IPAddress -PortStart 443 -PortEnd 443
Add-NetNatStaticMapping -ExternalIPAddress $externalIP -ExternalPort 443 -InternalIPAddress "192.168.102.5" -InternalPort 443 -NatName BGPNAT -Protocol TCP

#Copy Rules.txt to AzS-ADFS01
Copy-Item C:\Rules.txt \\AzS-ADFS01.azurestack.local\C$
#Create trust between BLUE.CLOUD ADFS and Azure Stack ADFS
Enter-PSSession AzS-ADFS01.azurestack.local
Set-ADFSWebConfig –HRDCookieEnabled $false
Set-ADFSProperties -IgnoreTokenBinding $True
$policy = Get-AdfsAccessControlPolicy -Name "Permit everyone"
Add-ADFSRelyingPartyTrust -Name "Blue Cloud" `
    -MetadataUrl https://fs.blue.cloud/federationmetadata/2007-06/federationmetadata.xml `
    -AutoUpdateEnabled:$true  `
    -MonitoringEnabled:$true `
    -IssuanceTransformRulesFile "C:\rules.txt" `
    -AccessControlPolicyName $policy.name `
    -ClaimsProviderName @("Active Directory") `
    -EnableJWT $true</pre>
6. On BLUE-DC.BLUE.CLOUD, copy "AzureStackCertificationAuthority.cer" and "Rules.txt" to C drive.

7. Run the cmdlets below to configure the ADFS.
<pre style="padding-left: 60px">$policy = Get-AdfsAccessControlPolicy -Name "Permit everyone"
Add-AdfsRelyingPartyTrust -Name "WAP Tenant Portal" `
    -MetadataUrl "https://blue-wap.blue.cloud:30081/FederationMetadata/2007-06/FederationMetadata.xml" `
    -EnableJWT:$true `
    -AutoUpdateEnabled:$true `
    -IssuanceTransformRulesFile "C:\rules.txt" `
    -ClaimsProviderName @() `
    -AccessControlPolicyName $policy.name
Add-AdfsClaimsProviderTrust -Name "Azure Stack" `
    -MetadataFile "C:\FederationMetadata-AzureStack.xml" `
    -AutoUpdateEnabled:$false `
    -AcceptanceTransformRulesFile "C:\rules.txt"
Set-AdfsRelyingPartyTrust -TargetName "WAP Tenant Portal" -ClaimsProviderName @()</pre>
8. On BLUE-WAP.BLUE.CLOUD, copy "AzureStackCertificationAuthority.cer" to C drive. Then run the following cmdlets.
<pre style="padding-left: 60px">Import-Certificate -FilePath C:\AzureStackCertificationAuthority.cer -CertStoreLocation cert:\localmachine\root

$fqdn = 'fs.blue.cloud'
$dbServer = 'blue-wap.blue.cloud'
$dbpassword= 'User@123' 
$portalConfigStoreConnectionString = [string]::Format('Data Source={0};Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;User ID=sa;Password={1}', $dbServer, $dbPassword)

# Configure Tenant to use ADFS
Set-MgmtSvcRelyingPartySettings -Target Tenant `
    -MetadataEndpoint https://$fqdn/FederationMetadata/2007-06/FederationMetadata.xml `
    -DisableCertificateValidation `
    -ConnectionString $portalConfigStoreConnectionString</pre>
&nbsp;
<h2>Verify the user AzureStackAdmin@AzureStack.local can login both Azure Stack and WAP</h2>
On ASDK Host machine, user the account "AzureStackAdmin@AzureStack.local" to login Azure Stack Tenant portal "https://portal.local.azurestack.external" and WAP tenant portal "https://blue-wap.blue.cloud:30081".

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/Dual-Portal.png"><img width="1024" height="369" class="alignnone size-large wp-image-4405" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/Dual-Portal-1024x369.png" /></a>

&nbsp;

In the next blog, we will deploy WAP connector.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Mobile First, Cloud First -- A Mobile Azure Stack</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/mobile-first-cloud-first-a-mobile-azure-stack</link>
      <pubDate>Mon, 26 Dec 2016 03:34:01 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=4245</guid>
      <description><![CDATA[Merry Christmas!

In my previous post "Smallest Azure Stack PoC Box w/o Hacking the Code", I...]]></description>
      <content:encoded><![CDATA[Merry Christmas!

In my previous post "Smallest Azure Stack PoC Box w/o Hacking the Code", I introduced how I built a mini Azure Stack. I can put it into a small backpack and take it with me all the day.

https://blogs.technet.microsoft.com/larryexchange/2016/11/30/smallest-azure-stack-poc-box-wo-hacking-the-code/

<span>But when I tried to demo that to my friend a coffee shop, I found a little problem. How to connect the mini Azure Stack to Coffee Shop's wireless hot spot? As you probably know once deployed, Azure Stack assumes its IP range and DNS servers remains unchanged. Obviously that's not the case if you need to move among different networks. I don't want to sit in the coffee shop for 3 hours and wait a new deployment complete. </span>

<span>Now let's translate the above requirements to the technical questions below:</span>
<ol>
 	<li><span>How to keep Azure Stack's IP range and DNS server unchanged when it's roaming among different networks?</span></li>
 	<li>How to connect my mini Azure Stack to a wireless network? (You don't expect have cable connection in coffee shop, do you?)</li>
</ol>
The first one is simple. Prepare a Windows 10 laptop and:
<ol>
 	<li>Connect the laptop to the mini Azure Stack with a network cable.</li>
 	<li>Install Hyper-V role on it.</li>
 	<li>Create an internal virtual switch and an external virtual switch. Bind the external virtual switch to the physical NIC which used to connect to mini Azure Stack.</li>
 	<li>Created a VM with two vNICs (one connect to the internal virtual switch, the other connect to the external virtual switch) on the laptop.</li>
 	<li>Assign the IP addresses to the above two vNICs, In my case, I use 192.168.2.1/24 and default gateway 192.168.2.254 on the vNIC which connect to Internal vSwitch and 192.168.20.1/24 on the vNIC which connect to external vSwitch.</li>
 	<li>Install DNS role on the VM and configure DNS forwarding on the DNS server. For example, forward all the DNS queries to external DNS server (say, 8.8.8.8).</li>
 	<li>Configure the physical NIC on mini Azure Stack to use IP address: 192.168.20.253/24; default gateway: 192.168.20.1; DNS server: 192.168.2.1. Later on I can deploy Azure Stack with static IP and fixed DNS server IP (192.168.2.1). (I use an intermediate DNS server here because in some networks, you might not be able to access the previous designated DNS server (say, 8.8.8.8). When that happened, you only need to update the DNS forwarding here.)</li>
</ol>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/12/DNS-Forwarding.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/DNS-Forwarding.png" alt="dns-forwarding" width="704" height="736" class="alignnone size-full wp-image-4255" /></a></p>
&nbsp;

Now let's focus on how to configure the mobile Azure Stack to access Internet. If you have used Hyper-V on your laptop, probably you know Hyper-V virtual switch doesn't support binding to a wireless network adapter. Ben Armstrong had a great blog talking about how to workaround that.

https://blogs.msdn.microsoft.com/virtual_pc_guy/2008/01/09/using-hyper-v-with-a-wireless-network-adapter/

If you're using Window 10 (build 14295 or later) on your laptop just like me, we have a better option, configure the above internal virutal switch as a NAT network. Here is the detailed steps.
<ol>
 	<li>Open a PowerShell windows with administrative privilege.</li>
 	<li>Run cmdlet "Get-NetAdapter" and  identify the index number of the above internal virtual switch you created. In my case, it's 10.
<a href="https://msdnshared.blob.core.windows.net/media/2016/12/Get-NetAdapter.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/12/Get-NetAdapter.png" alt="get-netadapter" width="981" height="262" class="alignnone size-full wp-image-4265" /></a></li>
 	<li>Run the cmdlets below to configure that virtual switch to use NAT.</li>
</ol>
<pre style="padding-left: 60px">New-NetIPAddress -IPAddress 192.168.2.254 -PrefixLength 24 -InterfaceIndex 10
New-NetNat -Name NATnetwork -InternalIPInterfaceAddressPrefix 192.168.2.0/24</pre>
Now the above DNS VM is supposed to able to access Internet. For more information regarding how to setup virtual switches for virtual machines that use NAT, please refer to the link below.
<a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network">https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network</a>

As next step, we need to configure DNS server as the second NAT gateway.
<ol>
 	<li>Install RRAS role on the above VM.</li>
 	<li>Configure NAT on the above VM, use vNIC which connect to internal virtual switch as the external network and use vNIC which connect to the external virtual switch as the internal network. (I know it's a little bit confusing here. Actually from DNS/NAT VM's point of view, the vNIC which connect to the external virtual switch is used to connect to mini Azure Stack and the vNIC which connect to the NAT enabled internal virtual switch is used to access Internet.)</li>
 	<li>Now you may validate and see if mini Azure Stack is able to access Internet (192.168.20.253 -&gt; 192.168.20.1 -&gt; 192.168.2.1 -&gt; 192.168.2.254 -&gt; &lt;ip of laptop wireless network gateway&gt; -&gt;...)</li>
</ol>
&nbsp;

Finally, I can install Azure Stack with.
<pre style="padding-left: 30px">$adminpass = ConvertTo-SecureString "xxx" -AsPlainText -Force
$aadpass = ConvertTo-SecureString "yyy" -AsPlainText -Force
$aadcred = New-Object System.Management.Automation.PSCredential ("serviceadmin@azurestack.onmicrosoft.com", $aadpass) 
.\InstallAzureStackPOC.ps1 -AdminPassword $adminpass -AADAdminCredential $aadcred -NATIPv4Subnet 192.168.20.0/24 -NATIPv4Address 192.168.20.254 -NATIPv4DefaultGateway 192.168.20.1 -EnvironmentDNS 192.168.2.1</pre>
<p style="padding-left: 30px"></p>]]></content:encoded>
    </item>
    <item>
      <title>Smallest Azure Stack PoC Box w/o Hacking the Code</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/smallest-azure-stack-poc-box-wo-hacking-the-code</link>
      <pubDate>Wed, 30 Nov 2016 07:27:48 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=4095</guid>
      <description><![CDATA[I know this is crazy. This is how I am crazy about the product "Azure Stack" we're building.

From...]]></description>
      <content:encoded><![CDATA[I know this is crazy. This is how I am crazy about the product "Azure Stack" we're building.

From time to time, I see people deploy Azure Stack on the mini size hardware for different reasons like use the existing home server, or be mobile for travelling around countries. As an example, here is the portable Azure Stack built by our MVP (<a href="https://www.itworld.com/article/3142708/microsoft-subnet/azure-stack-portable-the-enterprise-cloud-in-a-briefcase.html">https://www.itworld.com/article/3142708/microsoft-subnet/azure-stack-portable-the-enterprise-cloud-in-a-briefcase.html</a>). Sure, you can always hack the code and install Azure Stack on a laptop or even a nested VM, which doesn't meet minimum requirements. But it's not recommended and you don't have extra resource to host PaaS services or try multi-VM deployment.

Here is the official hardware requirements (<a href="https://acom-prod-uswest-01.azurewebsites.net/en-us/documentation/articles/azure-stack-deploy/">https://acom-prod-uswest-01.azurewebsites.net/en-us/documentation/articles/azure-stack-deploy/</a>):
<h2>Hardware</h2>
<table>
<thead>
<tr>
<td>Component</td>
<td>Minimum</td>
<td>Recommended</td>
</tr>
</thead>
<tbody>
<tr>
<td>Disk drives: Operating System</td>
<td>1 OS disk with minimum of 200 GB available for system partition (SSD or HDD)</td>
<td>1 OS disk with minimum of 200 GB available for system partition (SSD or HDD)</td>
</tr>
<tr>
<td>Disk drives: General Azure Stack POC Data</td>
<td>4 disks. Each disk provides a minimum of 140 GB of capacity (SSD or HDD). All available disks will be used.</td>
<td>4 disks. Each disk provides a minimum of 250 GB of capacity (SSD or HDD). All available disks will be used.</td>
</tr>
<tr>
<td>Compute: CPU</td>
<td>Dual-Socket: 12 Physical Cores (total)</td>
<td>Dual-Socket: 16 Physical Cores (total)</td>
</tr>
<tr>
<td>Compute: Memory</td>
<td>96 GB RAM</td>
<td>128 GB RAM</td>
</tr>
<tr>
<td>Compute: BIOS</td>
<td>Hyper-V Enabled (with SLAT support)</td>
<td>Hyper-V Enabled (with SLAT support)</td>
</tr>
<tr>
<td>Network: NIC</td>
<td>Windows Server 2012 R2 Certification required for NIC; no specialized features required</td>
<td>Windows Server 2012 R2 Certification required for NIC; no specialized features required</td>
</tr>
<tr>
<td>HW logo certification</td>
<td><a href="https://windowsservercatalog.com/results.aspx?&amp;chtext=&amp;cstext=&amp;csttext=&amp;chbtext=&amp;bCatID=1333&amp;cpID=0&amp;avc=79&amp;ava=0&amp;avq=0&amp;OR=1&amp;PGS=25&amp;ready=0" title="">Certified for Windows Server 2012 R2</a></td>
<td><a href="https://windowsservercatalog.com/results.aspx?&amp;chtext=&amp;cstext=&amp;csttext=&amp;chbtext=&amp;bCatID=1333&amp;cpID=0&amp;avc=79&amp;ava=0&amp;avq=0&amp;OR=1&amp;PGS=25&amp;ready=0" title="">Certified for Windows Server 2012 R2</a></td>
</tr>
</tbody>
</table>
&nbsp;

As you could see most of the desktop PC and laptop today couldn't meet the minimum requirement. They normally have up to 64GB memory. For laptop, number of disks is another issue. Although in the code, we only require 3 data disks, for most of laptops,  they don't have 4 hard drives (1 for OS and 3 for data). So I had to look at workstation or server. Inspired by <a href="https://blogs.technet.microsoft.com/filecab/2016/10/14/kepler-47/">Project Kepler-47</a>  when I prepare my S2D session in Ignite China I found the <a href="https://www.supermicro.com/products/system/midtower/5028/SYS-5028D-TN4T.cfm">SuperMicro's 5028D</a>. (Pictures from <a href="https://tinkertry.com/">https://tinkertry.com/</a>)

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/01.jpg"><img width="251" height="300" class="alignnone wp-image-4105 size-medium" alt="01" src="https://msdnshared.blob.core.windows.net/media/2016/11/01-251x300.jpg" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/11/02.jpg"><img width="300" height="200" class="alignnone size-medium wp-image-4115" alt="02" src="https://msdnshared.blob.core.windows.net/media/2016/11/02-300x200.jpg" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/11/01.jpg"></a>

5028D can meet the majority of Azure Stack PoC hardware requirements. For example, it supports up to 128GB memory, It could have up to 6 hard drives (2 2.5" SSDs/HDDs and 4 3.5" HDDs). Unfortunately 5028D's mother board has a built-in Intel Xeon D-1541 CPU, which is 8 cores and 16 thread processor. Different from Azure Stack TP1, In TP2 the number of cores is hard requirement. The good is SuperMicro also provides the similar mother board but with more built-in cores. For example, <a href="https://www.supermicro.com/products/motherboard/Xeon/D/X10SDV-12C-TLN4F.cfm">X10SDV-12C-TLN4F</a> and <a href="https://www.supermicro.com/products/motherboard/Xeon/D/X10SDV-16C-TLN4F.cfm">X10SDV-16C-TLN4F</a>. Problem Solved!

&nbsp;

Wait... Can it be smaller? The answer is yes. I found <a href="https://www.supermicro.com/products/system/Mini-ITX/SYS-E300-8D.cfm">SuperMicro SYS-E300-8D</a>. It's a 1U mini server. It's even smaller than most of laptops just a little bit thicker. Here are SYS-E300-8D and Surface Pro 3 side by side.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/E300-and-Surface.jpg"><img width="777" height="492" class="alignnone size-full wp-image-4185" alt="e300-and-surface" src="https://msdnshared.blob.core.windows.net/media/2016/11/E300-and-Surface.jpg" /></a>

Dimensions:
<ul>
 	<li>Width 10" (254mm)</li>
 	<li>Height 1.7" (43mm)</li>
 	<li>Depth 8.9" (226mm)</li>
</ul>
&nbsp;

Same as 5028D, it supports 128GB memory. As for CPU, I managed to replace the mother board with the 16C version <a href="https://www.supermicro.com/products/motherboard/Xeon/D/X10SDV-7TP8F.cfm">X10SDV-7TP8F</a>, which includes a 16 Core/32 Thread Intel Xeon D-1587 Processor. Now the challenge is # of disks. Although E300-8D comes with 1 M.2 slot and 1 mSATA slot and 4 SATA ports (the high end mother board even has additional 4 SAS3 ports), the problem is how to put 4 data disk into such small chassis.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/223554onbhmxmlce8lpppc.jpg"><img width="780" height="661" class="alignnone wp-image-4276 size-full" alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/223554onbhmxmlce8lpppc.jpg" /></a>

&nbsp;

The answer is leveraging the 2 PCIe slots in SYS-E300-8D and 1 M.2 slot on the motherboard.  I ordered two Amfeltec M.2 carrier boards.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/191753no4os9kjvv6pnook.jpg"><img width="783" height="587" class="alignnone wp-image-4285 " alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/191753no4os9kjvv6pnook.jpg" /></a>

With those boards I could install 3 M.2 NVMe drives in the mini Azure Stack. You may ask why not insert 4 mSATA drives. Actually deployment script only validates whether or not you have 3 or more data disks. I use SK Hynix PE3110 960GB Enterprise M.2 NVMe SSD because it has Power loss protection. As we all know Azure Stack is built on top of Storage Space Direct. According to Cosmos Darwin's blog below, consumer-grade solid-state drives (SSD) could not deliver the performance we expected on S2D.

https://blogs.technet.microsoft.com/filecab/2016/11/18/dont-do-it-consumer-ssd/

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/191756ehcblhst365x3l6e.jpg"><img width="787" height="590" class="alignnone wp-image-4295 " alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/191756ehcblhst365x3l6e.jpg" /></a>

I use my old 512GB mSATA SSD as my system drive and boot drive. The motherboard also supports SATA-DOM. I even could have two SATA-DOM drives and configure them as RAID1 to provide better reliability.

&nbsp;

Now the little monster perfectly matches the recommend hardware configuration:
<table>
<thead>
<tr>
<td>Component</td>
<td><span>Recommended</span></td>
<td><span>SuperMicro SYS-E300-8D w/ </span><a href="https://www.supermicro.com/products/motherboard/Xeon/D/X10SDV-7TP8F.cfm">X10SDV-7TP8F</a></td>
</tr>
</thead>
<tbody>
<tr>
<td>Disk drives: Operating System</td>
<td>1 OS disk with minimum of 200 GB available for system partition (SSD or HDD)</td>
<td><span>1 OS disk: mSATA 512GB SSD</span></td>
</tr>
<tr>
<td>Disk drives: General Azure Stack POC Data</td>
<td>4 disks. Each disk provides a minimum of 250 GB of capacity (SSD or HDD). All available disks will be used.</td>
<td>3 960GB NVMe SSD</td>
</tr>
<tr>
<td>Compute: CPU</td>
<td>Dual-Socket: 16 Physical Cores (total)</td>
<td><span>Single-Socket: 16 Physical Cores (total)</span></td>
</tr>
<tr>
<td>Compute: Memory</td>
<td>128 GB RAM</td>
<td>128 GB RAM</td>
</tr>
<tr>
<td>Compute: BIOS</td>
<td>Hyper-V Enabled (with SLAT support)</td>
<td>Hyper-V Enabled (with SLAT support)</td>
</tr>
<tr>
<td>Network: NIC</td>
<td>Windows Server 2012 R2 Certification required for NIC; no specialized features required</td>
<td>Windows Server 2012 R2 Certification required for NIC; no specialized features required</td>
</tr>
<tr>
<td>HW logo certification</td>
<td><a href="https://windowsservercatalog.com/results.aspx?&amp;chtext=&amp;cstext=&amp;csttext=&amp;chbtext=&amp;bCatID=1333&amp;cpID=0&amp;avc=79&amp;ava=0&amp;avq=0&amp;OR=1&amp;PGS=25&amp;ready=0" title="">Certified for Windows Server 2012 R2</a></td>
<td><a href="https://windowsservercatalog.com/results.aspx?&amp;chtext=&amp;cstext=&amp;csttext=&amp;chbtext=&amp;bCatID=1333&amp;cpID=0&amp;avc=79&amp;ava=0&amp;avq=0&amp;OR=1&amp;PGS=25&amp;ready=0" title="">Certified for Windows Server 2012 R2</a></td>
</tr>
</tbody>
</table>
&nbsp;

Here is how it looks like eventually.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/191758m5qeywyt5zd5ye4e.jpg"><img width="791" height="593" class="alignnone wp-image-4305 " alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/191758m5qeywyt5zd5ye4e.jpg" /></a>

&nbsp;

Before deployment, I could double check all of the 3 NVMe drives had already been recognized correctly.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/NVMe.png"><img width="791" height="204" class="alignnone wp-image-4325 " alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/NVMe.png" /></a>

&nbsp;

Then I kick-off the deployment script. As we could see the system passed all the pre-checks.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/Pre-CheckTP3.R.png"><img width="802" height="924" class="alignnone  wp-image-4346" alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/Pre-CheckTP3.R.png" /></a>

After 3 hours and 40 minutes, the deployment (TP3 Refresh) completed successfully.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/DeploymentSuccess.png"><img width="811" height="721" class="alignnone wp-image-4335 size-full" alt="" src="https://msdnshared.blob.core.windows.net/media/2016/11/DeploymentSuccess.png" /></a>

&nbsp;

<hr />

Last, I guess I didn't mention that I also replaced the original 84W power adapter w/ a larger power brick (216W) and add the third 13K rpm server fan in the front panel. The total cost is around 4700 USD.

<a href="https://msdnshared.blob.core.windows.net/media/2016/11/52.jpg"><img width="780" height="585" class="alignnone size-full wp-image-4275" alt="5" src="https://msdnshared.blob.core.windows.net/media/2016/11/52.jpg" /></a>]]></content:encoded>
    </item>
    <item>
      <title>The Power of RDMA in Storage Space Direct</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/the-power-of-rdma-in-storage-space-direct-2</link>
      <pubDate>Sun, 11 Sep 2016 09:04:10 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=3855</guid>
      <description><![CDATA[About one year ago, I wrote a blog post "The Power of RDMA in Storage Space Direct". In that post,...]]></description>
      <content:encoded><![CDATA[About one year ago, I wrote a blog post "The Power of RDMA in Storage Space Direct". In that post, I shared the performance improvement I observed (incl. IOPS and latency) and especially great performance consistency (QoS) provided by RDMA capable NICs in Windows Server 2016 TP4.

Given there are lots of improvements from TP4 to TP5 and to RTM. I'd like refresh the content based on latest version of Window Server 2016. In addition, I also refresh the hardware infrastructure as the following:
<h2> Test Environment</h2>
<h3>Hardware</h3>
<ul>
 	<li>ECGCAT-R4-16 (DELL 720, 2 E5-2650, 192GB Memory, 4 600 15K SAS HDD RAID10, 2 EMC P320h 700GB PCIe SSD, 1 Chelsio T580-CR NIC + 1 Mellanox ConnectX-3 NIC</li>
 	<li>ECGCAT-R4-18 (DELL 720, 2 E5-2650, 192GB Memory, 4 600 15K SAS HDD RAID10, 2 EMC P320h 700GB PCIe SSD, 1 Chelsio T580-CR NIC<span> + 1 Mellanox ConnectX-3 NIC</span></li>
 	<li>ECGCAT-R4-20 (DELL 720, 2 E5-2650, 192GB Memory, 4 600 15K SAS HDD RAID10, 2 EMC P320h 700GB PCIe SSD, 1 Chelsio T580-CR NIC<span> + 1 Mellanox ConnectX-3 NIC</span></li>
</ul>
As you could see from the above list, I have both Chelsio T580 NIC (Dual Port, 40G) and Mellanox Connect-3X NIC (Dual Port, 10G). Both of the two NICs are support RDMA. However in this test, Mellanox NICs will be used as normal management NIC (management traffic only). I will use one port of 40Gb Chelsio T580 as the storage NIC. (Actually that's automatic coz Storage Space Direct will automatically use the most approriate network.)
<h3>Software</h3>
Windows Server 2016 Datacenter Edition
<h3>Test Case</h3>
<h4>Raw Performance of Mirrored Space</h4>
<ul>
 	<li>4KB Random IO, 100% Read</li>
 	<li><span>4KB Random IO, 90% Read, 10% Write</span></li>
 	<li><span>4KB Random IO, 70% Read, 30% Write</span></li>
</ul>
<h4>VM Fleet</h4>
<ul>
 	<li>4KB Random IO, 100% Read</li>
 	<li><span>4KB Random IO, 90% Read, 10% Write</span></li>
 	<li><span>4KB Random IO, 70% Read, 30% Write</span></li>
</ul>
<h2>Create Hyper-Converged Storage Space Direct Cluster</h2>
<h3>Assumption</h3>
I before create Storage Space Direct cluster, I had already add the above three physical machines into my domain "infra.lab".
<h3>Create Cluster</h3>
<pre>$nodes = ("ECGCAT-R4-16", "ECGCAT-R4-18", "ECGCAT-R4-20")
icm $nodes {
Install-WindowsFeature -Name Hyper-V, File-Services, Failover-Clustering -IncludeManagementTools -Restart
}
New-Cluster -Name ECGCAT-R4-C1 -Node $nodes -NoStorage -StaticAddress 192.168.20.50</pre>
<h3>Enable S2D and Create Space</h3>
<pre>Enable-ClusterS2D -AutoConfig:0
New-StoragePool -StorageSubSystemFriendlyName *Cluster* -FriendlyName S2D -ProvisioningTypeDefault Fixed -PhysicalDisk (Get-PhysicalDisk | ? CanPool -eq $true)
Get-StoragePool S2D* | Get-PhysicalDisk | Set-PhysicalDisk -Usage AutoSelect
Get-ClusterNode |% {New-Volume -StoragePoolFriendlyName S2D* -FriendlyName $_ -FileSystem CSVFS_ReFS -Size 600GB -PhysicalDiskRedundancy 1}
New-Volume -StoragePoolFriendlyName S2D* -FriendlyName collect -FileSystem CSVFS_ReFS -Size 138GB -PhysicalDiskRedundancy 1</pre>
In the above example, I didn't use Auto Config of S2D coz in some extreme case, S2D might not configure physical disk's usage correctly. In my case, I don't need any cache device. All of the 6 drivs are PCIe SSD. They are extremely fast.

In addition, besides three space used  for test (one for each node), I also create a fourth space called "collect" which  will be used for VM Fleet test.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/120.png"><img width="1024" height="753" class="alignnone size-large wp-image-3865" alt="1" src="https://msdnshared.blob.core.windows.net/media/2016/09/120-1024x753.png" /></a>

As you could see, with RTM build, Create S2D Cluster is pretty easy. Basically you only need three cmdlets, New-Cluster, Enable-ClusterS2D and "New-Volume". Everything else is automatic. If you used iWARP (like the Chelsio T520/T580 NIC),  there is no any RDMA specific configuration. Driver is already built-in in Window Server 2016. No need for DCB or enable PFC on switch. It's pretty much plug and play. You may use the following cmdlet to verify if your NIC is RDMA capable.
<pre>Get-SmbClientNetworkInterface</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/217.png"><img width="1024" height="223" class="alignnone size-large wp-image-3895" alt="2" src="https://msdnshared.blob.core.windows.net/media/2016/09/217-1024x223.png" /></a>
<h2>Enable/Disable RDMA</h2>
I use the following script to disable and enable the RDMA
<pre>$nodes = ("ECGCAT-R4-16", "ECGCAT-R4-18", "ECGCAT-R4-20")
icm $nodes {
Set-Netoffloadglobalsetting -Networkdirect Disabled; `
Update-Smbmultichannelconnection
}

icm $nodes {
Set-Netoffloadglobalsetting -Networkdirect Enabled; `
Update-Smbmultichannelconnection
}</pre>
<h2>Performance of Mirrored Space</h2>
<h3>4KB Random IO, 100% Read</h3>
Run the following command from each of the three nodes and captured the Performance data from Performance Monitor.
<pre>diskspd.exe -c100G -d300 -w0 -t32 -o16 -b4K -r -h -L -D C:\ClusterStorage\VolumeX\IO.dat</pre>
Here is the results of test when RDMA enabled and disabled.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA1.png"><img width="300" height="257" class="alignnone wp-image-3945 size-medium" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA1-300x257.png" /></a>                                 <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA1.png"><img width="300" height="257" class="alignnone wp-image-3955 size-medium" alt="NORDMA1" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA1-300x257.png" /></a>

If we compared the above results, we could see in this scenario, with RDMA enabled, IOPS increased 23.88% and Latency decreased 19.29%. More important, Standard Deviation of Latency decreased 85.52%, which means RDMA can not only provide better performance but also much better consistency. That's critical for Enterprise Applications.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/100R.png"><img width="965" height="292" class="alignnone size-full wp-image-3965" alt="100R" src="https://msdnshared.blob.core.windows.net/media/2016/09/100R.png" /></a>
<h3>4KB Random IO, 90% Read, 10% Write</h3>
<span>Run the following command from each of the three nodes and captured the Performance data from Performance Monitor. </span>
<pre>diskspd.exe -c100G -d300 -w10 -t32 -o16 -b4K -r -h -L -D C:\ClusterStorage\VolumeX\IO.dat</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA2.png"><img width="300" height="257" class="alignnone size-medium wp-image-3985" alt="RDMA2" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA2-300x257.png" /></a>                                 <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA2.png"><img width="300" height="257" class="alignnone wp-image-3975 size-medium" alt="NORDMA2" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA2-300x257.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/09/57.png"></a>

In 90% Read 10% Write scenario, RDMA can provide even larger performance improvements. IOPS increased 32.16% and Latency decreased 24.15%. As for Standard Deviation of Latency, it decreased 88.83%.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/90R.png"><img width="965" height="287" class="alignnone wp-image-3987 size-full" alt="90R" src="https://msdnshared.blob.core.windows.net/media/2016/09/90R.png" /></a>
<h3>4KB Random IO, 70% Read, 30% Write</h3>
<span>Run the following command from each of the three nodes and captured the Performance data from Performance Monitor. </span>
<pre>diskspd.exe -c100G -d300 -w30 -t32 -o16 -b4K -r -h -L -D C:\ClusterStorage\VolumeX\IO.dat</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA3.png"><img width="300" height="257" class="alignnone size-medium wp-image-4005" alt="RDMA3" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA3-300x257.png" /></a>                                <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA3.png"><img width="300" height="258" class="alignnone size-medium wp-image-3995" alt="NORDMA3" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA3-300x258.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/09/64.png"></a>

Same as the above, in 70% Read 30% Write scenario, the testing results w/ RDMA enabled is outstanding. its IOPS increased 63.57% and Latency decreased 38.81%. As for Standard Deviation of Latency, it decreased 92.14%.
<h2>VM Fleet Performance Test</h2>
<h3>Prepare VM Fleet</h3>
If you are not familiar with VM Fleet, you may refer to the my previous post.

https://blogs.technet.microsoft.com/larryexchange/2016/08/17/leverage-vm-fleet-testing-the-performance-of-storage-space-direct/

After install VM Fleet, I use the following cmdlets to prepare the environment. 8 VMs for each node and 24 VMs in total. Each VM has 8 virtual cores and 16GB memory.
<pre>$nodes = ("ECGCAT-R4-16", "ECGCAT-R4-18", "ECGCAT-R4-20")
.\create-vmfleet.ps1 -basevhd "C:\ClusterStorage\collect\VMFleet-ENGWS2016COREG2VM.vhdx" -vms 8 -adminpass User@123 -connectpass User@123 -connectuser "infra\administrator" -nodes $nodes
.\set-vmfleet.ps1 -ProcessorCount 8 -MemoryStartupBytes 16GB -DynamicMemory $false
.\start-vmfleet.ps1</pre>
Open a separate Windows and run the cmdlet ".\watch-cluster.ps1" to monitor the test results.
<h3>4KB Random IO, 100% Read</h3>
Run the following cmdlet and start the test.
<pre>.\start-sweep.ps1 -b 4 -t 1 -o 120 -w 0 -d 300</pre>
Here is how it looks like. Left screen was captured when RDMA was enabled and the right was captured when RDMA disabled.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA11.png"><img width="300" height="121" class="alignnone size-medium wp-image-4015" alt="RDMA11" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA11-300x121.png" /></a>                                <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA11.png"><img width="300" height="122" class="alignnone size-medium wp-image-4016" alt="NORDMA11" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA11-300x122.png" /></a>

When compared two test results, you could RDMA can increase the IOPS 156% in the test scenario.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-100R.png"><img width="481" height="290" class="alignnone wp-image-4025 size-full" alt="VMFleet-100R" src="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-100R.png" /></a>
<h3>4KB Random IO, 90% Read</h3>
Run the following cmdlet and start the test.
<pre>.\start-sweep.ps1 -b 4 -t 1 -o 120 -w 10 -d 300</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA12.png"><img width="300" height="121" class="alignnone size-medium wp-image-4045" alt="RDMA12" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA12-300x121.png" /></a>                                <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA12.png"><img width="300" height="122" class="alignnone size-medium wp-image-4035" alt="NORDMA12" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA12-300x122.png" /></a>

In this case,  RDMA can provide 174% IOPS improvements.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-90R.png"><img width="484" height="293" class="alignnone wp-image-4055 size-full" alt="VMFleet-90R" src="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-90R.png" /></a>
<h3>4KB Random IO, 70% Read</h3>
Run the following cmdlet and start the test.
<pre>.\start-sweep.ps1 -b 4 -t 1 -o 120 -w 30 -d 300</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA13.png"><img width="300" height="122" class="alignnone size-medium wp-image-4075" alt="RDMA13" src="https://msdnshared.blob.core.windows.net/media/2016/09/RDMA13-300x122.png" /></a>                                <a href="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA13.png"><img width="300" height="121" class="alignnone size-medium wp-image-4065" alt="NORDMA13" src="https://msdnshared.blob.core.windows.net/media/2016/09/NORDMA13-300x121.png" /></a>

In this case,  RDMA can provide 133% IOPS improvements.

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-70R.png"><img width="483" height="290" class="alignnone size-full wp-image-4085" alt="VMFleet-70R" src="https://msdnshared.blob.core.windows.net/media/2016/09/VMFleet-70R.png" /></a>
<h2>Conclusion</h2>
Based on the above tests, we could say RDMA can improve the performance dramatically in the IO intensive scenarios.
<h2>Kudo to Chelsio</h2>
Thanks Chelsio for providing their T580-CR in this validation test.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Configure WAP to support new SDN stack on Windows Server 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/configure-wap-to-support-new-sdn-stack-on-windows-server-2016</link>
      <pubDate>Mon, 05 Sep 2016 08:13:57 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=3625</guid>
      <description><![CDATA[Start from UR9, WAP can support Windows Server 2016 and System Center 2016. Different from Windows...]]></description>
      <content:encoded><![CDATA[Start from UR9, WAP can support Windows Server 2016 and System Center 2016. Different from Windows Server 2012 R2, On Windows Server 2016 and System Center 2016, you could have two different SDN deployments. One is based on NVGRE and the other is based on VXLAN. WAP can work with either deployments but providing different functionalities.

Basically, if you use the traditional NVGRE HNV on your Windows Server 2016 and System Center 2016, you can leverage WAP to provide the same self-service capabilities as Windows Server 2012 R2 and System Center 2012 R2. This post will focus on leverage WAP to provide the self-service capabilities on top of the new SDN stack. For more information regarding how to deploy new SDN stack with VMM 2016, please refer my previous posts as below.

https://blogs.technet.microsoft.com/larryexchange/2016/05/30/step-by-step-for-deploying-a-sdnv2-using-vmm-part-1/

https://blogs.technet.microsoft.com/larryexchange/2016/05/30/step-by-step-for-deploying-a-sdnv2-using-vmm-part-2/

https://blogs.technet.microsoft.com/larryexchange/2016/05/31/step-by-step-for-deploying-a-sdnv2-using-vmm-part-3/

https://blogs.technet.microsoft.com/larryexchange/2016/06/01/step-by-step-for-deploying-a-sdnv2-using-vmm-part-4/

With the integration between WAP UR10, Windows Server 2016, System Center Virtual Machine Manager 2016, System Center Service Provider Foundation 2016, it can provide the following self-service capabilities:
<ol>
 	<li>NC based VM network creation and management</li>
 	<li>Outbound and inbound NAT rule configured through SLB</li>
 	<li>S2S IPSec Gateway connectivity</li>
</ol>
<h2>Prerequisites</h2>
<ul>
 	<li>Windows Server 2016</li>
 	<li>VMM 2016</li>
 	<li>SPF 2016 (You may find it from Orchestrator 2016's media.)</li>
 	<li>WAP – UR10</li>
</ul>
You may follow my previous posts to build such environment.
<h2>Configure VMM</h2>
<ol>
 	<li>As as the deployment of WAP+SPF2012 R2+WMM 2012 R2, you need to create a cloud in VMM. In my setup its name is "Infra Cloud".
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/61.png"><img width="938" height="703" class="alignnone size-full wp-image-3675" alt="6" src="https://msdnshared.blob.core.windows.net/media/2016/09/61.png" /></a></li>
 	<li>On the resource tab, select the corresponding host group.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/9.png"><img width="758" height="570" class="alignnone size-full wp-image-3695" alt="9" src="https://msdnshared.blob.core.windows.net/media/2016/09/9.png" /></a></li>
 	<li>In the logical Networks tab, please select HNV logical network
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/71.png"><img width="760" height="568" class="alignnone size-full wp-image-3676" alt="7" src="https://msdnshared.blob.core.windows.net/media/2016/09/71.png" /></a></li>
 	<li>On the capability Profiles tab, clear all the checkboxes.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/8.png"><img width="757" height="569" class="alignnone size-full wp-image-3686" alt="8" src="https://msdnshared.blob.core.windows.net/media/2016/09/8.png" /></a></li>
 	<li>As for the steps didn't mentioned above, you may either use the default option/value or select based on your environment.</li>
 	<li>After you create the cloud, you may want to create a VM in that cloud from VMM Console and make sure the provision could complete successfully.</li>
</ol>
<h2>Install SPF</h2>
In my setup, I installed SPF in the same box of VMM. Before install SPF, I run the PowerShell cmdlet to install the required components and services.
<pre>Import-Module ServerManager
Add-WindowsFeature FileAndStorage-Services,Storage-Services,Web-Server,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Static-Content,Web-Health,Web-Http-Logging,Web-Request-Monitor,Web-Http-Tracing,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Basic-Auth,Web-Url-Auth,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Ftp-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Scripting-Tools,NET-Framework-Features,NET-Framework-Core,NET-Framework-45-Features,NET-Framework-45-Core,NET-Framework-45-ASPNET,NET-WCF-Services45,NET-WCF-HTTP-Activation45,NET-WCF-TCP-PortSharing45,ManagementOdata,FS-SMB1,PowerShellRoot,PowerShell,PowerShell-V2,PowerShell-ISE,WAS,WAS-Process-Model,WAS-Config-APIs,WoW64-Support</pre>
You also need to download and install WCF Data Services 5.0 (OData v3) (https://www.microsoft.com/en-us/download/details.aspx?id=29306) and ASP.NET MVC 4 (https://www.microsoft.com/en-us/download/details.aspx?id=30683)

The rest of the setup steps are same as the SPF 2012 R2.
<h2>Configure WAP Admin Portal</h2>
<ol>
 	<li>On t he WAP Admin portal, clikc VM CLoud and click "Register System Center Service Provider Foundation" on the first page.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/13.png"><img width="1024" height="640" class="alignnone size-large wp-image-3635" alt="1" src="https://msdnshared.blob.core.windows.net/media/2016/09/13-1024x640.png" /></a></li>
 	<li>Input the service URL of your SPF server. In my case, it's https://infra-vmm.infra.lab:8090. Also input the username and password which has the permission to access SPF.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/24.png"><img width="550" height="377" class="alignnone size-full wp-image-3645" alt="2" src="https://msdnshared.blob.core.windows.net/media/2016/09/24.png" /></a></li>
 	<li>Then add the existing VMM server. In my case, it's infra-vmm.infra.lab.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/34.png"><img width="1024" height="640" class="alignnone size-large wp-image-3655" alt="3" src="https://msdnshared.blob.core.windows.net/media/2016/09/34-1024x640.png" /></a></li>
 	<li>Then you can add/configure a Plan to add plan service "Virtual Machine Clouds". (In my setup, the plan is "IaaS".)
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/43.png"><img width="1024" height="640" class="alignnone size-large wp-image-3665" alt="4" src="https://msdnshared.blob.core.windows.net/media/2016/09/43-1024x640.png" /></a></li>
 	<li>You may configure the plan service and use the existing VMM server and Virtual Machine Cloud configured in VMM console. The rest of  the configuration is same as the previous WAP VM Cloud configuration.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/53.png"><img width="1024" height="640" class="alignnone size-large wp-image-3666" alt="5" src="https://msdnshared.blob.core.windows.net/media/2016/09/53-1024x640.png" /></a></li>
</ol>
<h2>Validate from Tenant Portal</h2>
<h3>NC based VM network creation and management</h3>
<ol>
 	<li>Create a Virtual Network &gt; Custom Create.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/10.png"><img width="1024" height="640" class="alignnone size-large wp-image-3705" alt="10" src="https://msdnshared.blob.core.windows.net/media/2016/09/10-1024x640.png" /></a></li>
 	<li>Then give it a name and click Next.</li>
 	<li>Configure its DNS server (in my setup, the DNS server is 192.168.20.3). And click Next.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/111.png"><img width="1024" height="640" class="alignnone size-large wp-image-3706" alt="11" src="https://msdnshared.blob.core.windows.net/media/2016/09/111-1024x640.png" /></a></li>
 	<li>Accept the default address space, which is 10.0.0.0/24. Click OK. Now you will see the Virtual Network Created successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/121.png"><img width="1024" height="640" class="alignnone size-large wp-image-3715" alt="12" src="https://msdnshared.blob.core.windows.net/media/2016/09/121-1024x640.png" /></a></li>
 	<li>Then you may create a new VM to use above new create virtual network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/131.png"><img width="1024" height="640" class="alignnone size-large wp-image-3716" alt="13" src="https://msdnshared.blob.core.windows.net/media/2016/09/131-1024x640.png" /></a></li>
</ol>
<h3>Outbound NAT</h3>
<ol>
 	<li>Click the new created Virtual Network and select the "CONFIGURE" page. Select the checkbox "Enable direct internet access using NAT".
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/14.png"><img width="1024" height="640" class="alignnone size-large wp-image-3725" alt="14" src="https://msdnshared.blob.core.windows.net/media/2016/09/14-1024x640.png" /></a></li>
 	<li>You may login your new created VM in the above virtual network and check if it could access external network
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/15.png"><img width="1024" height="640" class="alignnone size-large wp-image-3735" alt="15" src="https://msdnshared.blob.core.windows.net/media/2016/09/15-1024x640.png" /></a></li>
</ol>
<h3>Inbound NAT</h3>
<ol>
 	<li><span>Click the new created Virtual Network and select the "RULES" page. Add a new rule as below and click OK.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/16.png"><img width="553" height="642" class="alignnone size-full wp-image-3755" alt="16" src="https://msdnshared.blob.core.windows.net/media/2016/09/16.png" /></a></span></li>
</ol>
<h3>S2S IPSec Gateway connectivity</h3>
<ol>
 	<li>Click the new created Virtual Network and select "SITE-TO-SITE VPN" page and click "CREATE VPN".</li>
 	<li>Give it a name and input the remote VPN device's IP address.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/17.png"><img width="791" height="452" class="alignnone size-full wp-image-3765" alt="17" src="https://msdnshared.blob.core.windows.net/media/2016/09/17.png" /></a></li>
 	<li>Specify the address space of remote site.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/18.png"><img width="791" height="451" class="alignnone size-full wp-image-3775" alt="18" src="https://msdnshared.blob.core.windows.net/media/2016/09/18.png" /></a></li>
 	<li>Set the key same as the one you used to configure the remote VPN device.</li>
 	<li>Accept the default value on other pages including using the default "Unlimited" VPN incoming and outgoing bandwidth setting.</li>
 	<li>Click OK to finish the wizard.</li>
 	<li>On the dashboard of the virtual network, you may find the Gateway IP address.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/19.png"><img width="1024" height="640" class="alignnone size-large wp-image-3785" alt="19" src="https://msdnshared.blob.core.windows.net/media/2016/09/19-1024x640.png" /></a></li>
 	<li>You may follow the steps in the following post to configure the remote VPN device.
https://blogs.technet.microsoft.com/larryexchange/2016/06/01/step-by-step-for-deploying-a-sdnv2-using-vmm-part-4/</li>
 	<li>You may connect to VM in the above virtual network and verify the S2S IPSec connection.
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/20.png"><img width="1024" height="768" class="alignnone size-large wp-image-3795" alt="20" src="https://msdnshared.blob.core.windows.net/media/2016/09/20-1024x768.png" /></a></li>
</ol>
<h2>Other SDN functionalities</h2>
<h3>Network Security Group (NSG a.k.a., Distributed Firewall)</h3>
NSG is available as PortACLs in VMM. It is available through powershell not via console. If you want to configure it, please refer to the link below.
https://technet.microsoft.com/system-center-docs/vmm/Manage/Configure-Hyper-V-extended-port-ACLs-with-System-Center-VMM-2016-Technical-Preview
<h3>Software Load Balancer (SLB)</h3>
SNAT works fine with WAP but SLB inbound rule is not included in UR10.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Leverage VM Fleet Testing the Performance of Storage Space Direct</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/leverage-vm-fleet-testing-the-performance-of-storage-space-direct</link>
      <pubDate>Wed, 17 Aug 2016 08:43:57 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=2696</guid>
      <description><![CDATA[Back to 2 years ago, when I worked with Lenovo COSN team to ship their public cloud based on Windows...]]></description>
      <content:encoded><![CDATA[Back to 2 years ago, when I worked with Lenovo COSN team to ship their public cloud based on Windows Server 2012 R2, System Center 2012 R2 and Windows Azure Pack, we worked out a test procedure and a set of test scripts to validate the cloud platform. In order to simulate IO intensive workload, we deployed a bunch of VMs with auto logon scripts. Those auto logon scripts use fio to generate IO right after VM provisioned and started.

Now the project Diskspd (https://github.com/microsoft/diskspd) includes a set of scripts called VM Fleet (https://github.com/Microsoft/diskspd/tree/master/Frameworks/VMFleet), which use the similar mechanism to test the performance of Storage Space Direct.

In this post, I will demonstrate how I use the VM fleet to test the performance of my Hyper-Converged Cluster.

First of all, I deployed a 3-node Storage Space Direct Cluster. Here are the configurations of the testing machines.
<p style="padding-left: 30px">DELL R720 (<span>ECGCAT-R4-22, ECGCAT-R4-24, ECGCAT-R4-26</span>)</p>

<ul>
 	<li>CPU: E5-2650</li>
 	<li>Memory: 192GB</li>
 	<li>Boot Drive: H710 with 4 15K 600GB SAS HDDs (RAID10)</li>
 	<li>Data Drive: Micron P420m 1400GB</li>
 	<li>NIC: Chelsio T580 40Gb (RDMA capable)</li>
</ul>
After running Enable-ClusterS2D , I run the following cmdlet to create 3 CSVs, one for each node.
<pre>Get-ClusterNode |% {New-Volume -StoragePoolFriendlyName S2D* -FriendlyName $_ -FileSystem CSVFS_ReFS -Size 600GB -PhysicalDiskRedundancy 1}</pre>
Then run the cmdlet below to create an addition CSV to store scripts, tools, image and results.
<pre>New-Volume -StoragePoolFriendlyName S2D* -FriendlyName collect -FileSystem CSVFS_ReFS -Size 138GB -PhysicalDiskRedundancy 1</pre>
Then I downloaded Diskspd with VM Fleet from https://github.com/microsoft/diskspd. Copy the VMFleet folder to the one of the node in the above cluster (in my case, I copied it to D:\) and run the script from that node.
<pre>.\install-vmfleet.ps1 -source D:\VMFleet</pre>
Download the latest Diskspd from https://aka.ms/diskspd and copy the DISKSPD.exe into the folder C:\ClusterStorage\Collect\Control\Tools.

Prepared a Server Core VHD with the following steps if you don't have one.
<ol>
 	<li>I used Convert-WindowsImage.ps1 (https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f) to convert a Windows Server 2016 WIM image to a Server Core VHD.</li>
 	<li>Use the above VHD to start a VM and set the initial password. (In my case, I use the password User@123.)</li>
 	<li>Shutdown the VM (DON'T syspreped the  VM.)</li>
 	<li>Copy the VHD to C:\ClusterStorage\Collect\. (In my case, the VHD is ENGWS2016COREG2VM.vhdx.)</li>
</ol>
Run the following script from folder <span>C:\ClusterStorage\Collect\Control\. It created 10 VMs in each node. The step might  take from minutes to hours. It depends on how many VMs you will provision and hardware performance.</span>
<pre>.\create-vmfleet.ps1 -basevhd "C:\ClusterStorage\Collect\ENGWS2016COREG2VM.vhdx" -vms 10 -adminpass User@123 -connectpass User@123 -connectuser "infra\administrator" -nodes "ECGCAT-R4-22","ECGCAT-R4-24","ECGCAT-R4-26"</pre>
I used the script below to change the VM configuration to 8 v-cores and 16GB static memory.
<pre>.\set-vmfleet.ps1 -ProcessorCount 8 -MemoryStartupBytes 16GB -DynamicMemory $false</pre>
Run script below to start all the VMs
<pre>.\start-vmfleet.ps1</pre>
You may check the console of one or more VMs and make sure there is no error.

<a href="https://msdnshared.blob.core.windows.net/media/2016/08/0.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/08/0.png" alt="0" width="992" height="163" class="alignnone size-full wp-image-2705" /></a>

Monitor the storage performance by running script below.
<pre>.\Watch-Cluster.ps1</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/08/125.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/08/125.png" alt="1" width="981" height="138" class="alignnone size-full wp-image-2715" /></a>

Last but the most important, you may stress IO by the script below. Here is an example, all the VMs run Diskspd to test 4KB 100% read random IO for 5 minutes (2 thread, QD=40).
<pre>.\start-sweep.ps1 -b 4 -t 2 -o 40 -w 0 -d 300</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/08/219.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/08/219.png" alt="2" width="980" height="137" class="alignnone size-full wp-image-2725" /></a>

You may also test other IO profile like 4KB random read/write mixed IO (R/W: 70/30), 2 thread, QD=20 with the cmdlet below.
<pre>.\start-sweep.ps1 -b 4 -t 2 -o 20 -w 30 -d 300</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/08/05.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/08/05.png" alt="0" width="979" height="137" class="alignnone size-full wp-image-2745" /></a>

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Deploy S2D Lab w/ Script on One Single Machine</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/deploy-s2d-lab-w-script-on-one-single-machine</link>
      <pubDate>Fri, 08 Jul 2016 02:33:16 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=2685</guid>
      <description><![CDATA[Recently in a local discussion group, people are talking about leveraging VMs  validating the...]]></description>
      <content:encoded><![CDATA[Recently in a local discussion group, people are talking about leveraging VMs  validating the Storage Spaces Direct (S2D) functionalities.  Actually that's not something new. Claus posted a blog two months ago and introduce how to deploy Storage Spaces Direct in Azure (<a href="https://blogs.technet.microsoft.com/filecab/2016/05/05/s2dazuretp5/" target="_blank">https://blogs.technet.microsoft.com/filecab/2016/05/05/s2dazuretp5/</a>).

In this blog I will show you how I deploy a S2D environment on one single machine with script.

Why?
<ul>
	<li>Some of the people don't have 10Gb physical network in the lab but internal and private virtual switch can provide 10Gb link (although due to hardware limitation, they might not always be able to achieve 10Gb/s throughput).</li>
	<li>If you want to demo S2D in an event or a customer meeting, you probably don't want to waste your time troubleshooting  the network connectivity issue.</li>
</ul>
How?

I wrote a script to help me deploy S2D end-to-end environment in a automated way. You may download script from <a href="https://github.com/ostrich75/s2d-lab" target="_blank">https://github.com/ostrich75/s2d-lab </a>. You may also modify it. For example, if you machine don't have 64GB memory, you may want to decrease the memory size of each VM.

If you just want to use it directly, please make sure read the README.MD file. Basically you need a DC and DHCP in the (virtual) network. I also zip and upload my DC and a Syspreped Windows Server 2016 image. You may download it and import it to a Windows Server 2016 TP5 Hyper-V Host.

&nbsp;

I just used the script this morning to deploy a 3-node S2D Hyper-Converged environment on my laptop (Thinkpad P50, i7-6820HQ, 64GB Memory, SM951a NVMe 512GB x2).

Here is a quick test results (for fun only).

<a href="https://msdnshared.blob.core.windows.net/media/2016/07/S2D-Lab@P50.png"><img class="alignnone size-medium wp-image-2695" src="https://msdnshared.blob.core.windows.net/media/2016/07/S2D-Lab@P50-300x281.png" alt="S2D-Lab@P50" width="300" height="281" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Step-by-step for deploying a SDNv2 using VMM - Part 4</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/step-by-step-for-deploying-a-sdnv2-using-vmm-part-4</link>
      <pubDate>Wed, 01 Jun 2016 13:01:57 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=2066</guid>
      <description><![CDATA[In this post, we will walk through the steps to deploy gateways with VMM. Different from the...]]></description>
      <content:encoded><![CDATA[In this post, we will walk through the steps to deploy gateways with VMM. Different from the official guide, besides provide the step-by-step guide, I will also include configuration steps on Enterprise Gateway (a Windows Server 2012 R2 RRAS VM in my setup). Here is the link to the official guide.
<ul>
 	<li><a href="https://technet.microsoft.com/en-us/library/mt703154(v=sc.16).aspx">Deploy a RAS Gateway using VMM</a></li>
</ul>
<h2>Understand IPsec and GRE Gateway in Windows Server 2016</h2>

<hr />

Before you start deployment, I would suggest you review the following links.
<ul>
 	<li><a href="https://technet.microsoft.com/en-us/library/dn765485.aspx">GRE Tunneling in Windows Server Technical Preview</a></li>
 	<li><a href="https://technet.microsoft.com/en-us/library/mt693394(v=ws.12).aspx">RAS Gateway Deployment Architecture</a></li>
 	<li><a href="https://technet.microsoft.com/en-us/library/mt631692.aspx">RAS Gateway High Availability</a></li>
 	<li><a href="https://blogs.technet.microsoft.com/larryexchange/2015/04/26/leverage-gre-tunneling-to-enable-the-multi-tenant-direct-routing-on-windows-server-gateway/">Leverage GRE Tunneling to enable the multi-tenant direct routing on Windows Server Gateway</a></li>
</ul>
<h3>IPSec</h3>
This is what an <strong><u>IPSec configuration</u></strong> looks like logically
<ul>
 	<li>The Top-of-the-Rack switch (or BGP Router in Provider Address space / Private Cloud fabric) is connected to SLB</li>
 	<li>ToR actually has a BGP Peering setup with SLB MUXes to learn all the SLB VIPs that need to be advertised to public network (internet)</li>
 	<li>Tenant’s Enterprise GW connects to this Public VIP and SLB MUX will internally translate it to DIP Address which will belong to one of the Gateway VMs (GW VM’s Transit IP Address)</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-Topo1.jpg"><img width="582" height="307" class="alignnone wp-image-2445 size-full" alt="GW-Topo1" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-Topo1.jpg" /></a>

For this topology, you need to have the BGP Peering setup between ToR and SLB. VMM automatically configures the BGP Peering on SLB when you specify the corresponding information to LB Manager. However, ToR needs to be manually setup to accept connections from SLB MUX VMs.

Once all this is configured, specifying a Public IP Address from the Public VIP Pool in Gateway Manager configuration will cause SLB MUXs to advertise that VIP to ToR and eventually make it available on public network so that enterprise Gateway can come and connect via IPSec  S2S VPN.
<h3>GRE</h3>
For GRE, the SLB is out of the picture and the logical topology looks like this

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-Topo2.jpg"><img width="564" height="304" class="alignnone size-full wp-image-2455" alt="GW-Topo2" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-Topo2.jpg" /></a>
<ul>
 	<li>The only difference here is that Gateway VMs will directly peer with ToR and advertise their own GRE VIPs</li>
 	<li>ToR again needs to be configured to accept connections from all possible Gateway VM Transit IP Addresses.</li>
</ul>
<h3>L3</h3>
For Enterprises that deploy an on-premises private cloud, L3 Gateway can act as a forwarding gateway and route traffic between virtual networks and the physical network. For example, if you have created virtual networks for your R&amp;D department, but there are some key resources (e.g., a hardware appliance, etc.) on your physical network, L3 Gateway can route traffic between the virtual network and the physical network to provide users working on the virtual network with all of the services that they need.

In the illustration below, the physical and virtual networks are at the same physical location. L3 Gateway is used to route traffic between the physical network and virtual networks.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/L3-vlanisolation.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/L3-vlanisolation.png" alt="L3-vlanisolation" width="583" height="245" class="alignnone size-full wp-image-3345" /></a>
<h3>BGP Routing at Enterprise GW</h3>
This BGP Routing is in Customer Address space and is completely different from the ones listed above (in PA space). This BGP config is totally optional and if you don’t have it in your setup, then static routes will work just fine.
<h2 class="subHeading"></h2>
<h2 class="subHeading">Create GRE VIP logical network required for gateway deployment</h2>

<hr />

You need an IP address pool for private VIPs and to assign virtual IP address to GRE endpoints. You will create a GRE VIP Logical network to configure an IP address pool for GRE endpoints.

The GRE VIP network is a subnet that exists solely for defining VIPs that are assigned to gateway virtual machines running on your SDN fabric for a S2S GRE connection type. This network does not need to be pre-configured in your physical switches or router and need not have a VLAN assigned.
<h3 class="subHeading">Create the GRE VIP logical network</h3>
<ol>
 	<li>From the VMM console, start the <strong>Create Logical Network Wizard</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM1.jpg"><img width="1024" height="616" class="alignnone wp-image-2085 size-large" alt="GW-VMM1" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM1-1024x616.jpg" /></a></li>
 	<li>Type a name and optional description for this network and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM2.jpg"><img width="772" height="576" class="alignnone wp-image-2095 size-full" alt="GW-VMM2" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM2.jpg" /></a></li>
 	<li>On the <strong>Settings</strong> page, ensure you select <strong>One Connected Network</strong>. Optionally, you can also check <strong>Create a VM network with the same name</strong> box to allow virtual machines to access this logical network directly and the <strong>Managed by the Network Controller</strong> box then click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM3.jpg"><img width="772" height="576" class="alignnone wp-image-2096 size-full" alt="GW-VMM3" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM3.jpg" /></a></li>
 	<li>On the <strong>Network Site</strong> panel, add the network site information for your VIP subnet. This should include the Host Group and subnet information for your VIP network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN24.png"><img width="757" height="572" class="wp-image-3265 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN24.png" /></a></li>
 	<li>Review the <strong>Summary</strong> information and complete the Logical Network wizard</li>
</ol>
<h3 class="subHeading">Create an IP pool for GRE VIP addresses</h3>
<ol>
 	<li>Right-click the GRE VIP logical network in VMM and select <strong>Create IP Pool</strong> from the drop down menu.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM6.jpg"><img width="1024" height="616" class="alignnone wp-image-2125 size-large" alt="GW-VMM6" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM6-1024x616.jpg" /></a></li>
 	<li>Type a name and optional description for the IP Pool and ensure that the VIP network is selected for the logical network. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN25.png"><img width="759" height="570" class="wp-image-3275 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN25.png" /></a></li>
 	<li>Accept the default network site and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN26.png"><img width="765" height="573" class="wp-image-3276 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN26.png" /></a></li>
 	<li>Choose a starting and ending IP address for your range.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN27.png"><img width="760" height="572" class="wp-image-3295 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN27.png" /></a>
<table>
<tbody>
<tr>
<th style="text-align: left"><img title="System_CAPS_ICON_important.jpg" id="s-e6f6a65cf14f462597b64ac058dbe1d0-system-media-system-caps-icon-important" alt="System_CAPS_ICON_important.jpg" src="https://i-technet.sec.s-msft.com/dynimg/IC160177.jpeg" />Important</th>
</tr>
<tr>
<td>Start your range on the fourth addresses of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .4.</td>
</tr>
</tbody>
</table>
</li>
 	<li>In the <strong>IP addresses reserved for load balancer VIPs</strong> box, type the IP addresses range in the subnet. This should match the range you used for starting and ending IP addresses.</li>
 	<li>You do not need to provide gateway, DNS or WINS information as this pool is used to allocate IP addresses for VIPs only via the network controller, so click <strong>Next</strong> to skip these screens.</li>
 	<li>Review the summary information and complete the wizard.</li>
</ol>
<h2>Deploy Gateway Service</h2>

<hr />

<ol>
 	<li> In VMM, navigate to the <strong>Library</strong>.</li>
 	<li>In the top of the left pane, in the <strong>Templates</strong> section, select <strong>Service Templates</strong>.</li>
 	<li>In the ribbon at the top, click <strong>Import Template</strong>.</li>
 	<li>Browse to your service template folder, select <strong>EdgeServiceTemplate Generation2.xml</strong> and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM11.jpg"><img width="772" height="576" class="alignnone wp-image-2175 size-full" alt="GW-VMM11" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM11.jpg" /></a></li>
 	<li>Update the parameters to reflect the your environment configuration .
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM12.jpg"><img width="772" height="576" class="alignnone wp-image-2185 size-full" alt="GW-VMM12" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM12.jpg" /></a></li>
 	<li>Click <strong>Next</strong>.</li>
 	<li>On the <strong>Summary</strong> page, click <strong>Import</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM13.jpg"><img width="772" height="576" class="alignnone wp-image-2186 size-full" alt="GW-VMM13" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM13.jpg" /></a></li>
 	<li>Same as the pervious blog, if your syspreped image is based on volume license image, you may jump to the step 12.</li>
 	<li>(Optional) If your syspreped image is not based on volume license image, we need to modify the service template and input the product key. You may right click the template and select "Open Designer".</li>
 	<li>Then right click "Windows Server Gateway" and select "Properties".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM14.jpg"><img width="1024" height="768" class="alignnone wp-image-2195 size-large" alt="GW-VMM14" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM14-1024x768.jpg" /></a></li>
 	<li>On "OS Configuration" page, input the product key.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM15.jpg"><img width="850" height="740" class="alignnone wp-image-2205 size-full" alt="GW-VMM15" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM15.jpg" /></a></li>
 	<li>Select the <strong>EdgeServiceTemplate Generation2.xml</strong> service template and click <strong>Configure Deployment</strong> to begin. Type a name and choose a destination for the service instance. The destination must map to a Host Group that contains the hosts configured previously for gateway deployment purposes.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM16.jpg"><img width="1024" height="616" class="alignnone wp-image-2215 size-large" alt="GW-VMM16" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM16-1024x616.jpg" /></a></li>
 	<li>Give the service a name.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN28.png"><img width="440" height="271" class="wp-image-3305 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN28.png" /></a></li>
 	<li>Click <strong>OK</strong>.</li>
 	<li>On the left side of the <strong>Configure Deployment</strong> window, there are a number of settings that you must configure.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN29.png"><img width="1280" height="800" class="wp-image-3315 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN29.png" /></a></li>
 	<li>After you configure these settings, you can click <strong>Deploy Service</strong> to begin the service deployment job. Deployment times will vary depending on your hardware but are typically between 30 and 60 minutes.</li>
 	<li>You may check the result of the deployment and make sure it's successful.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM19.jpg"><img width="1024" height="616" class="alignnone wp-image-2245 size-large" alt="GW-VMM19" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM19-1024x616.jpg" /></a></li>
</ol>
<h2>Configure the Gateway Manager Role</h2>

<hr />

<ol>
 	<li>Open the <strong>Fabric</strong> workspace.</li>
 	<li>Click <strong>Network Service</strong> to display the list of network services installed.</li>
 	<li>Right-click your network controller service and select <strong>Properties</strong>.
<img width="1024" height="616" class="alignnone wp-image-2255 size-large" alt="GW-VMM20" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM20-1024x616.jpg" /></li>
 	<li>Click the <strong>Services</strong> tab and select the <strong>Gateway Manager Role</strong> in the services panel.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/SDN30.png"><img width="761" height="570" class="wp-image-3325 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/06/SDN30.png" /></a></li>
 	<li>Find the <strong>Associated Service</strong> field under <strong>Service information</strong> and click <strong>Browse</strong>.</li>
 	<li>Select the gateway service instance you created earlier and click <strong>OK</strong>.</li>
 	<li><strong>Public IPv4 address</strong>, provide an IP address from the previous pool, and ensure you don’t select the initial 3 IP addressed from the range. In my case, I used 192.168.133.99. (192.168.133.100 had already been used as VIP of SLB in my previous test.)In <strong>Public IPv4 pool</strong>, select the Public IP Pool you configured during the SLB deployment. <span style="color: #ff0000">You will use the IP as the destination IP on the Enterprise gateway.</span></li>
 	<li>In <strong>GRE VIP subnet</strong>, select the VIP subnet that you created previously.</li>
 	<li>Select the <strong>Run As account</strong> that will be used by network controller to access the gateway virtual machines.</li>
 	<li>On each node's configuration page, select the IPv4 Frontend Subnet.</li>
 	<li>Specify the local ASN.</li>
 	<li>Add the peering device info for the BGP peer.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/128.png"><img width="759" height="571" class="alignnone wp-image-3346 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/128.png" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/224.png"><img width="759" height="568" class="alignnone wp-image-3355 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/224.png" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/318.png"><img width="762" height="570" class="alignnone wp-image-3365 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/318.png" /></a></li>
 	<li>Click <strong>OK</strong>. Then check the job "Update network service device" complete successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM25.jpg"><img width="1024" height="616" class="alignnone wp-image-2305 size-large" alt="GW-VMM25" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM25-1024x616.jpg" /></a></li>
</ol>
<h2>Configure BGP Router</h2>

<hr />

Run the script below to add the BGP Peers and Custom Route and make sure all the BGP Peers are connected.
<pre style="padding-left: 30px">add-bgppeer -Name GW01 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.56 -LocalASN 65000 -PeerASN 65011 -OperationMode Mixed -PeeringMode Automatic
add-bgppeer -Name GW02 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.55 -LocalASN 65000 -PeerASN 65012 -OperationMode Mixed -PeeringMode Automatic
add-bgppeer -Name GW03 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.54 -LocalASN 65000 -PeerASN 65013 -OperationMode Mixed -PeeringMode Automatic
get-bgppeer</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/417.png"><img width="810" height="298" class="alignnone wp-image-3375 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/417.png" /></a>

Please also use the cmdlet below to check if the VIP (10.10.10.99) had already been advised to BGP router.
<pre style="padding-left: 30px">Get-BgprouteInformation -type all</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/514.png"><img width="810" height="450" class="alignnone wp-image-3385 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/514.png" /></a>
<h2>Validation</h2>

<hr />

After you deploy the gateway using the VMM template, you can configure S2S GRE, S2S IPSec, or L3 connection types and validate a successful Gateway deployment.
<h3 class="subHeading">Test Case 4: S2S IPSec connection</h3>
A S2S IPSec connection allows you to securely access remote virtual machines and services from your datacenter. Use the following steps to create a S2S IPSec connection. In my case, I had already create a VM network called "VNET-IPSEC" (12.0.0.0/24) and create a VM "TESTVMIPSEC" (12.0.0.4)) in that VM network.
<ol>
 	<li>Open the properties dialog window of an existing VM Network called "VNET-IPSEC".</li>
 	<li>On connectivity page and select the checkbox "Connect to another network through a VPN tunnel". (Optional) You may also enable NAT for that VM network if you want the VM in that VM network to be able to access external network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/613.png"><img width="759" height="568" class="alignnone wp-image-3395 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/613.png" /></a></li>
 	<li>Select the <strong>VPN Connections</strong> tab.</li>
 	<li>Type a subnet as shown in the following diagram. This subnet is used to route packets out of the VM Network. This subnet need not be pre-configured in your datacenter.Click <strong>Add</strong> and select the <strong>IPSec</strong> type connection.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM27.jpg"><img width="772" height="576" class="alignnone wp-image-2325 size-full" alt="GW-VMM27" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM27.jpg" /></a></li>
 	<li>Give the connection a name (e.g., IPSEC-VMM-RTM).</li>
 	<li><span>Type the IP address of the Remote endpoint. In my setup, it's 192.168.30.2, which is the remote IPSec gateway's external IP.</span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/711.png"><img width="759" height="568" class="alignnone wp-image-3405 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/711.png" /></a></li>
 	<li>Select the <strong>Authentication</strong> tab.</li>
 	<li>Choose your preferred authentication method for the connection. If you choose the authentication using ‘Run As Account’, then you need to create a user account with the username of your choice and the IPSec key as the password for the account. Browse and select this account as your Run As Account. In my case, I use the account "Run As". <span style="color: #ff0000">The account's password will be used as IPsec key.</span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/88.png"><img width="758" height="570" class="alignnone wp-image-3415 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/88.png" /></a></li>
 	<li>Select the <strong>Routes</strong> tab and Type all the remote subnets that you need to connect to.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/94.png"><img width="759" height="570" class="alignnone wp-image-3425 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/94.png" /></a></li>
 	<li>You may accept the default setting on Advanced tab. Then click "OK".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/103.png"><img width="759" height="569" class="alignnone wp-image-3435 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/103.png" /></a></li>
 	<li>Make sure the VPN connection for VM Network gateway had already been added successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM32.jpg"><img width="1024" height="616" class="alignnone wp-image-2375 size-large" alt="GW-VMM32" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM32-1024x616.jpg" /></a></li>
 	<li><span style="color: #ff0000">Different from Windows Server 2012 R2, on Windows Server 2016, all the IPSec VPN will share the same external IP, which is the public IP (VIP) you configured on the Gateway Service page of Network Controller's properties dialog window. You cannot see it from individual VM Network's properties any more.
</span><a href="https://msdnshared.blob.core.windows.net/media/2016/06/128.png"><img width="1280" height="800" class="alignnone wp-image-3455 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/128.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/06/1112.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/1112.png" alt="11" width="760" height="570" class="alignnone size-full wp-image-3445" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-VMM411.jpg"></a></li>
</ol>
Now go to the Enterprise Gateway VM. In my case, I used an existing Windows Server 2012 R2 RRAS VM.
<ol>
 	<li>Open Routing and Remote Access console.</li>
 	<li>Right click "Network Interface" and select "New Demand-dial Interface".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS2.jpg"><img width="1024" height="733" class="alignnone wp-image-2625 size-large" alt="GW-RRAS2" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS2-1024x733.jpg" /></a></li>
 	<li>Type a name and click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS3.jpg"><img width="513" height="401" class="alignnone wp-image-2615 size-full" alt="GW-RRAS3" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS3.jpg" /></a></li>
 	<li>Select "Connect using virtual private network (VPN)". Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS4.jpg"><img width="513" height="401" class="alignnone wp-image-2605 size-full" alt="GW-RRAS4" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS4.jpg" /></a></li>
 	<li>Select "IKEv2", click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS5.jpg"><img width="513" height="401" class="alignnone wp-image-2595 size-full" alt="GW-RRAS5" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS5.jpg" /></a></li>
 	<li>Type the VIP of the gateway service. In my case, it's 10.10.10.99.</li>
 	<li>Select the checkbox "Route IP packets on this interface". Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS7.jpg"><img width="513" height="401" class="alignnone wp-image-2575 size-full" alt="GW-RRAS7" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS7.jpg" /></a></li>
 	<li>Add the subnets of the VM network you want to connect to. In my case it's "12.0.0.0/24". Then click "Next".</li>
 	<li>Accept the default setting on the "Dial-Out Credentials" page and click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS9.jpg"><img width="513" height="401" class="alignnone wp-image-2555 size-full" alt="GW-RRAS9" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS9.jpg" /></a></li>
 	<li>Click "Finish".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS10.jpg"><img width="513" height="401" class="alignnone wp-image-2545 size-full" alt="GW-RRAS10" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS10.jpg" /></a></li>
 	<li>Open the properties dialog window of the new created VPN interface. On the Option tab select Connection Type "Persistent connection". Optional you may also modify the dialing policy.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS11.jpg"><img width="377" height="457" class="alignnone wp-image-2535 size-full" alt="GW-RRAS11" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS11.jpg" /></a></li>
 	<li>On the Security tab, select "Use Pre-Shared key for authentication and key in the password. Then click "OK".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS12.jpg"><img width="377" height="457" class="alignnone wp-image-2525 size-full" alt="GW-RRAS12" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS12.jpg" /></a></li>
 	<li>Right click the new created VPN interface and select "Connect".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS13.jpg"><img width="1024" height="733" class="alignnone wp-image-2515 size-large" alt="GW-RRAS13" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS13-1024x733.jpg" /></a></li>
 	<li>Now you will see the interface connected.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS14.jpg"><img width="1024" height="733" class="alignnone wp-image-2505 size-large" alt="GW-RRAS14" src="https://msdnshared.blob.core.windows.net/media/2016/06/GW-RRAS14-1024x733.jpg" /></a></li>
 	<li>You may login the TESTVMIPSEC (12.0.0.4) and check if you could ping enterprise gateway (12.1.1.254) and the VM in the remote network (12.1.1.4).
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/133.png"><img width="1024" height="875" class="alignnone wp-image-3465 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/133.png" /></a></li>
</ol>
<h3 class="subHeading">Test Case 5: To validate S2S GRE connections</h3>
A S2S GRE connection allows you to access remote virtual machines and services from your datacenter. Use the following steps to configure a S2S GRE connection. <span>In my case, I had already create a VM network called "VNET-GRE" </span><span>(11.0.0.0/24) and create a VM "TESTVMGRE" (11.0.0.4)) in that VM network.</span>
<ol>
 	<li>Select the VM Network where you want to configure a S2S GRE connection and click <strong>Connectivity</strong>.</li>
 	<li>Select <strong>Connect to another network through a VPN tunnel</strong>. You may also enable the outbound NAT for the VM Network if you want the VMs in that VM Network to be able to access external network. And select your Network Controller Service for the Gateway Device.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/153.png"><img width="758" height="572" class="alignnone wp-image-3475 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/153.png" /></a></li>
 	<li>Select the <strong>VPN Connections</strong> tab. Click <strong>Add</strong> and then select <strong>GRE</strong> type connection. Type a subnet as shown in the following diagram. This subnet is used to route packets out of the VM Network. This subnet does not need to be preconfigured in your datacenter.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM35.jpg"><img width="772" height="576" class="alignnone wp-image-2405 size-full" alt="GW-VMM35" src="https://msdnshared.blob.core.windows.net/media/2016/05/GW-VMM35.jpg" /></a></li>
 	<li>Give the connection a name. The name used in the example screenshot is <strong>GRE</strong>.</li>
 	<li>Type the IP address of the Remote endpoint. In my setup, it's 192.168.30.3, which is the external IP of the remote GRE gateway.</li>
 	<li>Type the GRE key.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/165.png"><img width="759" height="570" class="alignnone wp-image-3485 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/165.png" /></a></li>
 	<li>Select the <strong>Routes</strong> tab.</li>
 	<li>Type all the remote subnets that you need to connect to.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/175.png"><img width="759" height="568" class="alignnone wp-image-3486 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/175.png" /></a></li>
</ol>
Next we will configure the Enterprise Gateway.

Windows Server 2012 R2 can also support GRE tunneling by install the hofix KB3022776. The hotfix is not public available. You need to open a case to CTS and request the hotfix <a href="https://support.microsoft.com/en-us/kb/3022776"><span style="color: #337ab7">https://support.microsoft.com/en-us/kb/3022776</span></a> .

After install the above hotfix and reboot, please follow the steps below.
<ol>
 	<li>Same as the IPsec Gateway, you could not find the external IP from VMM Console in VMM TP5.</li>
 	<li>You have to access https://&lt;NC Management IP&gt;/Networking/v1/VirtualGateways and download JSON file. Then you may find the sourceIPAddress from the JSON file. That's the external IP of the gateway. In my case, it's 30.30.30.51.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/185.png"><img width="710" height="740" class="alignnone wp-image-3495 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/185.png" /></a></li>
 	<li>Open PowerShell window and run the cmdlet below.
<pre>Add-VpnS2SInterface -Name GREtoTenant -Destination 30.30.30.51 -IPv4Subnet "11.0.0.0/24:100" -GreTunnel -GreKey "1234" -SourceIpAddress: 192.168.30.3</pre>
</li>
 	<li>Run the cmdlet below to verify GRE interface connected and there is traffic on it.
<pre>Get-VpnS2SInterface -name GREtoTenant</pre>
<pre>Get-VpnS2SInterface -Name GREtoTenant | Get-VpnS2SInterfaceStatistics</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/195.png"><img width="756" height="369" class="alignnone wp-image-3505 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/195.png" /></a></li>
 	<li>To validate that your S2S GRE connectivity is configured properly, you may login the TESTVMGRE (11.0.0.4) and try to ping the remote GRE gateway's internal IP (11.1.1.254) and a VM in the remote network (11.1.1.1).
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/2110.png"><img width="529" height="728" class="alignnone wp-image-3525 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/06/2110.png" /></a></li>
</ol>
<h3 class="subHeading">Test Case 6: To validate L3 routing between HNV VM network and VLAN based VM Network</h3>
With L3 Gateway, you may create the direct connection between a HNV VM Network and a VLAN based VM Network. We don't support following scenarios.
<ul>
 	<li>Multiple HNV VM networks connect to the same VLAN based VM Network</li>
 	<li>HNV VM networks connect to the logical network's VM Network directly</li>
</ul>
Before to validate the L3 gateway, you need to first create a NC managed VLAN based VM Network. Here are the detailed steps.
<ol>
 	<li> Right click "Logical Network" and select "Create Logical Network".
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/224.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/224-1024x640.png" alt="22" width="1024" height="640" class="alignnone wp-image-3535 size-large" /></a></li>
 	<li>Give it a name. In my case, I use the name "TENANT101".</li>
 	<li>Select the check box "Create a VM network with the same name to allow virtual machines to access this logical network directly" and "Managed by Microsoft Network Controller".  <span style="color: #ff0000">Please be informed it's different from the traditional VLAN based VM Network</span>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/231.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/231.png" alt="23" width="756" height="571" class="alignnone size-full wp-image-3545" /></a></li>
 	<li>On the "Network Site" tab, select "All Hosts" and input the corresponding VLAN ID and subnet. In my case, VLAN ID is 101 and Subnet is "192.168.11/24". Accept other default values.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/241.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/241.png" alt="24" width="758" height="569" class="alignnone size-full wp-image-3555" /></a></li>
 	<li>On the Summary tab click "Finish".</li>
 	<li>Create a IP Pool under the above new created logical network. Give it a name and accept the default value on the "Network Site" tab.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/251.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/251.png" alt="25" width="760" height="571" class="alignnone size-full wp-image-3565" /></a></li>
 	<li>Configure the Starting IP address and Ending IP address of the IP Pool. In my case, it's 192.168.11.51 and 192.168.11.100.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/261.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/261.png" alt="26" width="759" height="569" class="alignnone size-full wp-image-3575" /></a></li>
 	<li>Insert the default gateway
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/271.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/271.png" alt="27" width="758" height="570" class="alignnone size-full wp-image-3585" /></a></li>
 	<li>Insert the DNS server.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/281.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/281.png" alt="28" width="761" height="571" class="alignnone size-full wp-image-3586" /></a></li>
 	<li>You may skip the WINS configuration and click Finish on Summary tab.</li>
 	<li>Then you may create VM (in my setup , it's TENANT-L3-VM101) in the above new created VM Network.</li>
</ol>
&nbsp;

To configure an L3 connection, use the following sample PowerShell script. You must run this as an administrator on the VMM server:
<pre class="withExpandCollapseButton"><code class="hljs powershell expanded"><span class="hljs-keyword">param</span>(
[Parameter(Mandatory=<span class="hljs-literal">$true</span>)]
<span class="hljs-comment"># Name of the L3 VPN connection</span>
<span class="hljs-variable">$L3VPNConnectionName</span>,
[Parameter(Mandatory=<span class="hljs-literal">$true</span>)]
<span class="hljs-comment"># Name of the VM network to create gateway</span>
<span class="hljs-variable">$VmNetworkName</span>,
[Parameter(Mandatory=<span class="hljs-literal">$true</span>)]
<span class="hljs-comment"># Name of the Next Hop one connected VM network</span>
<span class="hljs-comment"># used for forwarding</span>
<span class="hljs-variable">$NextHopVmNetworkName</span>,
[Parameter(Mandatory=<span class="hljs-literal">$true</span>)]
<span class="hljs-comment"># IPAddresses on the local side that will be used</span>
<span class="hljs-comment"># for forwarding</span>
<span class="hljs-comment"># Format should be @("10.10.10.100/24")</span>
<span class="hljs-variable">$LocalIPAddresses</span>,
[Parameter(Mandatory=<span class="hljs-literal">$true</span>)]
<span class="hljs-comment"># IPAddresses on the remote side that will be used</span>
<span class="hljs-comment"># for forwarding</span>
<span class="hljs-comment"># Format should be @("10.10.10.200")</span>
<span class="hljs-variable">$PeerIPAddresses</span>,
[Parameter(Mandatory=<span class="hljs-literal">$false</span>)]
<span class="hljs-comment"># Subnet for the L3 gateway</span>
<span class="hljs-comment"># default value 10.254.254.0/29</span>
<span class="hljs-variable">$GatewaySubnet</span> = <span class="hljs-string">"10.254.254.0/29"</span>,
[Parameter(Mandatory=<span class="hljs-literal">$false</span>)]
<span class="hljs-comment"># List of subnets for remote tenants to add routes for static routing</span>
<span class="hljs-comment"># Format should be @("14.1.20.0/24","14.1.20.0/24");</span>
<span class="hljs-variable">$RoutingSubnets</span> = @()
)

Import-Module virtualmachinemanager

<span class="hljs-variable">$vmNetwork</span> = Get-SCVMNetwork -Name <span class="hljs-variable">$VmNetworkName</span>;

<span class="hljs-variable">$nextHopVmNetwork</span> = Get-SCVMNetwork -Name <span class="hljs-variable">$NextHopVmNetworkName</span>;

<span class="hljs-variable">$gatewayDevice</span> = Get-SCNetworkGateway | Where {<span class="hljs-variable">$_</span>.Model <span class="hljs-nomarkup">-Match</span> <span class="hljs-string">"Microsoft Network Controller"</span>};

<span class="hljs-variable">$vmNetworkGatewayName</span> = <span class="hljs-variable">$VmNetwork</span>.Name + <span class="hljs-string">"_Gateway"</span>;
<span class="hljs-variable">$VmNetworkGateway</span> = Add-SCVMNetworkGateway -Name <span class="hljs-variable">$vmNetworkGatewayName</span> -EnableBGP <span class="hljs-literal">$false</span> -NetworkGateway <span class="hljs-variable">$gatewayDevice</span>
    -VMNetwork <span class="hljs-variable">$vmNetwork</span> -RoutingIPSubnet <span class="hljs-variable">$GatewaySubnet</span>;

<span class="hljs-variable">$vpnConnection</span> = Add-SCVPNConnection  -NextHopNetwork <span class="hljs-variable">$nexthopvmNetwork</span>  -Name <span class="hljs-variable">$L3VPNConnectionName</span>
    -IPAddresses <span class="hljs-variable">$LocalIPAddresses</span> -PeerIPAddresses <span class="hljs-variable">$PeerIPAddresses</span> -VMNetworkGateway <span class="hljs-variable">$VmNetworkGateway</span> -protocol L3;
<span class="hljs-built_in">Write-Output</span> <span class="hljs-string">"Created VPN Connection "</span> <span class="hljs-variable">$vpnConnection</span>;

<span class="hljs-keyword">foreach</span>(<span class="hljs-variable">$route</span> <span class="hljs-keyword">in</span> <span class="hljs-variable">$RoutingSubnets</span>)
{
    Add-SCNetworkRoute -IPSubnet <span class="hljs-variable">$route</span> -RunAsynchronously -VPNConnection <span class="hljs-variable">$vpnConnection</span>
        -VMNetworkGateway <span class="hljs-variable">$VmNetworkGateway</span>
}</code></pre>
Here is an example:
<pre>.\Config-L3.ps1 -L3VPNConnectionName L3 -VmNetworkName VNET-L3 -NextHopVmNetworkName TENANT101 -LocalIPAddresses @("192.168.11.253/24") -PeerIPAddresses @("192.168.11.254") -GatewaySubnet 10.254.254.0/29 -RoutingSubnets @("192.168.11.0/24")</pre>
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/291.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/291-1024x496.png" alt="29" width="1024" height="496" class="alignnone wp-image-3595 size-large" /></a>

Please be informed that both LocalIPAddresses and PeerIPAddresses are the available addresses in the VLAN based VM Nework.

Now you may login the VM in the VLAN based VM Network（In my setup, it's TENANT-L3-VM101)  and add the following static route
<pre>route ADD 13.0.0.0 MASK 255.255.255.0 192.168.11.253 METRIC 3 -p</pre>
If you don't want to configure the static route, you may also change the default gateway of the above VM to 192.168.11.253.

Last you may test the PING between the two VMs in the VNET-L3 and TENANT101.
<a href="https://msdnshared.blob.core.windows.net/media/2016/06/30.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/06/30.png" alt="30" width="717" height="612" class="alignnone size-full wp-image-3605" /></a>
<h2>Kudo to SDN &amp; VMM team</h2>

<hr />

At end of this blog, I want to show my appreciation to SDN &amp; VMM team who help me a lot during my test, also my teammate Brent Scallan.
<ul>
 	<li>Manish Jha</li>
 	<li>Ramandeep Singh Dhillon</li>
 	<li>Subba Raju Thikkireddy</li>
 	<li>Pradeep Reddy</li>
 	<li>Sanjay Pavan Chaluvadi</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Step-by-step for deploying a SDNv2 using VMM - Part 3</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/step-by-step-for-deploying-a-sdnv2-using-vmm-part-3</link>
      <pubDate>Tue, 31 May 2016 01:49:17 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=1345</guid>
      <description><![CDATA[In this post, we will continue and walk through the steps to deploy SLB. Most of the steps here are...]]></description>
      <content:encoded><![CDATA[In this post, we will continue and walk through the steps to deploy SLB. Most of the steps here are same as the following official validation guide. However I will highlight some of the error-prone steps and provide step-by-step screenshots.
<ul>
 	<li><a href="https://technet.microsoft.com/en-us/library/mt703146(v=sc.16).aspx">Deploy a Software Load Balancer using VMM</a></li>
</ul>
<h2>Create Logical Network "TRANSIT", "Private VIP" and "Public VIP"</h2>

<hr />

&nbsp;
<ol>
 	<li>From the VMM console, start the <strong>Create logical network Wizard</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM1.jpg"><img width="1024" height="616" class="alignnone wp-image-1365 size-large" alt="SLB-VMM1" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM1-1024x616.jpg" /></a></li>
 	<li>Type a name and optional description for this network and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM2.jpg"><img width="772" height="576" class="alignnone wp-image-1385 size-full" alt="SLB-VMM2" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM2.jpg" /></a></li>
 	<li>On the <strong>Settings</strong> page, ensure you select <strong>One Connected Network</strong>. Check <strong>Create a VM network with the same name</strong> box to allow virtual machines to access this logical network directly and the <strong>Managed by the network controller</strong> box then click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM3.jpg"><img width="772" height="576" class="alignnone wp-image-1405 size-full" alt="SLB-VMM3" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM3.jpg" /></a></li>
 	<li>On the <strong>Network Site</strong> panel, add the network site information for your subnet.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN01.png"><img width="761" height="570" class="wp-image-3025 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN01.png" /></a></li>
 	<li>Review the <strong>Summary</strong> information and complete the logical network wizard
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM5.jpg"><img width="772" height="576" class="alignnone wp-image-1445 size-full" alt="SLB-VMM5" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM5.jpg" /></a></li>
 	<li>Create IP Address pool for the new created TRANSIT logical network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM6.jpg"><img width="772" height="576" class="alignnone wp-image-1456 size-full" alt="SLB-VMM6" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM6.jpg" /></a></li>
 	<li>Use the existing network site.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN02.png"><img width="763" height="570" class="wp-image-3035 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN02.png" /></a></li>
 	<li>Set starting IP address 192.168.30.51 and ending IP address 192.168.30.100.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN03.png"><img width="763" height="570" class="wp-image-3045 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN03.png" /></a></li>
 	<li>The default gateway is 192.168.30.1.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN04.png"><img width="763" height="573" class="wp-image-3065 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN04.png" /></a></li>
 	<li>On Summary page, click Finish.</li>
 	<li>Start the <strong>Create logical network Wizard</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM12.jpg"><img width="1024" height="616" class="alignnone wp-image-1515 size-large" alt="SLB-VMM12" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM12-1024x616.jpg" /></a></li>
 	<li>Type a name and optional description for this network. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM13.jpg"><img width="772" height="576" class="alignnone wp-image-1525 size-full" alt="SLB-VMM13" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM13.jpg" /></a></li>
 	<li>On the <strong>Settings</strong> page, ensure you select <strong>One Connected Network</strong>. check <strong>Create a VM network with the same name</strong> box to allow virtual machines to access this logical network directly and the <strong>Managed by the network controller</strong> box then click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM14.jpg"><img width="772" height="576" class="alignnone wp-image-1535 size-full" alt="SLB-VMM14" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM14.jpg" /></a></li>
 	<li>On the <strong>Network Site</strong> panel, add the network site information for your Private VIP logical network. VLAN ID is "0" and in my case the IP subnet is "20.20.20.0/24".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN05.png"><img width="761" height="572" class="wp-image-3066 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN05.png" /></a></li>
 	<li>Review the Summary information and complete the wizard.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM16.jpg"><img width="772" height="576" class="alignnone wp-image-1545 size-full" alt="SLB-VMM16" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM16.jpg" /></a></li>
 	<li>Start the <strong>Create logical network Wizard</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM17.jpg"><img width="1024" height="616" class="alignnone wp-image-1555 size-large" alt="SLB-VMM17" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM17-1024x616.jpg" /></a></li>
 	<li>Type a name and optional description for this network and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM18.jpg"><img width="772" height="576" class="alignnone wp-image-1565 size-full" alt="SLB-VMM18" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM18.jpg" /></a></li>
 	<li>On the <strong>Settings</strong> page, ensure you select <strong>One Connected Network</strong>. Check the <strong>Create a VM network with the same name</strong> box to allow virtual machines to access this logical network directly and the <strong>Managed by the network controller</strong> box. Also select <strong>Public IP Address Network</strong> and then click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM19.jpg"><img width="772" height="576" class="alignnone wp-image-1575 size-full" alt="SLB-VMM19" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM19.jpg" /></a></li>
 	<li>On the <strong>Network Site</strong> panel, add the network site information for your Public VIP network. This should include the Host Group and subnet information for your Public VIP network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN06.png"><img width="761" height="574" class="wp-image-3075 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN06.png" /></a></li>
 	<li>Review the <strong>Summary</strong> information and complete the logical network wizard
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM21.jpg"><img width="772" height="576" class="alignnone wp-image-1595 size-full" alt="SLB-VMM21" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM21.jpg" /></a></li>
 	<li>Right click "Uplink-MGMT" and select Properties.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM22.jpg"><img width="1024" height="616" class="alignnone wp-image-1605 size-large" alt="SLB-VMM22" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM22-1024x616.jpg" /></a></li>
 	<li>Associate this logical network with the Management switch uplink port profile you created during the network controller deployment.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM23.jpg"><img width="772" height="576" class="alignnone wp-image-1615 size-full" alt="SLB-VMM23" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM23.jpg" /></a></li>
</ol>
<h2>Create VIP Pool for Private VIP Logical Network</h2>

<hr />

<ol>
 	<li> Right-click the Private VIP logical network in VMM and select <strong>Create IP Pool</strong> from the drop down menu.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM38.jpg"><img width="1024" height="616" class="alignnone wp-image-1786 size-large" alt="SLB-VMM38" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM38-1024x616.jpg" /></a></li>
 	<li>Provide a name and optional description for the IP Pool and ensure that the Private VIP logical network is selected for the logical network. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM39.jpg"><img width="772" height="576" class="alignnone wp-image-1796 size-full" alt="SLB-VMM39" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM39.jpg" /></a></li>
 	<li>Accept the default network site and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN10.png"><img width="759" height="571" class="wp-image-3105 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN10.png" /></a></li>
 	<li>Choose a starting and ending IP address for your range.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN11.png"><img width="758" height="573" class="wp-image-3115 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN11.png" /></a>
<table>
<tbody>
<tr>
<th style="text-align: left"><img title="System_CAPS_ICON_important.jpg" id="s-e6f6a65cf14f462597b64ac058dbe1d0-system-media-system-caps-icon-important" alt="System_CAPS_ICON_important.jpg" src="https://i-technet.sec.s-msft.com/dynimg/IC160177.jpeg" />Important</th>
</tr>
<tr>
<td><span style="color: #ff0000">Start your range on the fourth addresses of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .4.</span></td>
</tr>
</tbody>
</table>
</li>
 	<li>In the <strong>IP addresses reserved for load balancer VIPs</strong> box, type the IP addresses range in the subnet. This should match the range you used for starting and ending IP addresses.</li>
 	<li>You do not need to provide gateway, DNS or WINS information as this pool is used to allocate IP addresses for VIPs only via the network controller, so click <strong>Next</strong> to skip these screens.</li>
 	<li>Review the summary information and complete the wizard.</li>
</ol>
&nbsp;
<h2>Create VIP Pool for Public VIP Logical Network</h2>

<hr />

<ol>
 	<li>Right-click the Public VIP logical network in VMM and select <strong>Create IP Pool</strong> from the drop down menu.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM43.jpg"><img width="1024" height="616" class="alignnone wp-image-1835 size-large" alt="SLB-VMM43" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM43-1024x616.jpg" /></a></li>
 	<li>Provide a name and optional description for the IP Pool and ensure that the VIP network is selected for the logical network. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM44.jpg"><img width="772" height="576" class="alignnone wp-image-1836 size-full" alt="SLB-VMM44" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM44.jpg" /></a></li>
 	<li>Accept the default network site and click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN12.png"><img width="757" height="573" class="wp-image-3125 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN12.png" /></a></li>
 	<li>Choose a starting and ending IP address for your range.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN13.png"><img width="761" height="571" class="wp-image-3135 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN13.png" /></a>
<table>
<tbody>
<tr>
<th style="text-align: left"><img title="System_CAPS_ICON_important.jpg" id="s-e6f6a65cf14f462597b64ac058dbe1d0-system-media-system-caps-icon-important" alt="System_CAPS_ICON_important.jpg" src="https://i-technet.sec.s-msft.com/dynimg/IC160177.jpeg" />Important</th>
</tr>
<tr>
<td>Start your range on the fourth addresses of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .4.</td>
</tr>
</tbody>
</table>
</li>
 	<li>In the <strong>IP addresses reserved for load balancer VIPs</strong> box, type the IP addresses range in the subnet. This should match the range you used for starting and ending IP addresses.</li>
 	<li>You do not need to provide gateway, DNS or WINS information as this pool is used to allocate IP addresses for VIPs only via the network controller, so click <strong>Next</strong> to skip these screens.</li>
 	<li>Review the summary information and complete the wizard</li>
 	<li>Now you had already configured all the logical network and IP pool.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM48.jpg"><img width="1024" height="616" class="alignnone wp-image-1866 size-large" alt="SLB-VMM48" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM48-1024x616.jpg" /></a></li>
</ol>
<h2>Create SLB service</h2>

<hr />

<ol>
 	<li>In the VMM console, navigate to <strong>Library</strong>.</li>
 	<li>In the top of the left pane, in the <strong>Templates</strong> section, select <strong>Service Templates</strong>.</li>
 	<li>In the ribbon at the top, click <strong>Import Template</strong>.</li>
 	<li>Browse to your service template directory, select the <strong>SLB Production Generation 2 VM.xml</strong> file and follow the prompts to import it.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM01.jpg"><img width="772" height="576" class="alignnone wp-image-1355 size-full" alt="SLB-VMM01" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM01.jpg" /></a></li>
 	<li>This service template uses the following virtual machine configuration parameters. Update the parameters to reflect your environment configuration.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM02.jpg"><img width="772" height="576" class="alignnone wp-image-1375 size-full" alt="SLB-VMM02" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM02.jpg" /></a></li>
 	<li>On Summary, click "Import".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM03.jpg"><img width="772" height="576" class="alignnone wp-image-1395 size-full" alt="SLB-VMM03" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM03.jpg" /></a></li>
 	<li><span style="color: #ff0000">If your syspreped image is based on volume license image, you may jump to step 11.</span></li>
 	<li>(Optional) If your syspreped image is not based on volume license image, you need to modify the service template and input the product key. Right click "SlbMuxServiceTemplate" and select "Open Designer".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM04.jpg"><img width="1024" height="616" class="alignnone wp-image-1415 size-large" alt="SLB-VMM04" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM04-1024x616.jpg" /></a></li>
 	<li>Right click "Software Load Balancer" and select "Properties".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM05.jpg"><img width="1024" height="768" class="alignnone wp-image-1435 size-large" alt="SLB-VMM05" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM05-1024x768.jpg" /></a></li>
 	<li>Type the product key.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM06.jpg"><img width="850" height="740" class="alignnone wp-image-1455 size-full" alt="SLB-VMM06" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM06.jpg" /></a></li>
 	<li>Right click "Software Load Balancer" and select "Configure Deployment".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM24.jpg"><img width="1024" height="616" class="alignnone wp-image-1625 size-large" alt="SLB-VMM24" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM24-1024x616.jpg" /></a></li>
 	<li>Type the name "SLB-VMM-RTM". Select the corresponding Transit network and Management network.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN07.png"><img width="439" height="497" class="wp-image-3085 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN07.png" /></a></li>
 	<li>Configure the settings in the page below. Then click "Refresh". Then click "Deploy Service".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN08.png"><img width="1024" height="640" class="alignnone wp-image-3086 size-large" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN08-1024x640.png" /></a></li>
 	<li><a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM27.jpg"></a>Make sure the deployment complete successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM28.jpg"><img width="1024" height="616" class="alignnone wp-image-1646 size-large" alt="SLB-VMM28" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM28-1024x616.jpg" /></a></li>
 	<li>Open the <strong>Fabric</strong> workspace.</li>
 	<li>Click <strong>Network Service</strong> to display the list of network services installed.</li>
 	<li>Right-click the <strong>network controller</strong> service and select <strong>Properties</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM29.jpg"><img width="1024" height="616" class="alignnone wp-image-1705 size-large" alt="SLB-VMM29" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM29-1024x616.jpg" /></a></li>
 	<li>In the Wizard, Select the <strong>Services</strong> tab, and then click <strong>Load Balancer Role</strong>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM30.jpg"><img width="772" height="576" class="alignnone wp-image-1715 size-full" alt="SLB-VMM30" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM30.jpg" /></a></li>
 	<li>Find the <strong>Associated Service</strong> field under <strong>Service information</strong> and click <strong>Browse</strong>. Select the SLB/MUX service instance you created earlier and click <strong>OK</strong>.</li>
 	<li>Choose the appropriate Run as Account.</li>
 	<li> For the <strong>Management IP address</strong>, <span style="color: #ff0000">use the last IP address from the Private VIP pool you created earlier.</span> In my case, it's 20.20.20.100. In addition, please select Public IP pool and private IP pool you just created. VMM will advertise those VIP address pools to the SLB Manager.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN09.png"><img width="764" height="572" class="wp-image-3095 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN09.png" /></a></li>
 	<li>Click the SLB/MUX instance listed under <strong>Load Balancer Role</strong> in the wizard.</li>
 	<li>Type the local ASN for your datacenter and details for the devices or BGP peers the SLB/MUX can peer with. Y<span style="color: #000000">ou should use the Transit network for BGP peering. (In TP5, we use MGMT network for BGP Peering.) </span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN14.png"><img width="761" height="568" class="wp-image-3145 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN14.png" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN15.png"><img width="759" height="570" class="wp-image-3155 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN15.png" /></a>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN16.png"><img width="760" height="571" class="wp-image-3165 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN16.png" /></a></li>
 	<li>Make sure associate service instance with fabric role.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM36.jpg"><img width="1024" height="616" class="alignnone wp-image-1766 size-large" alt="SLB-VMM36" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM36-1024x616.jpg" /></a></li>
 	<li>The SLB Service instance is now associated with the SLBM service, and you should see the SLB/MUX virtual machine instance with all the settings listed under the <strong>Load Balancer role</strong>.</li>
</ol>
&nbsp;
<h2>Configure BGP Router</h2>

<hr />

W may use Windows Server 2016 RRAS as the BGP Router. Assume RRAS role had already been installed on the BGP VM (In my case, it's "INFRA-BGPNAT". Run the script below to configure the BGP router.
<pre style="padding-left: 30px">Add-BgpRouter -BgpIdentifier 192.168.30.1 -LocalASN 65000</pre>
<pre style="padding-left: 30px">add-bgppeer -Name MUX001 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.53 -LocalASN 65000 -PeerASN 65001 -OperationMode Mixed -PeeringMode Automatic
add-bgppeer -Name MUX002 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.52 -LocalASN 65000 -PeerASN 65002 -OperationMode Mixed -PeeringMode Automatic
add-bgppeer -Name MUX003 -LocalIPAddress 192.168.30.1 -PeerIPAddress 192.168.30.51 -LocalASN 65000 -PeerASN 65003 -OperationMode Mixed -PeeringMode Automatic</pre>
You may use cmdlet Get-BgpPeer to check if they're connected.

<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN17.png"><img width="810" height="158" class="wp-image-3175 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN17.png" /></a>

&nbsp;
<h2>Create a VIP Template</h2>

<hr />

Use the following procedure to create a VIP template.
<ol>
 	<li>Navigate to the <strong>Fabric Workspace</strong> in the VMM console.</li>
 	<li>Right click the <strong>VIP Templates</strong> node and select <strong>Create VIP Template</strong>, or alternately you can click the <strong>Create VIP Template</strong> in the ribbon toolbar.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM50.jpg"><img width="1024" height="616" class="alignnone wp-image-1886 size-large" alt="SLB-VMM50" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM50-1024x616.jpg" /></a></li>
 	<li>Type a name in the <strong>Template Name</strong> field and an optional description in the <strong>Description</strong> field.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM51.jpg"><img width="772" height="576" class="alignnone wp-image-1896 size-full" alt="SLB-VMM51" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM51.jpg" /></a></li>
 	<li>In the <strong>Virtual IP Port</strong> field, provide a value for the port you wish to test.</li>
 	<li>For the <strong>Backend Port</strong>, provide a value for the port from which you wish to map traffic on the back end.</li>
 	<li>Click <strong>Next</strong>.</li>
 	<li>On the <strong>Specify a Template Type</strong> screen, click <strong>Specific</strong>, and select <strong>Microsoft</strong> for the <strong>Manufacturer</strong> and for the <strong>Model</strong>, select <strong>Microsoft network controller</strong>. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM52.jpg"><img width="772" height="576" class="alignnone wp-image-1905 size-full" alt="SLB-VMM52" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM52.jpg" /></a></li>
 	<li>On the <strong>Specify Protocol Options</strong> screen, select the <strong>Custom</strong> option and type <strong>TCP</strong> in the <strong>Protocol Name</strong> field. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM53.jpg"><img width="772" height="576" class="alignnone wp-image-1915 size-full" alt="SLB-VMM53" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM53.jpg" /></a></li>
 	<li>You can optionally select <strong>enable persistence</strong> if you wish to have the load balancer make the connection from the client “sticky”. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM54.jpg"><img width="772" height="576" class="alignnone wp-image-1916 size-full" alt="SLB-VMM54" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM54.jpg" /></a></li>
 	<li>For the <strong>Load Balancing method</strong>, select <strong>Round Robin</strong> from the drop down list. Click <strong>Next</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM55.jpg"><img width="772" height="576" class="alignnone wp-image-1925 size-full" alt="SLB-VMM55" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM55.jpg" /></a></li>
 	<li>On<strong> Health Monitors</strong> page, click <strong>Next</strong> to move past this screen.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM56.jpg"><img width="772" height="576" class="alignnone wp-image-1935 size-full" alt="SLB-VMM56" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM56.jpg" /></a></li>
 	<li>Confirm your settings and then click <strong>Finish</strong> when you are ready to create the VIP Template.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM57.jpg"><img width="772" height="576" class="alignnone wp-image-1945 size-full" alt="SLB-VMM57" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM57.jpg" /></a></li>
</ol>
&nbsp;
<h2>Validation</h2>

<hr />

<h3>Test Case 2: SLB</h3>
The following sample PowerShell script creates a VIP for two virtual machines (TESTVMSLB1 and TESTVMSLB2). The script should be run on the VMM server, or on a computer running the VMM Console.
<pre style="padding-left: 30px">param(</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# Name of the Network Controller Network Service
# This value should be the name you gave the Network Controller service
# when you on-boarded the Network Controller to VMM
$LBServiceName = "NC",</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# Name of the VM instances to which you want to assign the VIP
$VipMemberVMNames =  @("TESTVMSLB1","TESTVMSLB2"),</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# VIP address you want to assign from the VIP pool.
# Pick any VIP that falls within your VIP IP Pool range.
$VipAddress = "10.10.10.100",</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# Name of the VIP VM Network
$VipNetworkName = "PublicVIP",</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# The name of the VIP template you created via the VMM Console.
$VipTemplateName = "WEB",</pre>
<pre style="padding-left: 30px">[Parameter(Mandatory=$false)]
# Arbitrary but good to match the VIP you're using.
$VipName = "scvmm_10_10_10_100_80"</pre>
<pre style="padding-left: 30px">)</pre>
<pre style="padding-left: 30px">Import-Module virtualmachinemanager</pre>
<pre style="padding-left: 30px">$lb = Get-scLoadBalancer | where { $_.Service.Name -like $LBServiceName};
$vipNetwork = get-scvmnetwork -Name $VipNetworkName;</pre>
<pre style="padding-left: 30px">$vipMemberNics = @();
foreach ($vmName in $VipMemberVMNames)
{
$vm = get-scvirtualmachine -Name $vmName;
#    if ($vm.VirtualNetworkAdapters[0].VMNetwork.ID -ne $vipNetwork.ID)
#    {
#        $vm.VirtualNetworkAdapters[0] | set-scvirtualnetworkadapter -VMNetwork $vipNetwork;
#    }</pre>
<pre style="padding-left: 30px">$vipMemberNics += $vm.VirtualNetworkAdapters[0];
}</pre>
<pre style="padding-left: 30px">$existingVip = get-scloadbalancervip -Name $VipName
if ($existingVip -ne $null)
{
#    foreach ($mem in $existingVip.VipMembers)
#    {
#        $mem | remove-scloadbalancervipmember;
#    }</pre>
<pre style="padding-left: 30px">$existingVip | remove-scloadbalancervip;
}</pre>
<pre style="padding-left: 30px">$vipt = get-scloadbalancerviptemplate -Name $VipTemplateName;</pre>
<pre style="padding-left: 30px">$vip = New-SCLoadBalancerVIP -Name $VipName -LoadBalancer $lb -IPAddress $VipAddress -LoadBalancerVIPTemplate $vipt -FrontEndVMNetwork $vipNetwork -BackEndVirtualNetworkAdapters $vipMemberNics;
Write-Output "Created VIP " $vip;</pre>
<pre style="padding-left: 30px">$vip = get-scloadbalancervip -Name $VipName;
Write-Output "VIP with members " $vip;</pre>
After create and assign public VIP to the above test VMs, you may run the cmdlet from BGP VM to verify the routing information to 10.10.10.100 had already been advertised to BGP router.

<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN18.png"><img width="570" height="208" class="size-full wp-image-3185 alignnone" alt="SDN18" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN18.png" /></a>

In order to validate the SLB functionality, you may install Web role on both TESTVMSLB1 and TESTVMSLB2. Then verify you are able to access https://10.10.10.100.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN20.png"><img width="1280" height="800" class="wp-image-3225 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN20.png" /></a>

&nbsp;
<h3>Test Case 3: SNAT</h3>
After you deploy and on-board the Software Load Balancer as a Network Service using VMM, you can use the VMM user interface to configure both inbound and outbound NAT rules.

Use the following steps to configure NAT:
<ol>
 	<li>Open the VMM Administrator console and select the <strong>VMs and Services</strong> tab.</li>
 	<li>Select the <strong>VM Networks</strong> tab and then double click the VM network you want to configure with NAT rules.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN21.png"><img width="1280" height="800" class="wp-image-3235 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN21.png" /></a></li>
 	<li>Select the <strong>Connectivity</strong> tab on the property wizard.</li>
 	<li>Check <strong>Connect directly to an additional Network</strong> and select <strong>Network Address Translation (NAT)</strong>.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM60.jpg"><img width="772" height="576" class="alignnone wp-image-1975 size-full" alt="SLB-VMM60" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM60.jpg" /></a></li>
 	<li>In <strong>Gateway Device</strong>, select your network controller service name.</li>
 	<li>Select the <strong>Network Address Translation</strong> tab. Then select the public IP pool.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN22.png"><img width="761" height="569" class="wp-image-3245 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN22.png" /></a></li>
 	<li>In the <strong>IP address pool</strong> field, choose your Public VIP pool.</li>
 	<li>Leave the IP address field empty. A VIP address will be automatically assigned to this rule.</li>
 	<li>Make sure add VM Network gateway successfully. And add the corresponding NAT rules successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM62.jpg"><img width="1024" height="616" class="alignnone wp-image-1995 size-large" alt="SLB-VMM62" src="https://msdnshared.blob.core.windows.net/media/2016/05/SLB-VMM62-1024x616.jpg" /></a></li>
 	<li>You may also check the NAT connection and NAT rules with PowerShell.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN23.png"><img width="830" height="330" class="wp-image-3255 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN23.png" /></a></li>
 	<li>You may also verify both inbound NAT and outbound NAT work as expected.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/BGP12.jpg"><img width="800" height="600" class="alignnone wp-image-2065 size-full" alt="BGP1" src="https://msdnshared.blob.core.windows.net/media/2016/05/BGP12.jpg" /></a></li>
</ol>
<h2>To Be Continued...</h2>

<hr />

In the next post we will walk through gateway deployments.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Step-by-step for deploying a SDNv2 using VMM - Part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/larryexchange/step-by-step-for-deploying-a-sdnv2-using-vmm-part-2</link>
      <pubDate>Mon, 30 May 2016 22:08:29 GMT</pubDate>
      <dc:creator><![CDATA[Larry Zhang (L.)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/larryexchange/?p=177</guid>
      <description><![CDATA[In the previous post, we talked about how to prepare a SDN lab environment. In this post, we will...]]></description>
      <content:encoded><![CDATA[In the previous post, we talked about how to prepare a SDN lab environment. In this post, we will continue and deploy NC in the lab environment. Most of the steps here are same as the following official validation guides. However I will highlight some of the error-prone steps and provide step-by-step screenshots. Hopefully it could help you walk through the SDN deployment.
<ul>
 	<li><a href="https://technet.microsoft.com/en-us/library/mt729074(v=sc.16).aspx">Deploy a Network Controller using VMM</a></li>
</ul>
<h2>Add Hyper-V Hosts to the VMM</h2>

<hr />

<ol>
 	<li>Open VMM Console, click "Fabric" and expand the "Servers &gt; All Hosts".</li>
 	<li>Right click the "All Hosts" and select "Add Hyper-V Hosts and Clusters"
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM1.jpg"><img width="1024" height="616" class="alignnone wp-image-185 size-large" alt="NC-VMM1" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM1-1024x616.jpg" /></a></li>
 	<li>Select "Windows Server computer in a trusted Active Directory domain".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM2.jpg"><img width="772" height="645" class="alignnone wp-image-195 size-full" alt="NC-VMM2" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM2.jpg" /></a></li>
 	<li>In the next page, I created a Run As account, which is also a member domain admins group (That's not recommended for production environment.).
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM6.jpg"><img width="772" height="645" class="alignnone wp-image-235 size-full" alt="NC-VMM6" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM6.jpg" /></a></li>
 	<li>Key in the computer name of the each Hyper-V hosts. Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM7.jpg"><img width="772" height="645" class="alignnone wp-image-245 size-full" alt="NC-VMM7" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM7.jpg" /></a></li>
 	<li>Click the button "Select All", then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM8.jpg"><img width="772" height="645" class="alignnone wp-image-246 size-full" alt="NC-VMM8" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM8.jpg" /></a></li>
 	<li>Select the checkbox "Re-associate this host with this VMM environment" and add the C:\ as the VM placement path.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM9.jpg"><img width="772" height="645" class="alignnone wp-image-255 size-full" alt="NC-VMM9" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM9.jpg" /></a></li>
 	<li>On next page confirm the settings and click "Finish".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM10.jpg"><img width="772" height="645" class="alignnone wp-image-265 size-full" alt="NC-VMM10" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM10.jpg" /></a></li>
 	<li>Now you could see VMM is adding those Hyper-V hosts to the VMM environment.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM11.jpg"><img width="1024" height="592" class="alignnone wp-image-275 size-large" alt="NC-VMM11" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM11-1024x592.jpg" /></a></li>
 	<li>After the above 4 jobs complete, you would see 4 Hyper-V hosts in the "All Hosts" group.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM12.jpg"><img width="1024" height="616" class="alignnone wp-image-285 size-large" alt="NC-VMM12" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM12-1024x616.jpg" /></a></li>
</ol>
&nbsp;
<h2>Create Logical Network and Logical Switch for "MGMT"</h2>

<hr />

<ol>
 	<li>Right click "Networking &gt; Logical Network" and select "Create Logical Network".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM13.jpg"><img width="1024" height="616" class="alignnone wp-image-295 size-large" alt="NC-VMM13" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM13-1024x616.jpg" /></a></li>
 	<li>Type the name "MGMT".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM14.jpg"><img width="772" height="576" class="alignnone wp-image-305 size-full" alt="NC-VMM14" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM14.jpg" /></a></li>
 	<li>Select the checkbox "Create a VM network with the same name to allow virtual machines to access this logical network directly.". Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM15.jpg"><img width="772" height="576" class="alignnone wp-image-315 size-full" alt="NC-VMM15" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM15.jpg" /></a></li>
 	<li>Select the host group "All Hosts" and add the VLAN (ID=0, IP Subnet = 192.168.2.0/24).
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN2.png"><img width="759" height="570" class="wp-image-2765 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN2.png" /></a></li>
 	<li>Confirm the settings and click "Finish".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM17.jpg"><img width="772" height="576" class="alignnone wp-image-335 size-full" alt="NC-VMM17" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM17.jpg" /></a></li>
 	<li>Right click the logical network you just created. Select "Create IP Pool".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM18.jpg"><img width="1024" height="616" class="alignnone wp-image-345 size-large" alt="NC-VMM18" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM18-1024x616.jpg" /></a></li>
 	<li>Give it a name "IPPool-MGMT". Click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM19.jpg"><img width="772" height="576" class="alignnone wp-image-347 size-full" alt="NC-VMM19" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM19.jpg" /></a></li>
 	<li><span>Accept the default Network Site, click "Next".
</span></li>
 	<li>Configure the IP pool start from 192.168.20.51 and end at 192.168.20.100. Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN3.png"><img width="760" height="570" class="wp-image-2785 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN3.png" /></a></li>
 	<li>Insert the default gateway address 192.168.20.1. Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN4.png"><img width="759" height="573" class="wp-image-2795 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN4.png" /></a></li>
 	<li>Insert the DNS server address 192.168.20.3. Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN5.png"><img width="758" height="571" class="wp-image-2805 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN5.png" /></a></li>
 	<li>You don't need specify WINS. Just click "Next" and confirm the settings on the next page. Last click "Finish".</li>
 	<li>Right click "Network &gt; Port Profiles", select "Create Hyper-V Port Profile".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM25.jpg"><img width="1024" height="616" class="alignnone wp-image-395 size-large" alt="NC-VMM25" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM25-1024x616.jpg" /></a></li>
 	<li>Give it a name "Uplink-MGMT". Select the option "Uplink port profile".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/112.png"><img width="759" height="571" class="alignnone wp-image-3805 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/05/112.png" /></a></li>
 	<li>Select the site "MGMT_0". <span style="color: #ff0000">DO NOT select the checkbox "Enable Hyper-V Networking Virtualization".</span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM27.jpg"><img width="772" height="576" class="alignnone wp-image-406 size-full" alt="NC-VMM27" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM27.jpg" /></a></li>
 	<li>On the confirm the settings page, click "Finish".</li>
 	<li>Right click "Networking &gt; Logical Switch" and select "Create Logical Switch".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM29.jpg"><img width="1024" height="616" class="alignnone wp-image-425 size-large" alt="NC-VMM29" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM29-1024x616.jpg" /></a></li>
 	<li>Type the name "SDN-Switch" and Select Uplink mode "Embedded Team"
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN6.png"><img width="760" height="572" class="wp-image-2815 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN6.png" /></a></li>
 	<li>On the next page, accept the default setting and click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM31.jpg"><img width="772" height="576" class="alignnone wp-image-445 size-full" alt="NC-VMM31" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM31.jpg" /></a></li>
 	<li><span style="color: #ff0000">Clear the checkbox "Microsoft Window Filtering Platform".</span> New SDN stack uses Virtual Filtering Platform (VFP) from Azure instead of the default Windows Filtering Platform.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM32.jpg"><img width="772" height="576" class="alignnone wp-image-455 size-full" alt="NC-VMM32" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM32.jpg" /></a></li>
 	<li>In this test, I don't use any virtual port. So I skip the Virtual Port page.</li>
 	<li>On the Uplink page, click "Add &gt; Existing Uplink Port Profile".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM34.jpg"><img width="772" height="576" class="alignnone wp-image-475 size-full" alt="NC-VMM34" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM34.jpg" /></a></li>
 	<li>Select the uplink profile we just created. It's Uplink-MGMT in my case.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/25.png"><img width="456" height="444" class="alignnone wp-image-3815 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/05/25.png" /></a></li>
 	<li>Click the button "New Virtual Network Adapter". Type the name "MGMT". Select the checkbox "This virtual network adapter will be used for host management" and "Inherit connection settings from host network adapter". Since I have DHCP server available in the management VLAN, I selected "DHCP" as my IP address configuration. If you don't have DHCP, you may select "Static" and select the corresponding IP pool (e.g., "IPPool-MGMT").
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN7.png"><img width="761" height="571" class="wp-image-2825 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN7.png" /></a></li>
 	<li>Right click one of the Host and select "Properties".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM37.jpg"><img width="1024" height="616" class="alignnone wp-image-485 size-large" alt="NC-VMM37" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM37-1024x616.jpg" /></a></li>
 	<li>Click "Virtual Switch" and click the button "New Virtual Switch". Then select "New Logical Switch".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM38.jpg"><img width="772" height="600" class="alignnone wp-image-486 size-full" alt="NC-VMM38" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM38.jpg" /></a></li>
 	<li>Bind the logical switch to the corresponding NICs. In my case, I have one NIC on the host. If you have multiple NICs, you may add them to the "Physical Adapters" list.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN8.png"><img width="758" height="592" class="wp-image-2835 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN8.png" /></a></li>
 	<li>Use the same procedure you may bind logical switch "SDN-Switch" to the rest hosts.</li>
 	<li><span style="color: #ff0000">Remove the VLAN ID from all the physical NICs which bind to the above logical switch.</span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/128.png"><img width="419" height="541" class="alignnone size-full wp-image-3335" alt="1" src="https://msdnshared.blob.core.windows.net/media/2016/05/128.png" /></a></li>
</ol>
&nbsp;
<h2>Create NC Network Service</h2>

<hr />

<ol>
 	<li>Copy a syspreped Windows Server 2016 image to the share folder of VMM VM \\localhost\MSSCVMMLibrary\VHDs. Volume License (VL) image is recommended. Otherwise you would have to modify the service template later and input the product key.</li>
 	<li>Download the SDN VMM template. Unzip the compressed file and copy the folder GW, NC and SLB to the share folder \\localhost\MSSCVMMLibrary\
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN9.png"><img width="933" height="595" class="wp-image-2845 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN9.png" /></a></li>
 	<li>Run the script below create a self-signed certificate and export two version of the certificate (cer and pfx) to C:\. Then copy the exported certificate files to the corresponding folders.
<blockquote style="margin-right: 0px">
<pre></pre>
<pre>$cert = New-SelfSignedCertificate -KeyUsageProperty All -Provider "Microsoft Strong Cryptographic Provider" -FriendlyName "MultiNodeNC" -DnsName @("192.168.2.34")
Export-Certificate -Cert $cert -FilePath c:\MultiNodeNC.cer
$PlainPassword = "123"
$SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
Export-PfxCertificate -Cert $cert -FilePath c:\MultiNodeNC.pfx -Password $securepassword -ChainOption BuildChain
copy C:\MultiNodeNC.pfx \\localhost\MSSCVMMLibrary\ServerCertificate.cr\
copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\TrustedRootCertificate.cr\
copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\NCCertificate.cr\</pre>
</blockquote>
</li>
 	<li>Click "Library" in VMM console and browse to "Template &gt; Service Template". Click the button "Import Template"
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM44.jpg"><img width="1024" height="616" class="alignnone wp-image-526 size-large" alt="NC-VMM44" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM44-1024x616.jpg" /></a></li>
 	<li>Browse to \\localhost\MSSCVMMLibrary\NC and select "Network Controller Production Generation 2 VM.xml". If you don't have 3+ compute nodes, you may select "<span>Network Controller Standalone Generation 2 VM.xml" or "<span>Network Controller Standalone Generation 1 VM.xml", which depends on your syspreped image is Gen 1 VM or Gen 2 VM.</span></span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/35.png"><img width="760" height="569" class="alignnone wp-image-3825 size-full" src="https://msdnshared.blob.core.windows.net/media/2016/05/35.png" /></a></li>
 	<li>On the Configure Reference page, map the WinServer.vhdx to the Syspreped image you copied to \\localhost\MSSCVMMLibrary\VHDs\. In addition, you may also need to map other resource to the corresponding folder under \\localhost\MSSCVMMLibrary\ if they were not recognize automatically.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM46.jpg"><img width="772" height="576" class="alignnone wp-image-545 size-full" alt="NC-VMM46" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM46.jpg" /></a></li>
 	<li>Then click the "Import".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM47.jpg"><img width="772" height="576" class="alignnone wp-image-555 size-full" alt="NC-VMM47" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM47.jpg" /></a></li>
 	<li><span style="color: #ff0000">If your syspreped image is based on Volume License image, you may jump to step 12.</span></li>
 	<li>(Optional) If your syspreped image is not based on Volume License image, please right click the "Network Controller Production" and select "Open Designer".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM52.jpg"><img width="1024" height="616" class="alignnone wp-image-605 size-large" alt="NC-VMM52" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM52-1024x616.jpg" /></a></li>
 	<li>Right click the "Windows Server Network Controller" and select "Properties".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM53.jpg"><img width="1024" height="768" class="alignnone wp-image-615 size-large" alt="NC-VMM53" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM53-1024x768.jpg" /></a></li>
 	<li><span style="color: #000000">In Windows Server Network Controller Properties window, click "OS Configuration" and key in a valid product key or 6XBNX-4JQGW-QX6QG-74P76-72V67. </span>If you are not using a Volume Licensed VHD\VHDX or if the VHD\VHDX is not supplied the Product Key using an Answer file, then the deployment will stop at the Product Key page during network controller virtual machine(s) provisioning.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM54.jpg"><img width="850" height="740" class="alignnone wp-image-625 size-full" alt="NC-VMM54" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM54.jpg" /></a></li>
 	<li>Right click the "Network Controller Production" and select "Configure Deployment".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM58.jpg"><img width="1024" height="616" class="alignnone wp-image-655 size-large" alt="NC-VMM58" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM58-1024x616.jpg" /></a></li>
 	<li>Type the name of the service. In this case, the name is "NC-VMM-RTM". Select the logical network "MGMT". Then click OK.</li>
 	<li>Configure the settings for the service deployment. For local Admin, you may need to create a new Run As account if you don't have one for local admin. The username is ".\administrator".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM61.jpg"><img width="772" height="576" class="alignnone wp-image-685 size-full" alt="NC-VMM61" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM61.jpg" /></a></li>
 	<li>In my case, I didn't create security group for NC Client and NC Admin. I just used Domain Users group and Domain Admins instead. As  for the diagnostic logging settings, they're optional. <span style="color: #ff0000">The important is the format of RestIPaddress is 192.168.20.34/24</span> instead of just IP address.  <span style="color: #ff0000">The format of MgmtDomainAccountName is "&lt;domainname&gt;\&lt;username&gt;"</span> instead of just "&lt;username"&gt;.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN12.png"><img width="1024" height="640" class="alignnone wp-image-2865 size-large" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN12-1024x640.png" /></a></li>
 	<li>Then click the button "Refresh". Now you could click the button "Deploy Service".</li>
 	<li>In the prompt windows, click "Deploy".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM65.jpg"><img width="400" height="200" class="alignnone wp-image-716 size-full" alt="NC-VMM65" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM65.jpg" /></a></li>
 	<li>Later on you might find the deployment complete successfully.
<img width="1024" height="640" class="alignnone wp-image-3835 size-large" src="https://msdnshared.blob.core.windows.net/media/2016/05/114-1024x640.png" /></li>
 	<li>Click Fabric in the VMM console. Navigate to "Networking &gt; Network Service". Right click "Network Service" and select "Add Network Service".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM72.jpg"><img width="1024" height="616" class="alignnone wp-image-775 size-large" alt="NC-VMM72" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM72-1024x616.jpg" /></a></li>
 	<li>Click "Next" on the "Getting Started" page.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM73.jpg"><img width="772" height="576" class="alignnone wp-image-785 size-full" alt="NC-VMM73" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM73.jpg" /></a></li>
 	<li>Give the network service a name, "NC" for example.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM74.jpg"><img width="772" height="576" class="alignnone wp-image-795 size-full" alt="NC-VMM74" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM74.jpg" /></a></li>
 	<li>Select Manufacturer: Microsoft and Model: Microsoft Network Controller.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM75.jpg"><img width="772" height="576" class="alignnone wp-image-805 size-full" alt="NC-VMM75" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM75.jpg" /></a></li>
 	<li>Still use "Run As" as the Run As account.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM76.jpg"><img width="772" height="576" class="alignnone wp-image-815 size-full" alt="NC-VMM76" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM76.jpg" /></a></li>
 	<li>Connection String is
<span style="font-family: Courier New"><span style="font-family: Courier New">serverurl=https://192.168.20.34;SouthBoundIPAddress=192.168.20.34;servicename=NC-VMM-RTM</span></span>&nbsp;</li>
 	<li> On the next page, select the checkbox "These certificate have been reviewed and can be imported to the trusted certificate store." Then click "Next"
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM78.jpg"><img width="772" height="576" class="alignnone wp-image-835 size-full" alt="NC-VMM78" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM78.jpg" /></a></li>
 	<li>Click Scan Provider. Then click Next.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM80.jpg"><img width="772" height="576" class="alignnone wp-image-855 size-full" alt="NC-VMM80" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM80.jpg" /></a></li>
 	<li>Select host group "All Hosts". Click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM81.jpg"><img width="772" height="576" class="alignnone wp-image-865 size-full" alt="NC-VMM81" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM81.jpg" /></a></li>
 	<li>Click "Finish".</li>
 	<li>Please make sure the job "Add Network Service device" complete successfully.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/210.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/05/210-1024x640.png" alt="2" width="1024" height="640" class="alignnone size-large wp-image-3845" /></a></li>
</ol>
&nbsp;
<h2>Create Logical Network for "HNV"</h2>

<hr />

&nbsp;
<ol>
 	<li>Right click "Logical Network" and select "Create Logical Network".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM84.jpg"><img width="1024" height="616" class="alignnone wp-image-895 size-large" alt="NC-VMM84" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM84-1024x616.jpg" /></a></li>
 	<li>Select the checkbox "All new VM networks created on this logical network to use network virtualization" and "Managed by Microsoft Network Controller".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM85.jpg"><img width="772" height="576" class="alignnone wp-image-905 size-full" alt="NC-VMM85" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM85.jpg" /></a></li>
 	<li>On the next page, associate the VLAN (ID=201, IP Subnet=192.168.21.0/24) to the logical network site.</li>
 	<li>Click Finish.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM87.jpg"><img width="772" height="576" class="alignnone wp-image-925 size-full" alt="NC-VMM87" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM87.jpg" /></a></li>
 	<li>Right click new created HNV logical network and select "Create IP Pool".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM88.jpg"><img width="1024" height="616" class="alignnone wp-image-926 size-large" alt="NC-VMM88" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM88-1024x616.jpg" /></a></li>
 	<li>Name is "IPPool-HNV". Click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM89.jpg"><img width="772" height="576" class="alignnone wp-image-936 size-full" alt="NC-VMM89" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM89.jpg" /></a></li>
 	<li>Accept the default Network Site, click "Next".</li>
 	<li>Configure starting IP address as 192.168.21.51 and ending IP address is 192.168.21.100.</li>
 	<li>Default gateway is 192.168.21.1.</li>
 	<li>DNS server is 192.168.20.3.</li>
 	<li>You don't need to configure WINS server. On the "Confirm the settings" page, click "Finish".</li>
 	<li>Navigate to "Networking &gt; Port Profiles". Right click the new created uplink profile and select Properties.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM96.jpg"><img width="1024" height="616" class="alignnone wp-image-1005 size-large" alt="NC-VMM96" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM96-1024x616.jpg" /></a></li>
 	<li>Select the checkbox "HNV_0" to bind the network site "HNV_0" to the uplink profile, which means Hyper-V hosts will be able to access the logical network thru logical switch "MGMT-Switch".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM97.jpg"><img width="772" height="576" class="alignnone wp-image-1015 size-full" alt="NC-VMM97" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM97.jpg" /></a></li>
</ol>
<h2></h2>
<h2>Validation</h2>

<hr />

<h3>Test Case 1: East-West Communication</h3>
<ol>
 	<li>Click "VM and Services" in the VMM Console. Then right click "VM Networks" and select "Create VM Network".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM98.jpg"><img width="1024" height="616" class="alignnone wp-image-1025 size-large" alt="NC-VMM98" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM98-1024x616.jpg" /></a></li>
 	<li>Give it a name "VNET-SLB".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN21.png"><img width="760" height="571" class="wp-image-2965 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN21.png" /></a></li>
 	<li>Accept the default isolation setting and click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM100.jpg"><img width="772" height="576" class="alignnone wp-image-1036 size-full" alt="NC-VMM100" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM100.jpg" /></a></li>
 	<li>Add a VM Subnet  "SUB1" and set its subnet as "10.0.0.0/24". Then click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM101.jpg"><img width="772" height="576" class="alignnone wp-image-1045 size-full" alt="NC-VMM101" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM101.jpg" /></a></li>
 	<li>Don't change the setting on "Connectivity" page at this moment. Click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM102.jpg"><img width="772" height="576" class="alignnone wp-image-1055 size-full" alt="NC-VMM102" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM102.jpg" /></a></li>
 	<li>Click "Finish".</li>
 	<li>Right click "VNET-SLB" and select "Create IP Pool".</li>
 	<li>You may give it a name here (e.g., CATPool-VNET-SLB)</li>
 	<li>Accept the default IP address space, click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM106.jpg"><img width="772" height="576" class="alignnone wp-image-1095 size-full" alt="NC-VMM106" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM106.jpg" /></a></li>
 	<li>Set default gateway to 10.0.0.1.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM107.jpg"><img width="772" height="576" class="alignnone wp-image-1105 size-full" alt="NC-VMM107" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM107.jpg" /></a></li>
 	<li>Set DNS server to 192.168.20.3.</li>
 	<li>You don't need to configure WINS server. Click "Next". On the "Confirm the settings" page, click "Finish".</li>
 	<li>Click "Library" in the VMM Console and navigate to "Library Servers &gt; INFRA-VMM &gt; MSSCVMMLibrary &gt; VHDs". Right click the Syspreped Image you copied before and select "Create VM Template".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN24.png"><img width="1024" height="640" class="wp-image-2986 size-large alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN24-1024x640.png" /></a></li>
 	<li>Give the new VM template a name (E.g., "Windows Server 2016"). In my case, I used Gen 2 template. So I also select the generate 2. Click "Next".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM112.jpg"><img width="842" height="795" class="alignnone wp-image-1155 size-full" alt="NC-VMM112" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM112.jpg" /></a></li>
 	<li>On the Configure Hardware page, select Hyper-V as Cloud Capability.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM113.jpg"><img width="842" height="795" class="alignnone wp-image-1165 size-full" alt="NC-VMM113" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM113.jpg" /></a></li>
 	<li>Change the memory to 2048GB.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM114.jpg"><img width="842" height="795" class="alignnone wp-image-1175 size-full" alt="NC-VMM114" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM114.jpg" /></a></li>
 	<li>Connect the above new create VM network "VNET-SLB" and subnet "SUB1".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN25.png"><img width="838" height="735" class="wp-image-2995 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN25.png" /></a></li>
 	<li>Configure the default password and product key.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM117.jpg"><img width="842" height="795" class="alignnone wp-image-1196 size-full" alt="NC-VMM117" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM117.jpg" /></a></li>
 	<li>Don't change any setting in the next two pages (Application Configuration and SQL Server Configuration). On the Summary page, click "Create".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM120.jpg"><img width="842" height="795" class="alignnone wp-image-1225 size-full" alt="NC-VMM120" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM120.jpg" /></a></li>
 	<li>Right click the new created VM template and select "Create Virtual Machine".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM121.jpg"><img width="1024" height="616" class="alignnone wp-image-1235 size-large" alt="NC-VMM121" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM121-1024x616.jpg" /></a></li>
 	<li>Give the VM a name "TESTVMSLB1".
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN26.png"><img width="828" height="749" class="wp-image-3005 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN26.png" /></a></li>
 	<li>Accept the default settings in all the rest pages in the wizard. On Summary page select checkbox "Start the virtual machine after deploying it". Then click "Create".</li>
 	<li>Follow the same procedure to create another VM "TESTVMSLB2" in a different Hyper-V host.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM129.jpg"><img width="1024" height="616" class="alignnone wp-image-1295 size-large" alt="NC-VMM129" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM129-1024x616.jpg" /></a></li>
 	<li>After the above two VM provisioned successfully, you may connect them and disable the Windows Firewall (If your Syspreped image didn't disable it before). Then try to ping each other and make sure east-west communication is ok.
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM130.jpg"><img width="1024" height="864" class="alignnone wp-image-1305 size-large" alt="NC-VMM130" src="https://msdnshared.blob.core.windows.net/media/2016/05/NC-VMM130-1024x864.jpg" /></a></li>
 	<li><span style="color: #000000">You may run the cmdlet "Get-PACAMapping" on the host and make sure the PA address had already been assigned.</span>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/SDN27.png"><img width="527" height="346" class="wp-image-3015 size-full alignnone" src="https://msdnshared.blob.core.windows.net/media/2016/05/SDN27.png" /></a></li>
</ol>
&nbsp;
<h2>To Be Continued...</h2>
Now you had already deploy NC successfully with VMM. In the next post we will walk through the steps to deploy SLB and enable NAT for VMs.

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>