• No results found

Hands on Lab: Building a Virtual Machine and Uploading VM Images to the Cloud using Windows Azure Infrastructure Services

N/A
N/A
Protected

Academic year: 2021

Share "Hands on Lab: Building a Virtual Machine and Uploading VM Images to the Cloud using Windows Azure Infrastructure Services"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

Hands‐on
Lab:
Building
a
Virtual
Machine
and


Uploading
VM
Images
to
the
Cloud
using


Windows
Azure
Infrastructure
Services


Windows Azure Infrastructure Services provides cloud‐based storage, virtual networks and virtual  machines that can be provisioned on‐demand to support lab, pilot or production application workloads.   

In this Hands‐on Lab, you’ll build a network and then a virtual machine on that network, next you  download a Server 2012 virtual hard disk(VHD), inject a folder into the VHD, then upload the VHD to  Azure for deployment purposes.  

You’ll be leveraging our Windows Azure FREE Trial Subscription program to build a free cloud‐based lab  environment.   

Lab
Requirements


The following components are required to successfully complete this Hands‐on Lab: 

• A modern web‐browser with HTML5 and Javascript enabled 

• Remote Desktop Client connection software 

• Internet connectivity 

Lab
Conventions


In this lab, we’ll be using a naming convention of XXXlabYYY01, where XXX will be replaced with your  unique initials and YYY will be replaced with an abbreviation representing the function of a virtual  machine or Windows Azure configuration component (ad, db or app). 

Let’s
Get
Started!


In this step‐by‐step guide, you will learn how to: 

• Get Started with Windows Azure Infrastructure Services 

• Define a Virtual Network in Windows Azure 

• Configure a Windows Azure VM 

(2)

Exercise
1:
Get
Started
with
Windows
Azure
Infrastructure
Services


In this exercise, you will activate a free Windows Azure Trial Subscription and then setup two 

components that will be needed for the other exercises in this lab: a Windows Azure Affinity Group and  a Windows Azure Storage Account. 

1) Sign‐up for your FREE Windows Azure Trial Account.  

   

Sign‐up for a FREE trial of Windows Azure at http://aka.ms/mshosting so that you can follow along  with the steps in this Hands‐on Lab.   

   

2) When signing up for a Free Trial subscription, you will be prompted to login with Microsoft Account  (formerly Windows Live ID) credentials.  If you do not have valid Microsoft Account credentials, you  may create new credentials at https://signup.live.com.    

   

Note: During the Free Trial sign‐up process, you will be asked for credit card information to confirm  that you are a legitimate free trial subscriber.  Your credit card information is only used to confirm  your identity and you will NOT be charged for any Windows Azure services unless you explicitly  convert your trial subscription to a paid subscription at a later date.  

 

(3)

3) Choose from one of the options below that best fits your need:

   

4) Fill‐in the appropriate information for your account. 

5) Take the 30 second tour to see how the new management portal makes creating and managing your  cloud resources easy:  

(4)

6) Notice where to Sign out, Change password, View your bill, Contact Microsoft Support, Give  feedback, Privacy & cookies and Legal: 

  7) You can create use this portal to quickly set up new services, resources, and components with 

minimal intial configuration: 

(5)

 

8) The Command bar provides quick access to global and contextual commands such as Browse,  Restart, Stop, Upload, Delete and configuration tasks: 

   

9) Notifications provide you with status updates for active commands and service health, as well as  quick access to Help: 

(6)

10) Login to the Windows Azure Management Portal.  

   

Login to the web‐based Windows Azure Management Portal at http://manage.windowsazure.com  with the same logon credentials you used to sign‐up for the FREE Trial above.   

 

Once you’ve logged in, you should see the main Windows Azure Management portal dashboard.  

 

On the blue side navigation bar of the Windows Azure Management Portal, you’ll find the options  for managing Virtual Machines, Virtual Networks, Storage and Settings in the cloud.  These are the  items we’ll be primarily working with in this hands‐on lab.   

 

You may need to scroll the blue side navigation bar up and down to see all of the options. 

(7)

    

11) Define a new Windows Azure Affinity Group.  

   

Affinity Groups in Windows Azure are used to group your cloud‐based services together, such as  Virtual Machines, Virtual Networks and Storage, in order to achieve optimal performance. When  you use an affinity group, Windows Azure will keep all services that belong to your affinity group  running within the same data center as close as possible to each other to reduce latency and  increase performance.  

 

a) Create a new Affinity Group by selecting Settings from the blue side navigation bar in the  Windows Azure Management Portal.  You may need to scroll the blue side navigation bar down  to see this selection. 

 

b) On the Settings page, select the Affinity Groups tab on the top navigation bar.   

(8)

d) On the Create Affinity Group form, enter the following details:  

   

Name: Enter a unique name for your new Affinity Group, such as XXXlab01 (where XXX is  replaced with your initials)  

   

Region: Select the “East US” datacenter sub‐region. 

  

Click the   button to create a new Affinity Group. 

(9)

  

 

(10)

12) Create a new Windows Azure Storage Account.  

   

Virtual Machines that are provisioned in Windows Azure are stored in the world‐wide cloud‐based  Windows Azure Storage service.  In terms of high availability, the Storage service provides built‐in  storage replication capability – where every VM is replicated to three separate locations within the  Windows Azure data center region you select.  In addition, Windows Azure Storage provides a geo‐

replication feature for also replicating your VMs to a remote data center region.  

 

a) Create a new Storage account by clicking the +NEW button on the bottom toolbar in the  Windows Azure Management Portal and then select Data Services | Storage | Quick Create.    

  

Important Note:  If you create a virtual machine before you create a friendly storage account  name, you must first delete the .VHD files in the Virtual Machine portal under DISKS before  deleting the existing Storage Account. 

 

(11)

   

b) Complete the following fields for creating your Storage account:  

 

URL: Enter a unique name for your new storage account, such as XXXlabstor01 (where XXX is  replaced with your initials)  

   

Region/Affinity Group: Select the Affinity Group you created in Step 3 above.  

   

Enable Geo‐Replication: By default, this option is selected.  Leave the default option in place.  

   

Click the CREATE STORAGE ACCOUNT button to create your new Windows Azure Storage  account. 

(12)

   

 

Exercise
2:
Define
a
Virtual
Network
in
Windows
Azure


Define a common virtual network in Windows Azure for running Active Directory, Database and 

SharePoint virtual machines by performing the following steps: 

1) Sign in at the Windows Azure Management Portal with the logon credentials used when you signed  up for your Free Windows Azure Trial.  

  

2) Select Networks located on the side navigation panel on the Windows Azure Management Portal  page.  

3) Click the +NEW button located on the bottom navigation bar and select   Networks | Virtual Network | Quick Create.  

 

(13)

4) Complete the Virtual Network fields as follows:  

   

NAME: XXXlabnet01    

Address Space: 10.‐‐‐.‐‐‐.‐‐‐  

 

Maximum VM Count: 4096 [CIDR: /20]  

 

Affinity Group: Select the Affinity Group defined in Exercise 1 above. 

      

5) Click the CREATE A VIRTUAL NETWORK button.  

  6) Review your Virtual Networks setting : 

(14)

 

Exercise
3:
Provision
a
Windows
Azure
VM


Provision a new Windows Azure VM to run a Windows Server Active Directory domain 

controller in a new Active Directory forest by performing the following steps: 

7) Select Virtual Machines located on the side navigation panel on the Windows Azure Management  Portal page.  

 

8) Click the +NEW button located on the bottom navigation bar and select   Compute | Virtual Machines | From Gallery.  

  

In the Virtual Machine Operating System Selection list, select Windows Server 2012 Datacenter and  click the   button. 

(15)

   

(16)

   

 

(17)

  On the Virtual Machine Configuration page, complete the fields as follows:  

   

Version Release Date: Select the latest version release date to build a new VM with the latest OS  updates applied. 

 

Virtual Machine Name: XXXlabad01     

Size: Small (1 core, 1.75GB Memory)   

New User Name: Choose a secure local Administrator user account to provision. 

 

New Password and Confirm Password fields: Choose and confirm a new local Administrator password.  

   

Click the   button to continue.  

   

(18)

    

9) On the Virtual Machine Configuration page, complete the fields as follows for the Cloud Service  installation:  

   

Cloud Service: Create a new cloud service   

Cloud Service DNS Name: XXXlabad.cloudapp.net    

Region/Affinity Group/Virtual Network: Select XXXlabnet01 – the Virtual Network defined in  Exercise 3 above.  

 

Virtual Network Subnets: Select Subnet‐1 (10.0.0.0/23)     

Storage Account: Select the Storage Account defined in Exercise 1 above. 

  

Availability Set: Create an availability set    

Availability Set Name: XXXlabad     

Click the   button to continue.  

(19)

On the Virtual Machine Configuration ‐ Endpoints page, click the   button to accept the default  firewall endpoint values and begin provisioning the new virtual machine. 

(20)

As the new virtual machine is being provisioned, you will see the Status column on the Virtual  Machines page of the Windows Azure Management Portal cycle through several values including  Stopped, Stopped (Provisioning), and Running (Provisioning).  When provisioning for this new Virtual  Machine is completed, the Status column will display a value of Running and you may continue with  the next step in this guide.  

  

10) After the new virtual machine has finished provisioning, click on the name (XXXlabad01) of the new  Virtual Machine displayed on the Virtual Machines page of the Windows Azure Management Portal.  

  

11) On the virtual machine Dashboard page for XXXlabad01, make note of the Internal IP Address  displayed on this page located on the right‐side of the page.  This IP address should be listed as  10.0.0.4.   

     

12)   

 

(21)

 

Note: If you are logged in to a domain‐joined machine, you may need to select “User another account” 

and enter XXXlabad01\administrator then the password. 

(22)

Note: On XXXlabad01 you will connect to the virtual machine logging‐in with the user‐id and password  that you configured when creating the server.   

13) Connect back into XXXlabad01, go to Server Manager, select Local Server from the left menu, Click  on the “On” settings for IE Enhanced Security Configuration and select “Off” for Administrators, then  click Ok. 

 

Now if the RDP session is open full screen, hit the Windows button or go to the Start screen by

placing the mouse in the top right corner and clicking on the Windows icon. Double click on

Internet Explorer. Once the browser is displayed enter in

http://aka.ms/WS2012R2vhd 

Now select

to “Download the Evaluation VHD” and click on “Get Started Now”

(23)

14) Sign in with your Microsoft ID: 

15) Click on Continue:   

 

(24)

16) Provided your information is up to date, click on Continue again please: 

17) Click on “Download the Installer”:   

 

(25)

18) Click on “Run”: 

19) Click on “I Agree” then click on “Next”:   

 

(26)

20) The downloader will now launch and ask for the location in which to save the VHD file.  Leave as  Documents and click “Save”: 

21) Click on “Close”, take note that the downloader is moving rapidly to completion!   

22) Now click to open a new tab in Internet Explorer.  Once there go to  

(27)

23) Now click on the drop down menu next to the Windows Azure logo and select Downloads: 

24) Scroll to the bottom and select the Windows Azure PowerShell tools:   

25) At the bottom of the screen click on “Run”:   

26) Click on “Install”:   

(28)

27) Click on “I Accept”:

28) The setup process should proceed as planned and complete soon thereafter:   

(29)

29) Click on Finish, then close out of the Installer: 

30) Now verify the the Server 2012 VHD download has completed.  Double click on the downloaded file    which should be in the Downloads folder in the user profile directory.  Once this process is 

completed navigate into the newly expanded directory and rename the file Server2012Eval: 

(30)

31) Once the download is finished, make note of it’s location. The default is  c:\users\<username>\documents. 

 

32) Return to the Start screen by pressing the Windows key and type in Azure.  You should see the  newly installed Windows Azure Tools, right click and select to “Run As Administrator”: 

33) Type in ISE and hit enter, that should open up the PowerShell ISE, next type in Get‐  

AzurePublishSettingsFile and press Enter:

(31)

34) Now enter in the Microsoft ID credentials: 

   

35) At the bottom of the screen click on Save: 

   

36) Once it is completed, close Internet Explorer, return to the PowerShell window, enter in Import‐

AzurePublishSettingsFile “location\filename” as shown here: 

   

(32)

38) In the Windows Azure portal click on Storage and then take note of the Blob location URL: 

   

39) Now return to the Azure PowerShell window and enter in the following command:      

add‐azurevhd –Destination http://storageurl –LocalFilePath C:\users\...\Server2012Eval.vhd

   

40) Add the Image to your list of custom images. Back to the Azure management portal. 

a) From the Management Portal, under All Items, click Virtual Machines  b) Under Virtual Machines, click Images, and then click Create. 

(33)

c) In Create an image from a VHD, specify a name and the URL to the .vhd that you uploaded. 

   

d) Check I have run Sysprep on the virtual machine associated with this VHD to acknowledge that  you generalized the operating system in Step 2, and then click OK. 

Now your Image has been added to Azure and is ready to provision! 

(34)

 

For extra credit / fun try some other actions with your environment: 

Create a Server with the image you just uploaded 

Configure a Point to Site VPN for secure management 

http://msdn.microsoft.com/en‐us/library/windowsazure/dn133792.aspx 

Setup a Webserver for the world to see! 

See what you can do with other PowerShell Commands like these: 

Get-AzureStorageAccount  Get-AzureVMImage

Restart-AzureVM -ServiceName $cloudSvcName -Name $vmname Stop-AzureVM -ServiceName $cloudSvcName -Name $vmname Start-AzureVM -ServiceName $cloudSvcName -Name $vmname Start-AzureVM -ServiceName $cloudSvcName -Name $vmname 

Try one of the Labs in the resources below.  

 

Additional
Resources


Congratulations! You’ve completed this Hands‐on Lab for Building a Virtual Machine and Uploading a  VM Disk to the Microsoft Cloud using Windows Azure Infrastructure Services. 

If you enjoyed this Hands‐On Lab, be sure to check‐out our full set of Cloud Step‐By‐Step Guides for  building other common hybrid cloud scenarios: 

• Cloud Labs Step‐by‐Step Guides  http://aka.ms/CloudLab  

  

• Guided Hands‐On Lab: Build a Cross‐Premises Site‐to‐Site VPN    http://aka.ms/VNetCloudLab 

  

• Guided Hands‐On Lab: Migrate VMs from VMware to Windows Azure   http://aka.ms/VMWCloudLab  

  

• Guided Hands‐On Lab: Migrate VMs from Amazon AWS to Windows Azure   http://aka.ms/AWSCloudLab 

  

• Guided Hands‐On Lab: Orchestrate Private Cloud Failover with Windows Azure Hyper‐V Recovery  Manager  

http://aka.ms/HVMCloudLab    

• Build Your Private Cloud in a Month   http://aka.ms/BuildYourCloud     

References

Related documents

[r]

connectivity · Ethernet Switch · Antenna Distribution System shure ® softWare solutions · Wireless Workbench ® 6 microphone systems · Transmitters · Receiver · Batteries

○ If BP elevated, think primary aldosteronism, Cushing’s, renal artery stenosis, ○ If BP normal, think hypomagnesemia, severe hypoK, Bartter’s, NaHCO3,

Select “Start” (windows start button), go to “Programs”, go to “AT&amp;T Passport for Windows”, then go to “Passport IP”. The “Connection Setup screen” is the

Also make sure to set a security policy that requires use of a VPN between the SEIL private address space and the Windows Azure virtual network address space. This completes VPN

So, this paper covers the comparative analysis of the firms’ to develop insights on their patenting trends, main focus areas of research and shedding a light on

1) Open Windows Update by swiping in from the right edge of the screen (or, if you're using a mouse, pointing to the lower-right corner of the screen and moving the mouse pointer

Under Window 7, open the 'Symantec Endpoint Protection' window by double-clicking on the SEP icon in your taskbar at the bottom-right corner of your screen on Windows 8 / 8.1