Sei sulla pagina 1di 4

AzureCon Challenge

Your First Virtual Machine on Azure


Overview
At its core, Azure is a global set of data centers that contain hundreds of thousands of physical servers that run Windows Server and Hyper-V. These servers
and virtual machines that run on the physical servers are networked and have access to virtually unlimited network accessible storage. In Azure these low
level capabilities are presented as a set of Infrastructure Services (or IaaS) that provide an abstraction over the physical computer, network and storage.
Other services in Azure abstract you away from the computer entirely to the service that you need for example a database or a web server farm. This is
called PaaS and other challenges cover these capabilities. In this challenge you will stay at the low Infrastructure Services level and create two Virtual
Machines and connect to them.

1. Login to Azure
For this challenge, you have either elected to use your own subscription or have created a new Azure
subscription using the provided Azure Pass (or Free Trial). If you want to switch to use the provided Azure
Pass the promotion code is displayed on the My Account page on the http://challenge.azurecon.com web
site. If there is no promo code displayed, you will need to use the free trial http://azure.microsoft.com/pricing/free-trial.
Azure has TWO management portals - the classic portal (http://manage.windowsazure.com) and a new
portal that is in Preview at http://portal.azure.com. You will use the Preview portal in this challenge.
1.

Open a browser and go to http://portal.azure.com

2.

Enter your Microsoft Account email address and password for the Microsoft Account you
associated with your Azure Pass or your own subscription.

3.

You will now be in your Azure subscription (see opposite) and from here you can create and
manage Azure services.

2. Provision a Quick Virtual Machine


1.

On the management portal, click + NEW -> COMPUTE -> Windows Server
2012 R2 Datacenter.

2.

A new blade will open. Make sure the Deployment Model is set to Classic.
Click the CREATE button at the bottom. The Create VM blade will open.

3.

First pick a LOCATION to deploy your VM into (the bottom option on the
blade). Select ANY location it does not even have to be near you you have
access to computer all over the world now .

4.

For the Host Name, you need to create a unique name. It can be anything and you will get a little
indicating it is unique. As a suggestion,
start with your email alias prefix and then -quickvm. So if your alias is bsmith@contoso.com, you would use
bsmith-quickvm there is a limit of 15 characters on the VM name.

5.

For user name, enter <your alias> and then admin so bsmithadmin in our example.

6.

For password, enter a password you can remember write it down!

7.

Click Pricing Tier and in the new blade, Click the A1 Standard VM size and
click SELECT at the bottom of the blade.

8.

Click the CREATE button at the bottom of the Create VM blade.


Your Virtual Machine will start provisioning and you will see a tile in the portal
on the Startboard. You can always get to the Startboard and customize what
is on the startboard by clicking the Microsoft Azure logo on the top left of
the Portal.
It will take 5 minutes or so for this to complete and once it does complete, you
will connect to it. While you wait for that, you will create another VM.

Page | 1

3. Your Next Virtual Machine the New Way.


Remember above when you started creating the VM, you made sure the Deployment Mode was set to Classic. The other deployment mode is called
Resource Manager.
In Azure, all resources you can provision are moving over to this new deployment model. Fundamentally, this new model is different deep down under the
covers of Azure so that there is much more flexibility in how you can deploy and connect resources together. You will see this difference after you create
your second VM. This will become the default way moving forward. It also results in TWO types of VMs that are surfaced in the portal you will see the
label Virtual Machine (Classic) which is the classic deployment mode and just Virtual Machines for the Resource Manager deployment mode.
1.

Click + NEW -> COMPUTE and select Marketplace (at the very top).

2.

You will see a long list of software that you can install on a VM or even more complex multi-VM
solutions.

3.

Scroll down in the list to the Linux section. Yes !!! Azure has Linux and not only Linux
operating systems but lots of Linux based software as well. Click the Ubuntu Server option and
select any of the available versions.

4.

CHANGE the deployment model to Resource Manager and click Create.

5.

You will get the Basics blade. This is a slightly different flow to the Classic flow and one
advantage of Resource Manager is that its easy to create custom flows as you capture the
parameters you need to create the resources you will deploy.

6.

For Name, just like the first VM you need a unique computer name. Use your alias again and ubuntu - So if your alias is bsmith@contoso.com use bsmith-ubuntu.

7.

Use the same username and password you used for your first VM. Leave the Authentication type set to Password.

8.

Leave subscription alone since you only have one subscription (assuming you are using the Azure Pass/Free Trail option).

9.

For Resource Group click the Select Existing link. This changes the label to Not
Configured so click Not Configured and then you will see a single Resource Group with
the name Group click this!

10.

Click OK to complete this blade and the blade for the next step will appear which is the
Choose a Size blade.

11.

Click the View All link (towards the top of the blade next to the * Recommended text see
opposite).
There are MANY combinations of VM sizes. In addition, different sizes have different features
things like the number of data disks that can be attached varies as well as load
balancing/auto scale support. The PRICE is displayed based on how much Ram/CPU and
Feature set is needed.
But REMEMBER you can always change this anytime..!

12.

Scroll all the way down the list and select the smallest VM available an A0 Basic yes it
really is only $13 a month (or your local currency equivalent). Click the SELECT button.

13.

Accept all the defaults on the Setting blade just click OK.

14.

Click OK on the summary. Your new Linux VM will start creating.

15.

Your first VM (A) in the screen shot opposite should be running at this point. You will see your Ubuntu VM (B) deploying. If you click (C), you will
see only your first quickvm remember you deployed this in classic mode. If
you click (D) you will only see your Ubuntu VM.

16.

Click Resource Groups on the left nav (should be under + New).


Remember you deployed both virtual machines (and all the related resources
needed for a VM) into this same resource group called Group. You can use
your own names this was just the default used when you created the first VM.

17.

Click Group you will see in the Summary box on the new blade a number of
resources these are all services your VMs need to work. Things like storage
accounts (for your virtual hard disks), networks and so on.

Page | 2

4. Connect to Your Virtual Machine


1.

Find your first Virtual Machine in the Portal it should have completed now and its status should be RUNNING (Hint: click BROWSE -> Virtual
Machines (classic)). Wait for the VM status for your quickvm to be RUNNING if it isnt.

2.

Click the VM Name to display the VM blade.

3.

At the top of the blade, click the Connect button. Depending on your browser, you will get some sort of download notification about an .rdp
file. If you are running on a Mac, you will need to install the Microsoft Remote Desktop Client from the App Store.

4.

Open the file and follow the prompts to connect. You will need to enter your credentials for the machine you are connecting to at some point.
These are the username and password that you entered when you created your VM (steps 2.5 and 2.6 above). Accept any security warnings.

5.

It can take 30-60 seconds for the connection to complete and for your remote desktop session to appear in full screen.

6.

Click the RESTORE button on the Remote Desktop Connection Bar at the top of your screen.

7.

On the new smaller window, right click the remote desktop application icon at the top left and then in
the context menu, select Smart Sizing. This puts your remote connection window into a resizable state so
the desktop resizes to the window size.

8.

At this point you have a ready, working computer at your disposal. You can install additional software,
start/stop the machine and so on Its JUST a computer. Now just to prove its a computer, you are going
to install something on it and use that software.

5. Connect to Your Linux Machine


To connect to your Linux/Ubuntu VM, you need the Linux equivalent of remote desktop there are a number of clients you can use, but the one you will
install/use from your Windows VM is Putty.
1.

On your Windows VM, first go to Server


Explorer (which should already be open)

2.

Click Local Server (A) above

3.

Find (B) IE Enhanced Security Mode and


click the ON link and select OFF for both
Administrators and Users and click OK.
The reason you did this is because this is a
server and by default IE is protected which
makes browsing the internet and
downloading software a bit tricky.

4.

On the VM, open Internet Explorer (click


Window -> select IE from the start page).
Go to http://putty.org

5.

Click the link to download PuTTY and on the next page, select the For Windows on Intel x86 section and click the putty.exe option

6.

Click SAVE AS point to your desktop and press save. CLOSE the browser and CLOSE
server manager.

7.

On your desktop, double click the PuTTY icon

8.

The first thing you need to know is the Public IP Address for the VM you want to connect
to. You need to go back to the Azure Portal, find your Ubuntu VM and get to the
dashboard (Hint: Click Virtual Machines (remember NOT the classic type) and click your
Ubuntu VM).

9.

In the essentials section of the Ubuntu VM blade, you will see the public IP address.
You can just copy this, and paste this in PuTTY but you are going to give your machine a
name instead.

10.

Click the Public IP Address and in the settings blade that opens for the public IP, click the
configuration section. At the bottom, you will see DNS Name Label (optional). In the
classic deployment mode, you always get a public DNS name, but in Resource Manager
Mode, its optional.

Page | 3

11.

Enter a name (e.g. youralias + -ubuntu, e.g. bsmith-ubuntu) for example. It must resolve ok
with the tick. Click SAVE. Note that the full name, the name you need to put into PuTTY is
the name you just typed + location + cloudapp.azure.com

12.

Type the value in the PuTTY Host Name box. Click OPEN. Click YES on the security alert.

13.

You will get the login prompt. Enter your VM credentials (e.g bsmithadmin and then your password).
You will then get logged onto your Linux machine, which you did FROM your Windows VM (which you connected to FROM your desktop machine)
sort of crazy science fiction isnt it?
and remember you can provision these machines anywhere across the 24
data center regions in Azure all around the globe. You can do this from
anywhere and manage these resources from anywhere.

6. Finish Up
1.

Go back to the Azure Portal and to the Virtual Machine blade for your
Ubuntu VM.
A VM on Azure is no different to a VM you might have used in your own data
center other than you dont have to worry about the hyper-visor and you dont
have to worry about the underlying disk or network infrastructure.

2.

Lets find how many virtual disks your VM has. You will see on the settings blade for your VM a Disks section click it.

3.

You will see a section for the OS DISK and a section for DATA DISKS. It is easy to just create new Virtual Disks and attach these to your VMs
this is typically what you would do to store application data on these additional disks.

4.

Click the OS Disk name it will open a blade and you will see a VHD location field. This
is the storage location in a service in Azure called Azure Storage. Remember the first part
of this name this is the name of your storage account so group1832 in this example
opposite.
A VM disk is after all just a file. In Azure this file your Virtual Disk is highly resilient a
triplicate copy is maintained for you across redundant, separate physical infrastructure.

5.

On the Left Nav in the Portal, click Browse > and from the long list of Azure Services,
find Storage Accounts (NOT storage accounts (classic))

6.

Find the account that matches your name from step 4 above. Click it.

7.

In the storage account blade, you will see four service types Blob Service, Tables, Queues
and Files. Click Blob Service

8.

In the Containers section on the next blade, click the vhds container. There you will see your actual .vhd file your virtual disk.

9.

Close the DISKS and the SETTINGS blades (just click the X top right of each blade).

Its good practice when not using your Virtual Machines, to shut them down.
10.

On the blade for each of the virtual machines, click the STOP button on the blade header and say YES to the warning.

Your VM will now stop, just like turning off a physical machine. All state is maintaining in the underlying virtual disk. The resources from the physical
computer and the IP address are released. If you were paying, your costs for the running VM would stop. You would still pay for the storage of the
virtual disk.
--- END OF LAB --Go back to the AzureCon Challenge web site (http://challenge.azurecon.com) and complete the challenge question to get your points.
REMEMBER: You only have one chance at the question, make sure you really know the answer!

Page | 4

Potrebbero piacerti anche