<?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>Diego Viso’s Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/diegoviso/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/diegoviso/feed.xml</link>
    <description>Musings of an Architect</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:05:34 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Build a chat bot in under 10 minutes using Node.js and the Microsoft Bot Framework</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/build-a-chat-bot-in-under-10-minutes-using-node-js-and-the-microsoft-bot-framework</link>
      <pubDate>Fri, 28 Apr 2017 21:58:53 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/?p=116</guid>
      <description><![CDATA[Chat bots are a great way to engage your customers with the ability to provide a truly personalised...]]></description>
      <content:encoded><![CDATA[Chat bots are a great way to engage your customers with the ability to provide a truly personalised experience. They are easy to build and provide huge business impact and thanks to the extensive SDKs provided by Microsoft, you don't have to use C#/.NET.

As Microsoft continues to transform and embrace open source and support cross platform development, we continue to build SDKs for languages other than .NET creating an open ecosystem that welcomes anyone with any development skillset to adopt our services. As an employee, C# was my go to language for demos and prototypes, however building a simple API or Web App for demo purposes could prove to be time consuming.

Hello Node.js.

It's no secret that javascript is gaining momentum as the web development language of choice. With the ability to quickly knock up prototypes to prove value and the plethora of community modules available, it easy to see why we are embracing Node.js and providing first class support for many of our Azure and online services through the availability of Node.js SDKs.

In this blog I will show you how to quickly build a chat bot in Node.js and if you don't have a copy yet, I recommend you download our free cross platform source code editor <a href="https://code.visualstudio.com/">Visual Studio Code</a> which coincidently is built on Node.js.

As a pre-requisite, this blog assumes you have a basic understanding of javascript and Node.js. If not head over to one of the many Node.js tutorial sites and build yourself a "hello world" application, preferably with the <strong>express</strong> module.

It also assumes you have knowledge of the basic components required to build a bot including dialogs, prompts, cards. If not you can familiar yourself with these key concepts here: https://docs.botframework.com/en-us/node/builder/overview/

Finally you must register your bot on the Bot Framework portal which can be done here: https://dev.botframework.com/bots/new. This will provide you with the <strong>AppId</strong> and <strong>AppPassword</strong> required to register your bot against the portal as well as the ability to publish your bot through multiple consumer channels including Skype and Facebook.

Begin you chat bot application by downloading via npm and including the following modules :

<code>var restify = require("restify");
var builder = require("botbuilder");
var url = require("url");</code>

We use the <strong>restify</strong> module to build the REST Apis required, although <strong>express</strong> could be used as an alternative.

While the <strong>url</strong> module is not required, I use this as a dynamic way of parsing out the host from the http request to build a URL endpoint for the images used by our cards.

Next we setup the service.

Create your server object:

<code>var server = restify.createServer();</code>

Insert your middleware if required, here we intercept the http request to retrieve the host name:

<code>server.use(function (req, res, next) {
serverUrl = "https://"+req.header('Host');
next();
});</code>

and insert a custom route to handle image retrieval:

<code>server.get(/\/images\/?.*/, restify.serveStatic({
directory: __dirname
}));</code>

Finally we invoke the listen method to begin listening to our requests:
<code>
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('Chatbot listening to %s', server.url);
});</code>

Next we create a <strong>connector</strong> and <strong>bot</strong> object which manages communications between the bot app itself and the bot framework service.

<code>var connector = new builder.ChatConnector({
appId: "your registered app id",
appPassword: "your registered password"
});
var bot = new builder.UniversalBot(connector);</code>

and finally we set up a route which forwards API requests to the connector object.

<code>
server.post('/api/messages', connector.listen());</code>

Once this is complete your events will be managed by the <strong>bot</strong> object.

To present a card when someone joins your bot channel i simply use the <strong>bot.on('conversationUpdate')</strong> event as per the following example:

<code>bot.on('conversationUpdate', function (activity) {
if (activity.membersAdded &amp;&amp; activity.membersAdded.length &gt; 0) {
bot.send(new builder.Message()
.address(activity.address)
.textFormat(builder.TextFormat.xml)
.attachments([
new builder.HeroCard()
.title("Welcome to my chat bot!")
.subtitle("I am written in node.js!")
.text("Hello. Please tell me how I can assist.")
.images([
builder.CardImage.create(activity.address, serverUrl+"/images/mylogo.png")
])
])
);
}
});</code>

I can then create an <strong>IntentDialog</strong> object to manage conversation with the <strong>bot.dialog</strong> method and use standard Regex to match an intent as in the example below:

<code>var intents = new builder.IntentDialog()
bot.dialog('/', intents);
intents.matches(/^hello|hola|kio ara/i, function(session){
session.send(`${session.message.text}! Please let me know how I can help!`);
});
</code>

I hope this helps you get started on your chat bot journey. In a second blog post, I will show you how to integrating with other services such as LUIS and QnA Maker to truly make your chat bot awesome!

Happy coding!]]></content:encoded>
    </item>
    <item>
      <title>Migrating Azure Virtual Machines from ASM to ARM</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/migrating-azure-virtual-machines-from-asm-to-arm</link>
      <pubDate>Thu, 10 Dec 2015 18:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/2015/12/10/migrating-azure-virtual-machines-from-asm-to-arm/</guid>
      <description><![CDATA[The Azure Preview Portal is generally available and Microsoft is recommending that all new...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">The Azure Preview Portal is generally available and Microsoft is recommending that all new deployments be based on the ARM model. What about your existing ASM deployments? Microsoft will in time provide an automated approach to migrate existing ASM deployments to ARM, however if you are ready to take the plunge here is a PowerShell script to get you started with your migration. </span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">The scripts <span class="GramE">does</span> two things. Firstly, it allows you to copy your source v<span class="SpellE">hd</span> blob from an existing storage account to a new ARM storage account. Secondly it will create a new ARM based Virtual Machine and attach your&nbsp;copied&nbsp;vhd blob. Ensure that you are on the latest version of the Azure PowerShell module, 1.0.1 at the time of writing this article.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">The script assumes that you have provisioned a new ARM Resource Group with the required resources (Storage Account, Virtual Network, Subnets <span class="SpellE">etc</span>).</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Connect to an Azure subscription</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Login-<span class="SpellE">AzureRmAccount</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Select your subscription if required</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Select-<span class="SpellE">AzureRmSubscription</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">SubscriptionId</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">yoursubscriptionid</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">Copy a <span class="SpellE">Vhd</span> from an existing storage account to a new storage account</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Source VHD</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcVhd</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"><a href="https://sourcesa.blob.core.windows.net/vhds/sourcevhd.vhd"><span style="color:darkred;background:white;">https://sourcesa.blob.core.windows.net/vhds/sourcevhd.vhd</span></a><span style="color:darkred;background:white;">&quot;</span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Destination VHD name</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destVhdName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">destvhd.vhd</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Destination Container Name </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destContainerName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">vhds</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Source Storage Account and Key</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcStorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">sourcesa</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcStorageKey</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">sourcesakey</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Target Storage Account and Key</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destStorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">destsa</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destStorageKey</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">destsakey</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Create the source storage account context (this creates the context, it does not actually create a new storage account)</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">New-<span class="SpellE">AzureStorageContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">StorageAccountName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcStorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">StorageAccountKey</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcStorageKey</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Create the destination storage account context </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">New-<span class="SpellE">AzureStorageContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">StorageAccountName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destStorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">StorageAccountKey</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destStorageKey</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Start the copy<span>&nbsp; </span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$blob1 </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Start-<span class="SpellE">AzureStorageBlobCopy</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Context </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">AbsoluteUri</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">srcVhd</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">DestContainer</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destContainerName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">DestBlob</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destVhdName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">DestContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destContext</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Verbose </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># check status of copy</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$blob1 </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">| </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Get-<span class="SpellE">AzureStorageBlobCopyState</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">Create a Virtual Machine from an existing OS disk</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">resourceGroupName</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">dest-rg</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$location</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">SouthEastAsia</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">storageAccountName</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">destsa</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vmName</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">destvm</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vmSize</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">=</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;Standard_A1&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vnetName</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;<span class="SpellE">dest-vnet</span>&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Get storage account configuration for the&nbsp;target storage account</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">StorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Get-<span class="SpellE">AzureRmStorageAccount</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">ResourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">resourcegroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">AccountName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">storageAccountNAme</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">#Get Virtual Network configuration</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vnet</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Get-<span class="SpellE">AzureRmVirtualNetwork</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Name </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vnetName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">ResourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">resourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Create VM from an existing image</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">OSDiskName</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">=</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$vmName</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">-C-01&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">New-<span class="SpellE">AzureRmVMConfig</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">vmName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vmName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">vmSize</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vmSize</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">nic</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">New-<span class="SpellE">AzureRmNetworkInterface</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Name </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">nicName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">ResourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">resourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Location </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$location </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">SubnetId</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE"><span class="GramE">vnet<span style="color:#979797;">.</span><span style="color:windowtext;">Subnets</span></span></span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">[</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:purple;background:white;">1</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">].</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">Id </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Add-<span class="SpellE">AzureRmVMNetworkInterface</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-VM </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Id </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE"><span class="GramE">nic<span style="color:#979797;">.</span><span style="color:windowtext;">Id</span></span></span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destOSDiskUri</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkred;background:white;">&quot;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"><a href="https://destsa.blob.core.windows.net/vhds/destvhd.vhd"><span style="color:darkred;background:white;">https://destsa.blob.core.windows.net/vhds/destvhd.vhd</span></a><span style="color:darkred;background:white;">&quot;</span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;"># Set the OS disk properties for the new VM. If you are migrating a Linux machine use the -Linux switch instead of -Windows</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:#979797;background:white;">= </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">Set-<span class="SpellE">AzureRmVMOSDisk</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-VM </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Name </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">OSDiskName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">VhdUri</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">destOSDiskUri</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Windows -<span class="SpellE">CreateOption</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blueviolet;background:white;">attach</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;">&nbsp;</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:blue;background:white;">New-<span class="SpellE">AzureRmVM</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-<span class="SpellE">ResourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">resourceGroupName</span> </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-Location </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$location </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:navy;background:white;">-VM </span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:orangered;background:white;">$<span class="SpellE">vm</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;background:white;"><span>&nbsp;</span></span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;"></span></p>
<p style="margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<p style="margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;"><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;background:white;">########################################################################</span><span style="font-size:9.0pt;font-family:&#39;Lucida Console&#39;;color:darkgreen;"></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,sans-serif;">&nbsp;</span></p>
<div>&nbsp;</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>ExpressRoute for Office365 is coming!</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/expressroute-for-office365-is-coming</link>
      <pubDate>Mon, 30 Mar 2015 17:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/2015/03/30/expressroute-for-office365-is-coming/</guid>
      <description><![CDATA[One of the most common asks in the field is whether our Azure ExpressRoute service can be...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:small;">One of the most common asks in the field is whether our Azure ExpressRoute service can be used&nbsp;with Office365. </span><span style="font-size:small;">Whether its the&nbsp;piece of mind that&nbsp;you are connecting over a private network&nbsp;or a guarantee on&nbsp;bandwidth, ExpressRoute for Office365 does make sense.</span></p>
<p><span style="font-size:small;">The good news is Microsoft has recently announced Azure&nbsp;ExpressRoute for Office365 to establish a private, managed connection to Office 365.</span></p>
<p><span style="font-size:small;">Once ExpressRoute for Office 365 becomes available, you will be able to access both Azure and Office 365 over one network to ensure you get the same availability guarantee, data privacy and control over performance. </span></p>
<p><span style="font-size:small;">ExpressRoute for Office 365 in&nbsp;expected to rollout in the&nbsp;third quarter of 2015! Awesome!<br /></span><span style="font-size:small;"><br /></span></p>
<p><span style="font-size:small;"><img width="648" height="511" alt=" " src="https://officeblogswest.blob.core.windows.net/wp-content/2015/03/Azure-ExpressRoute-1.png" /><br /></span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Using Chef to Manage Azure Virtual Machines - Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/using-chef-to-manage-azure-virtual-machines-part-1</link>
      <pubDate>Sun, 14 Dec 2014 15:53:05 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/2014/12/14/using-chef-to-manage-azure-virtual-machines-part-1/</guid>
      <description><![CDATA[You have probably heard of&nbsp;the term Infrastructure as Code. But what does it mean? In...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p style="margin:0cm 0cm 0pt;text-align:left;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8132.1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8132.1.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8132.1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8132.1.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">You have probably heard of&nbsp;the term Infrastructure as Code. But what does it mean? In summary, Infrastructure as Code is a set of techniques and practices&nbsp;which help IT Pros remove the burden associated with the day to day build and management of modular infrastructure. It allows IT Pros to build and maintain their modern server environment in a way that is similar to how software developers build and maintain application code.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">By defining a set of policies which contains&nbsp;your &quot;code&quot;,&nbsp;you can provision infrastructure so it resembles&nbsp;your desired state.&nbsp;You can test on one system then deploy to many. You don&#39;t have to worry about manually installing and configuring individual components or consistency across&nbsp;the fleet.&nbsp;You can push these policies out&nbsp;to thousands of servers and have the&nbsp;peace of mind that servers which fall outside the desired configuration state will automatically be remediated.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">A great tool to deliver infrastructure as code is Chef&nbsp;which has the ability to manage Azure VMs right out of the box! Chef is also cross platform and can manage Windows, Linux, Mac OS and more.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">In this two part blog I will show you how to setup your Chef environment to provision Azure Virtual Machines and then walk you through creating a policy or &quot;cookbook&quot;.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Part&nbsp;one of the blog will cover the setup of the Chef environment and provisioning of an Azure VM. Part&nbsp;two will cover policy creation and policy application.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Let&#39;s begin!</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Chef Basics</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">I&#39;m not going to go into detail about Chef as there is great material <a href="https://www.chef.io/chef/">here</a> and I recommend you have a quick read to familiarize yourself before you attempt this walk through.&nbsp;</span><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">I will however recap the basics before we get started.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This diagram depicts the high level Chef architecture.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8551.2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8551.2.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8551.2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8551.2.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Chef has three main architectural components. The <b>Chef Server</b>, <b>Chef Client (Node)</b> and the <b>Chef Workstation</b>.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">The <b>Chef Server</b> is our management point and there are two options for the Chef Server, a hosted solution or an on-premises solution. We will be using a hosted solution.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">The<b> Chef Client (node)</b> is the agent that sits on the servers you are managing.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">The <b>Chef Workstation</b> is our admin workstation where we create our policies and execute our management commands. We run the &quot;<b>knife</b>&quot; command from the Chef Workstation to manage our infrastructure.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">There are also these things called &quot;Cookbooks&quot; and &quot;Recipes&quot;. These are effectively the policies we define and apply to our servers.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Now that we have that out of the way let&#39;s get started!</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Preparing the Workstation</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">First lets prep the workstation. I am using a standard Windows workstation.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">We need to create a directory to store our config files and cookbooks.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">First create a directory called C:\chef. </span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Then create a second directory c:\chef\cookbooks</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">We now need to download our Azure settings file so Chef can communicate with our Azure subscription.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Download your publish settings from here:&nbsp; <a href="https://manage.windowsazure.com/publishsettings/">https://manage.windowsazure.com/publishsettings/</a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Save the publish settings file in C:\chef</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Creating a managed Chef Server account</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Sign up for a hosted Chef account : </span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://manage.chef.io/signup">https://manage.chef.io/signup</a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">During the signup process you will be asked to create a new organisation.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4527.3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4527.3.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4527.3.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4527.3.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Once your organization is created download the starter kit.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7418.4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7418.4.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7418.4.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7418.4.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Note: </span></b><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">If you receive a prompt warning you that your keys will be reset it is ok to proceed as we have no existing infrastructure configured as yet.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This starter kit zip file contains your organization config files and keys.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Configuring the Chef Workstation</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Extract the content of the chef-starter.zip to C:\chef</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Copy all files under chef-starter\chef-repo\.chef to your c:\chef</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Your directory should now look something like this:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4034.5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4034.5.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4034.5.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4034.5.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">You should now have 4 files including the Azure publishing file in the root of c:\chef</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">The PEM files contain your organisation and admin private keys for communication. The <strong>knife.rb</strong> file contains your knife configuration. We need to edit the <strong>knife.rb</strong> file.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Open the file in your editor of choice and modify the &quot;cookbook_path&quot; by removing the /../ from the path so it appears as below:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-family:terminal,monaco;font-size:11pt;">cookbook_path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&quot;#{current_dir}/cookbooks&quot;]</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Also add the following line reflecting the name of your Azure publish settings file.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-family:terminal,monaco;font-size:11pt;">knife[:azure_publish_settings_file] = &quot;yourfilename.publishsettings&quot;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Your knife.rb file should now look similar to this:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/1184.6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/1184.6.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/1184.6.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/1184.6.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">These lines will ensure Knife references our cookbooks directory under c:\chef\cookbooks and also uses our Azure Publish Settings file during Azure operations.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Installing the Chef Development Kit</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Next Download and install the ChefDK (Chef Development Kit) to setup your Chef Workstation.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://downloads.getchef.com/chef-dk/windows">https://downloads.getchef.com/chef-dk/windows</a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4113.7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4113.7.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/4113.7.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/4113.7.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This is straight forward. Let it install in its default location of c:\opscode.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This install will take around 10 minutes.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Confirm your PATH variable contains entries for C:\opscode\chefdk\bin;C:\opscode\chefdk\embedded\bin;c:\users\yourusername\.chefdk\gem\ruby\2.0.0\bin</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">If they are not there make sure you add these paths!</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">NOTE THE ORDER OF THE PATH IS IMPORTANT!</span></b><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"> If your opscode paths are not in the correct order you will have issues.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Reboot your workstation before you continue.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Next we install the Knife Azure extension. This provide Knife with the &quot;Azure Plugin&quot;.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Run the following command:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-family:terminal,monaco;"><b><span style="font-size:11pt;">chef gem install knife-azure</span></b></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3146.8.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3146.8.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3146.8.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3146.8.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">To ensure everything is configured correctly run:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-family:terminal,monaco;"><b><span style="font-size:11pt;">knife azure image list</span></b></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">If everything is configured correctly you will see a list of available Azure images scroll through.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Congratulations. The workstation has been setup!</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><b><span style="font-size:14.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Creating a Virtual Machine with Knife Azure</span></b></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">We will now create an unmanaged VM with chef:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">In order to do this we need to use the <b>knife azure server create</b> command.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Here is an example with the parameters highlighted in bold:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-family:terminal,monaco;font-size:11pt;">knife azure server create --<b>azure-dns-name</b> &#39;diegotest01&#39; --<b>azure-vm-name</b> &#39;testserver01&#39; --<b>azure-vm-size</b> &#39;Small&#39;&nbsp; --<b>azure-storage-account</b> &#39;portalvhdxxxx&#39; --<b>azure-source-image</b> &#39;a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201411.01-en.us-127GB.vhd&#39; --<b>azure-service-location</b> &#39;Southeast Asia&#39; <span style="color:#333333;">--<b>winrm-user</b> azureuser --<b>winrm-password</b> &#39;myPassword123&#39; --<b>tcp-endpoints</b> 3389:56798</span></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">The parameters are self-explanatory. Substitute your particular variables and run.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Once you run the command, pop over to the Azure Portal, you will see your machine begin to provision.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7357.9.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7357.9.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7357.9.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7357.9.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Back at the command prompt:</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7245.10.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7245.10.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7245.10.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7245.10.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This winrm error is expected as we have not enabled winrm on the server.</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">We can then go ahead and initiate an RDP connection from the Azure Portal and Bam!&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3162.12.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3162.12.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3162.12.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3162.12.png" border="0" /></a></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">This completes part one of the two part blog. Stay tuned for the next blog where we will configure Chef to deploy an Azure Virtual Machine and then automatically provision IIS!</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Cheers</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">Diego</span></p>
<p style="margin:0cm;margin-bottom:.0001pt;"><span style="font-size:11.0pt;font-family:&#39;Calibri&#39;,&#39;sans-serif&#39;;">&nbsp;</span></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Creating a Multi-Site Cross Region fully meshed VNET to VNET to On-Premises connection</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/creating-a-multi-site-cross-region-fully-meshed-vnet-to-vnet-to-on-premises-connection</link>
      <pubDate>Sun, 07 Dec 2014 03:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/2014/12/07/creating-a-multi-site-cross-region-fully-meshed-vnet-to-vnet-to-on-premises-connection/</guid>
      <description><![CDATA[Azure&#39;s Multi-Site VNETs allow you to create a fully meshed network architecture that provides...]]></description>
      <content:encoded><![CDATA[<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Azure&#39;s Multi-Site VNETs allow you to create a fully meshed network architecture that provides great flexibility. I can connect VNETs within region and even across regions. I can also include my on-premises site within the multi-site topology! Very cool!</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Another nice&nbsp;gem is that all VNET to VNET traffic flows internally within Microsoft&#39;s data centers, so traffic does not traverse the internet.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">In this blog I will show you how to configure a multi-site VNET to VNET topology&nbsp;which also includes an on-premises site in the mesh.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">If you followed my previous blog <a href="/b/diegoviso/archive/2014/10/28/creating-a-site-to-site-s2s-vpn-to-azure-with-rras-and-one-physical-nic.aspx">here</a>, I showed you how to configure a S2S VPN from an Azure&nbsp;VNET to an on-premises network using an RRAS server as an on-premises gateway.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">If you have not read it, I highly advise that you do as I provided a detailed walk-through for creating VNETs and RRAS Demand Dial Interfaces which I will not step through again. I also leverage the S2S VPN connection established in my previous blog as the basis for this scenario.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Setup Overview</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">The process of creating a Multi-Site VNET mesh is no different to creating multiple S2S VPNs. In fact we will need to establish VPN tunnels between all networks to create the fully meshed topology. My target architecture is as follows:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/6283.1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/6283.1.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/6283.1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/6283.1.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We are going to complete this exercise in two phases. The first phase will connect <span style="font-weight:bold;">vNet1</span> to <span style="font-weight:bold;">vNet2</span>. The second phase will connect <span style="font-weight:bold;">vNet2</span> to our <span style="font-weight:bold;">Local</span> On-Premises gateway. Why two phases? This will help demonstrate the connectivity differences between non meshed and meshed topology.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">OK, let&#39;s get started!</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Quick recap of VNET1 to Local On-Premises S2S VPN setup</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">In my previous blog <a href="/b/diegoviso/archive/2014/10/28/creating-a-site-to-site-s2s-vpn-to-azure-with-rras-and-one-physical-nic.aspx">here</a>, I had established a S2S VPN from Azure <span style="font-weight:bold;">vNet1</span> to my <span style="font-weight:bold;">Local </span>On-Premises RRAS gateway. We will use this as our starting point. As such we have an established connection from <span style="font-weight:bold;">vNet1</span> to my <span style="font-weight:bold;">Local </span>on-premises network.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5504.2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5504.2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5504.2.PNG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5504.2.PNG" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We are now here:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5482.3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5482.3.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5482.3.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5482.3.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Defining our Local Networks</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Planning your network is important, and in my case I will have three networks which require three separate non overlapping address spaces. I have defined my network as follows:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<div style="direction:ltr;">
<table style="border:1pt solid #a3a3a3;border-collapse:collapse;direction:ltr;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1791in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Network Name</span></p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1423in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Address Space</span></p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1701in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Location</span></p>
</td>
</tr>
<tr>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1791in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Local</span></p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1423in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">192.168.0.0/24</p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1701in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">On Premises</p>
</td>
</tr>
<tr>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1791in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">vNet1</span></p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1423in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">10.10.0.0/16</p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1701in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">South East Asia</p>
</td>
</tr>
<tr>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1791in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">vNet2</span></p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1423in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">172.16.0.0/24</p>
</td>
<td style="border-style:solid;border-color:#A3A3A3;border-width:1pt;vertical-align:top;width:1.1701in;padding:4pt 4pt 4pt 4pt;">
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">West US</p>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Defining these networks allows Azure to perform routing decisions. These networks are then associated with the Azure VPN gateways.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Let&#39;s define these networks in the Azure Portal. In the <span style="font-weight:bold;">Networks</span> view click on <span style="font-weight:bold;">Local Networks.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">I already have my <span style="font-weight:bold;">Local </span>On-Premises network defined from my previous blog.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7215.4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7215.4.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7215.4.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7215.4.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We now need to create two additional networks, the first for <span style="font-weight:bold;">VNET1</span> and the second for <span style="font-weight:bold;">VNET2.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Click <span style="font-weight:bold;">NEW</span> located at the bottom left and select <span style="font-weight:bold;">ADD LOCAL NETWORK.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0714.5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0714.5.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0714.5.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0714.5.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">The following screen should be familiar as we have&nbsp;added a local network before in my previous blog. We fill in the <span style="font-weight:bold;">Name</span> for the Local Network, <span style="font-weight:bold;">VNET1 </span>in our case. Now in the <span style="font-weight:bold;">VPN Device IP Address</span> field we enter the IP address of the <span style="font-weight:bold;">vNet1</span> gateway<span style="font-weight:bold;">. </span>The IP address of the <span style="font-weight:bold;">vNet1 </span>gateway is already available as we had previously created a gateway for <span style="font-weight:bold;">vNet1</span> to establish our S2S VPN to our On-Premises<span style="font-weight:bold;"> </span>site.<span style="font-weight:bold;">&nbsp;<br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0576.6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0576.6.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0576.6.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0576.6.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">On the next page we need to define the address space we will be using with <span style="font-weight:bold;">VNET1. </span>As per my address space table, we will define 10.10.0.0/16.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7801.7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7801.7.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7801.7.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7801.7.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Now we need to define our <span style="font-weight:bold;">VNET2</span> details. Repeat the wizard. This time we can leave the <span style="font-weight:bold;">VPN Device IP Address </span>blank as we have not created the gateway as yet. My address space for <span style="font-weight:bold;">VNET2</span> is 172.16.0.0/24, so I will define this in the address space section. Once complete, our <span style="font-weight:bold;">Local Networks</span> will look like this:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7506.8.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7506.8.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/7506.8.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/7506.8.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Creating VNET2, our second virtual network</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Now that we have defined our local networks, let&#39;s move on and create our second virtual network, <span style="font-weight:bold;">vNet2.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">As <span style="font-weight:bold;">vNet1</span> has been created in Southeast Asia, I will create <span style="font-weight:bold;">vNet2</span> in the West US data center to provide our cross region connectivity.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">In the Azure Portal lets <span style="font-weight:bold;">Custom Create</span> a new Virtual Network and create our <span style="font-weight:bold;">vNet2</span> in West US.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5635.9.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5635.9.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/5635.9.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/5635.9.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Let&#39;s click through the wizard. We leave DNS and VPN connectivity blank for now and click next to define the address space. Following my address space plan, I am defining 172.16.0.0/24 for<span style="font-weight:bold;"> vNet2.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note:&nbsp; </span>Because we are going to need a subnet for the VPN gateway, I am subdividing my address space and using only 128 of the 256 addresses (/25). This will leave room in the pool for the VPN gateway subnet.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0714.10.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0714.10.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0714.10.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0714.10.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Finish the wizard. You can now see my two VNETs. Each VNET is in a different region.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/2514.11.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/2514.11.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/2514.11.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/2514.11.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Establishing a connection between VNET2 and VNET1</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We have already established a S2S VPN from <span style="font-weight:bold;">vNet1</span> to my <span style="font-weight:bold;">Local</span> on premises network, so I am going to establish a VPN connection between <span style="font-weight:bold;">vNet2</span> and <span style="font-weight:bold;">vNet1</span>. As we have done in my previous blog, under the <span style="font-weight:bold;">vNet2</span> page click <span style="font-weight:bold;">Configure</span> and enable the site to site VPN by selecting <span style="font-weight:bold;">Connect to the local network</span>. For the <span style="font-weight:bold;">Local Network</span> select <span style="font-weight:bold;">VNET1</span>. Your gateway subnet will automatically be created. Once that is completed. Select <span style="font-weight:bold;">SAVE</span> at the bottom of the page.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0066.12.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0066.12.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/0066.12.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/0066.12.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Let us head back to the dashboard view for <span style="font-weight:bold;">vNet2</span> and create a Dynamic Gateway.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note:</span> Multi-site connectivity is only supported with Dynamic Gateways.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/13.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/13.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/13.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/13.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">After 15 minutes our dashboard will look like this:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/14.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/14.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/14.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/14.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Take note of the <span style="font-weight:bold;">Gateway IP Address</span>.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Once the gateway is created there are three things we need to do.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">1: </span>First we need to update our local networks <span style="font-weight:bold;">VNET2</span> entry and add the VPN Address we have now been assigned after creating the dynamic gateway. Head back to <span style="font-weight:bold;">Local Networks</span>. Click on <span style="font-weight:bold;">VNET2</span> and select <span style="font-weight:bold;">Edit </span>at the bottom of the page and enter the VPN IP Address for <span style="font-weight:bold;">VNET2</span>. Once completed our local network will look like this:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/15.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/15.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/15.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/15.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">2:</span> Next we need to link <span style="font-weight:bold;">vNet1</span> and <span style="font-weight:bold;">vNet2</span> together. As <span style="font-weight:bold;">vNet1</span> is already connected to our <span style="font-weight:bold;">Local </span>On-Premises gateway, we need to make the second connection by&nbsp;exporting the network configuration file and making the edits&nbsp;manually. Adding a second connection is not currently supported in the portal.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Let&#39;s export the network configuration file. On the <span style="font-weight:bold;">Dashboard </span>page Click the <span style="font-weight:bold;">Export</span> button at the bottom of the screen.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3125.16.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3125.16.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3125.16.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3125.16.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">During the export process you will be asked to select a subscription. If you have one subscription this is straight forward, if you have multiple, select the subscription that is associated with the Virtual Networks we are working on. You will then be prompted to download the file <span style="font-weight:bold;">NetworkConfig.xml.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note</span>: This configuration file contains all your Azure network configuration details. Please back up the file before you modify its contents.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">In order to make our changes, we need to open the networkconfig.xml file with a text editor. I recommend Notepad++.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">To simplify editing I recommend that you collapse the nodes so it looks like the following:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/17.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/17.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/17.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/17.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">To connect VNET1 and VNET2 together we need to modify the xml file accordingly. Expand the <span style="font-weight:bold;">VirtualNetworkSite</span> that references <span style="font-weight:bold;">VNET1 </span>and look for the<span style="font-weight:bold;"> Gateway</span> section.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/18.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/18.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/18.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/18.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note: </span>You will see that under the <span style="font-weight:bold;">&lt;ConnectionsToLocalNetwork</span>&gt; node, we already have a reference to <span style="font-weight:bold;">Local</span>, as this was defined in the Azure Portal during the creation of our S2S VPN to our <span style="font-weight:bold;">Local </span>on-premises network from my previous blog.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We now add a reference for <span style="font-weight:bold;">VNET2</span>. Under the <span style="font-weight:bold;">&lt;ConnectionsToLocalNetwork&gt;</span> node we add the following lines:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">&lt;LocalNetworkSiteRef name=&quot;VNET2&quot;&gt;</span></span></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">&nbsp; &lt;Connection type=&quot;IPsec&quot; /&gt;<span style="font-family:Consolas;font-size:9.0pt;"></span></span></span></span></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">&lt;/LocalNetworkSiteRef&gt;</span></span></span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">It should look like the following:&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/19.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/19.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/19.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/19.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">If we now examine the elements for the <span style="font-weight:bold;">VirtualNetworkSite </span>referencing <span style="font-weight:bold;">VNET2</span>, we will see that under the <span style="font-weight:bold;">&lt;ConnectionsToLocalNetwork&gt;</span> node, it already references <span style="font-weight:bold;">VNET1</span> as we have already defined this in the Azure Portal during the creation of our S2S VPN to <span style="font-weight:bold;">VNET1</span>, as such we do not need to make any further modifications.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/20.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/20.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/20.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/20.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Once this is complete, we save the XML file and import the file back into Azure.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Under the <span style="font-weight:bold;">vNet2 </span>Dashboard page, we click <span style="font-weight:bold;">NEW </span>on the bottom left of the page and then, <span style="font-weight:bold;">Import Configuration.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/21.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/21.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/21.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/21.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><br /></span>We will be prompted for the location of the <span style="font-weight:bold;">networkconfig.xml</span> file. Once we upload the file, we will be presented with the following screen:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/22.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/22.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/22.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/22.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note</span>: Azure has detected that the configurations of vNet1 and vNet2 need to be updated.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">We finish the wizard and allow the Network configuration to update.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/23.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/23.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/23.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/23.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">3:</span> The final step is to exchange the gateway pre shared keys between <span style="font-weight:bold;">VNET1</span> and <span style="font-weight:bold;">VNET2</span>. As <span style="font-weight:bold;">VNET1</span> is now configured for multi-site connectivity we need to load an additional key which must be done through <span style="font-weight:bold;">PowerShell</span>. This is pretty straight forward.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">For <span style="font-weight:bold;">VNET1</span> we use the following<span style="font-weight:bold;">:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">Set-AzureVNetGatewayKey -VNetName VNet1 -LocalNetworkSiteName VNet2 -SharedKey sharedkey123</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Now that we are in multi-site gateway mode, we will also need to reset the pre-shared key between<span style="font-weight:bold;"> VNET1</span> and our <span style="font-weight:bold;">Local </span>on-premises network.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">Set-AzureVNetGatewayKey -VNetName VNet1 -LocalNetworkSiteName Local -SharedKey sharedkey123</span></span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">For <span style="font-weight:bold;">VNET2</span> we use the following<span style="font-weight:bold;">:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">Set-AzureVNetGatewayKey -VNetName VNet2 -LocalNetworkSiteName VNet1 -SharedKey sharedkey123</span></span></span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">Note:</span> The shared key can be anything, but they must match.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Our screen will look like this.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/24.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/24.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/24.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/24.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">If we have done everything correctly, our dashboards will look as follows:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">VNET1 Dashboard:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Note that our nice VPN graphic has now been replaced by a table to show multi-site connectivity.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/26.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/26.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/26.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/26.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">VNET2 Dashboard:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8838.27.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8838.27.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/8838.27.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/8838.27.png" border="0" /></a></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"><br /></span>We have now establish a multi-site VPN from <span style="font-weight:bold;">VNET1</span> to the <span style="font-weight:bold;">Local</span> and <span style="font-weight:bold;">VNET2 </span>networks<span style="font-weight:bold;">. </span>Our connections now looks like this:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/28.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/28.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/28.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/28.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Testing connectivity between networks</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">I have a VM in each VNET to test connectivity. I have allowed ICMP for our testing.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">NOTE: </span>You will see that we can ping between <span style="font-weight:bold;">VNET1</span> and <span style="font-weight:bold;">VNET2</span> and<span style="font-weight:bold;"> VNET1</span> and <span style="font-weight:bold;">Local </span>On-Premises, but <span style="font-weight:bold;">VNET2</span> and <span style="font-weight:bold;">Local On-Premises</span> cannot communicate.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">VNET1:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">I can ping from VNET1 (10.10.x.x) to VNET2 (172.16.x.x). I can ping from VNET1 (10.10.x.x) to Local (192.168.x.x)</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3857.30.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3857.30.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3857.30.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3857.30.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">VNET2:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Can only ping to VNET1</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3515.31.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3515.31.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3515.31.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3515.31.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;">On-Premises:</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Can only ping to VNET1</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/32.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/32.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/32.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/32.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><span style="font-weight:bold;"> <br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">This demonstrates that VNET connectivity is limited to a single hope. In other words I cannot communicate from <span style="font-weight:bold;">VNET2</span> to <span style="font-weight:bold;">Local</span> via <span style="font-weight:bold;">VNET1 </span>or from <span style="font-weight:bold;">Local </span>to <span style="font-weight:bold;">VNET2</span> via <span style="font-weight:bold;">VNET1</span>. I must directly connect <span style="font-weight:bold;">VNET2</span> to <span style="font-weight:bold;">Local</span> to have this connectivity.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:16.0pt;">Completing the fully meshed topology</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">To complete the full mesh topology we now need to connect <strong>VNET2</strong> to our <strong>Local</strong> On-Premises network and we will do this by once again exporting the <strong>networkconfig.xml</strong> file and modifying the file as we did previously. This time I am modifying the <strong>vNet2</strong> gateway section adding &quot;<strong>Local</strong>&quot; to the <strong>&lt;ConnectionsToLocalNetwork&gt;</strong>&nbsp; node as per below:</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/34.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/34.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/34.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/34.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Once complete, save the file and import it into the Azure Portal as we did previously. We now need to set our pre-shared key between <strong>VNET2</strong> and our <strong>Local</strong> on-premises VPN:</p>
<p><span style="font-family:Consolas;font-size:9.0pt;"><span style="font-family:Consolas;font-size:9.0pt;">Set-AzureVNetGatewayKey -VNetName VNet2 -LocalNetworkSiteName Local -SharedKey sharedkey123</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Once completed, our dashboard will update to show a multi-site connection for <span style="font-weight:bold;">vNet2</span>:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/35.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/35.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/35.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/35.png" border="0" /></a></p>
<p><span style="font-family:Calibri;font-size:11.0pt;">We are now fully meshed from the Azure side. To complete connectivity, I need to add another </span><span style="font-weight:bold;font-family:Calibri;font-size:11.0pt;">Demand Dial Interface</span><span style="font-family:Calibri;font-size:11.0pt;"> on my on premises RRAS server to connect back to VNET2. Follow my previous article to walk through the creation of a demand dial interface on RRAS. The only difference in the RRAS Wizard will be to provide the </span><span style="font-weight:bold;font-family:Calibri;font-size:11.0pt;">Gateway IP Address</span><span style="font-family:Calibri;font-size:11.0pt;"> of the VNET2 dynamic gateway and to also provide the pre-shared key we used when executing the PowerShell command </span><span style="font-family:Consolas;font-size:9.0pt;">Set-AzureVNetGatewayKey </span><span style="font-family:Calibri;font-size:11.0pt;">just above.</span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/36.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/36.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/36.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/36.png" border="0" /></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;">Also make sure your static routes are configured correctly:</span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/37.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/37.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/37.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/37.png" border="0" /></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;">We verify connectivity back in the Azure Portal VNET2 Dashboard.</span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/38.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/38.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/38.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/38.png" border="0" /></a><br /></span></p>
<p><span style="font-family:Calibri;font-size:11.0pt;">&nbsp;</span></p>
<p></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">You can see that we are now connected to our <span style="font-weight:bold;">Local</span> network from <strong>vNet2</strong>.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Now that we have a meshed network, BAM! we can connect across all networks.</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong>Local On-Premises:</strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong>&nbsp;</strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/40.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/40.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/40.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/40.png" border="0" /></a></strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong>&nbsp;</strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong>VNET2:<br /></strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3872.41.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3872.41.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/3872.41.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/3872.41.png" border="0" /></a></strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;"><strong>&nbsp;</strong></p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt;">Hope this has been helpful!</p>]]></content:encoded>
    </item>
    <item>
      <title>Creating a site to site (S2S) VPN to Azure with RRAS, one physical NIC and a NAT gateway</title>
      <link>https://docs.microsoft.com/archive/blogs/diegoviso/creating-a-site-to-site-s2s-vpn-to-azure-with-rras-one-physical-nic-and-a-nat-gateway</link>
      <pubDate>Tue, 28 Oct 2014 00:19:00 GMT</pubDate>
      <dc:creator><![CDATA[Diego Viso - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/diegoviso/2014/10/28/creating-a-site-to-site-s2s-vpn-to-azure-with-rras-one-physical-nic-and-a-nat-gateway/</guid>
      <description><![CDATA[OK. You have a home lab and you are eager to have a play and create a S2S VPN into Azure with RRAS...]]></description>
      <content:encoded><![CDATA[<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">OK. You have a home lab and you are eager to have a play and create a S2S VPN into Azure with RRAS and you&#39;ve probably read guidance requiring you to have two network adapters, one for internet facing traffic and the other for internal facing traffic. You may have also read that you must assign a static public IP address on the Internet facing network adapter as you cannot NAT the traffic. While this is definitely the recommendation you would want to follow for a production environment, its sometimes not the easiest thing to accomplish in your home lab.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">In this blog I will show you how to configure a S2S VPN to Azure with RRAS, Hyper-V, a Physical NIC and a router that supports 1:1 NAT (sometimes known as DMZ or gaming mode). It assumes you have knowledge of Hyper-V, Azure and RRAS.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Sound good? Great&hellip; Let&#39;s get started!</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Pre - Requisite check!</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Firstly ensure that your ISP does not block the ports required to establish an IKEv2 tunnel. There is plenty of information <a href="/b/rrasblog/archive/2006/06/14/which-ports-to-unblock-for-vpn-traffic-to-pass-through.aspx">here</a> on which ports are required. Also please ensure you know how to create a VM in Hyper-V and Azure, how to assign virtual NICs (vNICs) and finally have some working knowledge of RRAS and to be honest, if you don&#39;t this article may be hard to follow.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>&nbsp;</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Lab Setup</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">I have a physical workstation with one physical network card which connects directly to my broadband modem. I have installed Hyper-V 2012 R2 and created a Hyper-V Virtual Switch which connects to this physical network card. My VM virtual NICs (vNICs) will connect to this virtual switch so they can access my physical network. I will be using a private IP range of 192.168.0.x to assign IP addresses to my vNICs, of course you can assign IP addresses in a private range of your choice, just make sure it does not overlap with the private range you will assign in Azure. The logical diagram below serves to illustrate the setup.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image001.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image001.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image001.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image001.png" border="0" /></a></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Configuring the RRAS VM</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Create yourself a Hyper-V Virtual Machine with two network adapters. Both of these adapters should connect to your external virtual switch and sit on your private physical network, (192.168.0.x network in my case) and then deploy Windows Server 2012 R2.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image002.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image002.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image002.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image002.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Ensure that you allocate a private IP address to each vNIC and label them so you can easily identify which vNIC will be used for &quot;internal&quot; traffic and which one will have &quot;external&quot; traffic forwarded to it. I&#39;ve labeled mine &quot;internal&quot; and &quot;external&quot; as per the picture.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;">&nbsp;</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image003.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image003.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image003.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image003.png" border="0" /></a></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now we need to fine tune the adapter properties of the &quot;external&quot; vNIC. Uncheck all the items as per the picture below and leave only TCP/IP v4 selected. Also ensure that you only have the gateway IP address for your modem set on your &quot;external&quot; vNIC. Ensure you remove it from your &quot;internal&quot; vNIC.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image004.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image004.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image004.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image004.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><strong><span style="font-family:verdana,geneva;">&nbsp;</span></strong></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Configuring the Modem for 1:1 NAT</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now, these steps differ for different modems but essentially you need to do some form of Port Forwarding for incoming traffic. In my case I have a mode called DMZ which will forward all ports from the internet to a private IP address of my choosing. I am forwarding to 192.168.0.20 which has been allocated to the RRAS VM vNIC I have labeled as &quot;external&quot;.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image005.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image005.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image005.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image005.png" border="0" /></a></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Configuring the Azure Virtual Network</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">In any scenario it is usually recommended practice to define your Azure Virtual Network before you start provisioning virtual infrastructure. Very much as in the physical world, planning your network is paramount before rolling out services.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">In this case we are going to create a simple Virtual Network. Let&#39;s head over to the <a href="https://manage.windowsazure.com/">Azure Portal</a>. In the Azure Portal lets <span style="font-weight:bold;">Custom Create</span> a new Virtual Network.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image006.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image006.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image006.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image006.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Give it a name of your choice and select your closest region</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image007.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image007.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image007.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image007.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now in this section I have specified a DNS server IP address as <span style="font-weight:bold;">I am going to spin up a Domain Controller VM in Azure on this network to do our connectivity test</span>. You can however leave this blank as its optional. I am not going to select to configure a S2S VPN at this stage so leave it unchecked.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;font-weight:bold;">Note: I will not be showing you have to create a VM in Azure.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image008.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image008.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image008.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image008.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">This next step is important. We need to define our private address space in Azure. You need to ensure this does not overlap with the range you defined in your home lab. As I am using the 192.168.0.x at home I will used the 10.0.x.x range in Azure. On the screen shot below you can see how I have defined the address space and then sub divided this range into multiple subnets. This provides a nice level of flexibility.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image009.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image009.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image009.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image009.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">You can however choose to consume the entire space as a single subnet if you wish.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;font-weight:bold;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image010.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image010.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image010.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image010.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Once you finish the Wizard you will see a new virtual network created under Networks. Time to configure our <span style="font-weight:bold;">Local Network</span> so Azure understands how to route traffic between the environments. Click on <span style="font-weight:bold;">Local Network.</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image011.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image011.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image011.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image011.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now go ahead and<span style="font-weight:bold;"> Add A Local Network</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><span style="font-weight:bold;">&nbsp;</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><span style="font-weight:bold;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image012.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image012.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image012.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image012.png" border="0" /></a><br /></span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:11pt;">Provide a </span><span style="font-size:11pt;font-weight:bold;">Name</span><span style="font-size:11pt;">, I&#39;ve called mine &quot;Local&quot; and then provide the Public IP address of your broadband modem under the </span><span style="font-size:11pt;font-weight:bold;">VPN Device IP Address</span><span style="font-size:11pt;">. If you&#39;re not sure&hellip; Ask Bing :) </span><span style="font-size:8pt;">&nbsp;</span><a href="https://www.bing.com/search?q=whats+my+ip+address"><span style="font-size:11pt;">https://www.bing.com/search?q=whats+my+ip+address</span></a></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;font-weight:bold;">Note: If your ISP provides you with a DHCP IP Address, the VPN Device IP Address may need to be changed periodically.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><span style="font-weight:bold;">&nbsp;</span></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image013.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image013.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image013.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image013.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">On the next page, specify the address space for your home network. In my case it is 192.168.0.x and I&#39;m using a /24 mask to tell Azure that everything from 192.168.0.0 to 192.168.0.255 should be routed across the VPN to my home lab.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image014.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image014.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image014.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image014.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Done.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Configuring the Azure S2S VPN and Gateway</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now that you have defined your Local Network in Azure lets create our site to site VPN in Azure.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Head over to the <span style="font-weight:bold;">Configure</span> section of your Virtual Network and scroll down to select the <span style="font-weight:bold;">Connect to the local network</span> option under Site-To-Site connectivity. Also ensure the your &quot;Local&quot; network is selected in the <span style="font-weight:bold;">Local Network</span> drop down box. Azure will now automatically add an additional subnet in your Azure network address space for the Gateway and it&#39;s worth noting that IP addresses between x.x.x.0 and x.x.x.3 in each Azure subnet will be reserved for services such as the Gateway.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image015.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image015.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image015.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image015.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">When you&#39;re done click <span style="font-weight:bold;">Save</span> down the bottom of the page and return to the dashboard view of your Virtual Network. Go ahead and create the actual gateway device by clicking <span style="font-weight:bold;">Create Gateway</span> at the bottom of the page and select <span style="font-weight:bold;">Dynamic routing</span>. If dynamic routing does not show as an option, you probably have point to site connectivity enabled.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image016.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image016.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image016.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image016.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Azure will now spin up a couple of gateways for you. This will take 15 minutes, so go grab a coffee.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Configuring the home lab RRAS Server</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Head back to your home lab RRAS VM. Add the <span style="font-weight:bold;">Routing and Remote Access</span> role from <span style="font-weight:bold;">Server Manager</span>. Once installed lets&nbsp;open up&nbsp;the <span style="font-weight:bold;">Routing and Remote Access</span> console to configure our VPN server.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Right Click your server and select <span style="font-weight:bold;">Configure and Enable Routing and Remote Access</span>.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Choose to create a<span style="font-weight:bold;"> Custom Configuration</span> and then Select VPN access and LAN routing from the list.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image017.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image017.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image017.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image017.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Once the Wizard completes you will be prompted to start RRAS. Start the service.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Next step is to click <span style="font-weight:bold;">Network Interfaces</span> and right click to create a <span style="font-weight:bold;">Demand-Dial Interface</span>. Give it a recognizable name. I named mine Azure.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image018.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image018.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image018.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image018.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Continue the Wizard. Choose to connect using a VPN.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image019.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image019.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image019.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image019.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Ensure you select IKEv2 as the type of VPN</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image020.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image020.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image020.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image020.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">On the next screen you will be prompted to enter a <span style="font-weight:bold;">Destination Address.</span> Enter the Azure Gateway IP Address located on the Azure virtual network dashboard.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image021.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image021.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image021.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image021.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">On the next screen ensure you have <span style="font-weight:bold;">NOT</span> selected to <span style="font-weight:bold;">Route IP packets on this interface</span>. I will show you how to do this later in the case you want to add other routes. Ensure everything else is unselected.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image022.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image022.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image022.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image022.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">You will be prompted to enter credentials on the following page, however we will be using a pre-shared key so just put in any username to activate the <span style="font-weight:bold;">Next</span> button and complete the wizard.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image023.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image023.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image023.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image023.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now we need to obtain our pre-shared key from the Azure Portal. Head over to the portal and go to your Virtual Network Dashboard. At the bottom of the page you will have a <span style="font-weight:bold;">Manage Key</span> icon which will pop up the window below. Copy this pre-shared key.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image024.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image024.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image024.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image024.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Back on your home lab RRAS VM, right click your new Demand Dial interface and select <span style="font-weight:bold;">Properties</span>. Under <span style="font-weight:bold;">Security,</span> enter your pre-shared key.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image025.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image025.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image025.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image025.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">We now need to add a static route so RRAS understands what traffic to route to Azure. We could of added this through the Wizard as mentioned earlier but I prefer to do it manually.&nbsp; Under the <strong>IPv4</strong> node right click <strong>Static Route</strong> and select <strong>New</strong> <strong>Static Route</strong>. Ensure your &quot;Azure&quot; interface is selected and specify the network. In my case I have added the 10.10.x.x network and given it a metric of 1 to ensure highest routing priority.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image026.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image026.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image026.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image026.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Once this is done go ahead and&nbsp;<span style="font-weight:bold;">Connect</span> your interface by right clicking your interface and selecting&nbsp;<span style="font-weight:bold;">Connect</span>!</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image027.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image027.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image027.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image027.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">After you confirm your interface is connected in RRAS head over to the Azure dashboard to confirm the same.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image028.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image028.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image028.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image028.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-weight:bold;">Note: </span>if you receive an error from RRAS when connecting to the Azure VPN ensure that your public IP address is still the same as what you specified when creating the <span style="font-weight:bold;">Local Network</span> which we did earlier.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:16pt;"><span style="font-family:arial,helvetica,sans-serif;"><strong>Testing connection across the VPN</strong></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">There&#39;s a few ways to test that your connectivity is functioning. Some people use ping, but you need to ensure firewalls are configured appropriately. As I mentioned at the beginning of the article I have spun up a VM in Azure with an IP address of 10.10.10.4. My test will be to open up an RDP session from my home lab RRAS VM to my Azure VM.</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">BAM! Success</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image029.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image029.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image029.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image029.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Now let&#39;s RDP from the Azure VM to my on-premises RRAS VM. Note I am connecting via the &quot;internal&quot; interface - 192.168.0.120</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">BAM!</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image030.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image030.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/62/clip_image030.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-62/clip_5F00_image030.png" border="0" /></a><br /></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Hope this has been helpful!</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">Thanks to Matt Hitchcock for reviewing the blog. Matt is a Microsoft Consultant as well as an MVP for Powershell. You can catch his blogs over here: <a href="https://sgitpro.com/">https://sgitpro.com</a></span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"><span style="font-family:arial,helvetica,sans-serif;">&nbsp;</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt;"></p>]]></content:encoded>
    </item>
  </channel>
</rss>