Lab1 VM Creation
Lab1 VM Creation
Scenario
In this walkthrough, we will create a virtual machine in the Azure Portal, connect to the virtual
machine, install the web server role and test.
Note: Take time during this walk-through to click and read the Informational icons.
Task 1: Create the virtual machine
Settings Values
Subscription CloudShare2
Resource group myRGVM-
RPT4WEA4J3
Virtual machine myVM
name
Region (US) East US
Availability options No infrastructure
redundancy required
Security type Standard
Image Windows Server
2019 Datacenter -
Gen2
Size Standard D2s v3
Administrator azureuser
account username
Administrator e5gFECWqXc9M5nXY
account password
(type in carefully!)
Public inbound port Allow select ports
Select inbound RDP
ports (3389) and HTTP
(80)
6. Switch to the Networking tab, and look for the Select inbound ports:
Settings Values
Boot diagnostics Disable
8. Leave the remaining defaults and then click the Review + create button at the bottom of
the page.
9. Once Validation is passed click the Create button.
Note: It can often take anywhere from five to seven minutes to deploy the virtual
machine.
10. You will receive updates on the deployment page and via the Notifications area (the bell
icon in the top menu).
1. Click on bell icon from the upper blue toolbar, and select Go to resource when your
deployment has succeded.
Note: You could also use the Go to resource link on the deployment page
2. On the virtual machine Overview blade, click the Connect button and choose RDP.
Note: The following directions tell you how to connect to your VM from a Windows
computer. On a Mac, you need an RDP client such as this Remote Desktop Client (RDP)
from the Mac App Store and on Linux virtual machine you could connect directly from a
bash shell using ssh.
3. In the Connect to virtual machine page, keep the default options to connect with the
public IP address over port 3389 and click Download RDP File.
4. Open the downloaded RDP file and click Connect when prompted.
5. In the Windows Security window, sign in using the Admin Credentials you used when
creating your VM azureuser and the password e5gFECWqXc9M5nXY.
6. You may receive a warning certificate during the sign-in process. Click Yes or to create the
connection and connect to your deployed VM. You should connect successfully.
Congratulations! You have deployed and connected to a Windows Server virtual machine in
Azure
Task 3: Install the web server role and test
In this task, install the Web Server role on the server on the Virtual Machine you just created and
ensure the default IIS welcome page will be displayed.
1. In the newly opened virtual machine, launch PowerShell by searching PowerShell in the
search bar, when found right click Windows PowerShell to Run as administrator.
2. In PowerShell, install the Web-Server feature on the virtual machine by running the
following command.
3. Install-WindowsFeature -name Web-Server -IncludeManagementTools
4. When completed, a prompt will state Success with a value True. You do not need to
restart the virtual machine to complete the installation. Close the RDP connection to the
VM by clicking the x on the blue bar at the top center of your virtual machine. You can
also minimize it by clicking the - on the blue bar at the top center.
5. Back in the portal, navigate back to the Overview blade of myVM and, use the Copy to
clipboard button to copy the public IP address of myVM, then open a new browser tab,
paste the public IP address into the URL text box, and press the Enter key to browse to it.
6. The default IIS Web Server welcome page will be displayed.
Congratulations! You have created a new VM running a web server that is accessible via its
public IP address. If you had a web application to host, you could deploy application files to the
virtual machine and host them for public access on the deployed virtual machine.
Dès que vous n’en avez plus besoin, vous pouvez supprimer le groupe de ressources,
la machine virtuelle et toutes les ressources associées. Pour cela, sélectionnez le
groupe de ressources de la machine virtuelle, sélectionnez Supprimer, puis confirmez
le nom du groupe de ressources à supprimer.