Changes

Jump to: navigation, search

OPS705 Lab 2 (2207)

1,364 bytes added, 19:59, 5 October 2020
Lab Submission
In this lab, you will learn how to create Windows and Linux virtual machines using a pre-built image, how to remotely connect to each, and basic management of these VMs from the Azure web interface. These two VMs will be used extensively in your later labs. This lab assumes you have completed [[OPS705_Lab_1 | Lab 1]] successfully. Refer back to that lab for reminders on the basics of the Azure Dashboard interface.
While you are working through this lab, it is highly recommended that you write notes down in your OPS705 Lab Logbook. These are general notes and commands to help you remember how to do this lab. Each lab has its own page in the logbook. You may use this logbook your notes during all quizzestests, so fill it out accordingly!
If you encounter technical issues, please contact your professor via e-mail or in your section's Microsoft Teams group.
# Your Seneca Azure login credentials
# Your linked mobile device for 2FA
# Your [[File:OPS705_Lab_Logbook | OPS705 Lab Logbook]]
= INVESTIGATION 1: Managing a Windows Server 2016 VM in Azure =
== Part 2: Accessing Your Windows VM Remotely Using RDP ==
[[Image:Ops705_lab2_fig6.png|thumb|right|250px275px|Figure 2. The ''Remote Desktop Connection'' application on Windows.]]
In this section, we'll discover how to remotely connect to the Windows Server's desktop environment over the Internet from your computer.
# In the ''Overview'' tab for the Virtual Machine created in Part 1, look for the '''IP address or FQDN''' entry. This is the address you will use to connect later in this section. Write it down (Hover over the URL, and you'll see a ''Copy to clipboard'' icon).
# '''Do not skip Part 3 at this stage! Otherwise, you'll be bleeding funds by leaving the VM running.'''
== Part 3: Shutting Down Fully Stopping Your Windows Safely Virtual Machine ==[[Image:Ops705_lab2_fig7.png|thumb|right|350px375px|Figure 3. The Overview page blade for the winserv VM. Notice its status as ''Stopped''.]]This section is fairly simple. Whenever possible,''always'' shut down The one thing to never forget: Ensure your VMs properly. DonVM't automatically go s status is set to the Azure VM Overview and click '''Stop'Stopped (Deallocated)''. This is how you lose data and corrupt systems.# Remotely connect to the Windows Server desktop (if you haven't already).# Click on In the ''WindowsOverview'' Start iconblade of your Windows Server VM, and select click on the Power icon.# Select '''Shut downStop'', and choose a reason. It doesn't matter which at this point in the coursebutton.# Your VM A notification will now shutdown. You will lose appear in the top right of your browser window, confirming your remote connectionaction.# Switch back to your browser, Don't worry about going into the Windows OS and in shutting down first. Azure, load Virtual machines > winserv > Overview, and verify its Status is set sends a signal to '''Stopped'''. You may need the VM to refresh the page a few timesshut down safely.# You've successfully and properly shut down If your Windows VM!# status says stopped, but does not include the '''Bonus:(Deallocated)''' For shortcut glorytext, in then resources are still being held by the Windows VMand we're still being charged. The stop button will still be available, use the Winkey+R combo, and type <code>shutdown /p</code> in the Run dialog box instead of using the Start menuso click it.
= INVESTIGATION 2: Managing a CentOS Linux VM in Azure =
In this investigation, we'll create, configure, and manage a CentOS Minimal Virtual Machine using Microsoft Azure. This is a command line only OS, so you'll be using SSH to remotely connect to the VM and issue basic commands. This VM will be used extensively in [[OPS705_Lab_3 | Lab 3]].
== Part 1: Creating A CentOS VM From An Image ==
[[Image:Ops705_lab2_fig8.png|thumb|right|450px500px|Figure 4. Searching for a CentOS 7.8 Minimal image.]]
To create your CentOS VM, follow the steps from ''Investigation 1, Part 1'', but with the following settings:
# '''Choose a base:''' CentOS-based 7.8
# '''Virtual machine name:''' yourSenecaUsername-lnx# '''User name:''' yourSenecaUsername-lnx
# '''Authentication type:''' Password
# '''Use a saved secret:''' Unchecked
# '''Password:''' Same as your Windows Server VM
# '''Save as default password:''' Checked
# '''Virtual machine size:''' DS1_v2Standard_B1ms
# Click on the ''Advanced Settings'' tab.
# Under '''IP address''', select ''Public''.
# In the password field, type the password you gave when creating the VM. (You won't see anything as you type here; that's normal.)
# If login is successful, you should see a prompt like this: <code>[cjohnson30@cjohnson30-lnx ~]$</code>
# To prove you've completed this section, run the following: <code>echo "My name is ''insertFullName'', and I've completed the CentOS investigation!." > ~/lab2.txt</code># To quit, type <code>exit</code>. '''Don't do this, yet! Move to Part 3.'''
On macOS/Linux Using Terminal:
# When prompted for a password, use the one you gave when you created the VM. (You won't see anything as you type here; that's normal.)
# If login is successful, you should see a prompt like this: <code>[cjohnson30@cjohnson30-lnx ~]$</code>
# To prove you've completed this section, run the following: <code>echo "My name is ''insertFullName'', and I've completed the CentOS VM investigation!." > ~/lab2.txt</code># To quit, type <code>exit</code>. '''Don't do this, yet! Move to Part 3.'''
== Part 3: Shutting Down Fully Stopping your CentOS Safely VM ==As with the Windows Server VM, shutting down safely fully deallocating your VM is paramount for keeping your data and OS safeessential to responsible usage.
From # Click on the Linux command line:# Type: <code>sudo systemctl poweroff</code># Enter your password if asked. In Azure's ''OverviewStop''' button at the top of your CentOS the VM:# Ensure its Status is set to '''Stopped'''s Overview blade.
That's it!
In this quick investigation, we'll walk through how to directly manage virtual machines from the Azure Dashboard interface on a basic level. This is useful for starting up VMs, shutting them down when unresponsive, and deleting them when you're finished. ('''Warning:''' Do not delete either VM created in this lab!)
== Part 1: Powering On / Restarting A Virtual Machine ==
From the ''DevTest Labs'' blade:
# Click on the ''My virtual machines'' menu bar item.
# Click on the virtual machine you'd like to manageto move to its ''Overview'' blade.
# Click the '''Start''' menu button near the top.
From the ''DevTest Labs'' blade:
# Click on the ''My virtual machines'' menu bar item.
# Click on the virtual machine you'd like to manageto move to its ''Overview'' blade.
# Click the '''Stop''' menu button near the top.
Notice Remember the difference between the status ''Stopped'' and ''Stopped (deallocated)''! == Part 3: Restarting A Virtual Machine ==There are two methods to restarting a VM. Either within the OS, or through the Azure Dashboard. Inside the OS:* Windows: Click on Start, and select Power Off.* Linux: From the command line (SSH), type <code>sudo reboot</code>In either OS, you will be disconnected from your remote session. Wait a few minutes while the VM restarts, and reconnect. From Azure Dashboard:# Click on the '''Stop''' button from the VM's ''Overview'' blade.# Wait until the VM's status has changed to '''Stopped (Deallocated)'''.# Click on the '''Start''' button at the top of the blade. == Part 4: Deleting A Virtual Machine ==Deleting a Virtual Machine is useful when you no longer need it long-term, or if there's a catastrophic issue with the OS inside. Be careful! Any saved data inside the VM will be deleted as well!# Navigate to the VM's ''Overview'' blade.# If the VM status isn't '''Stopped (Deallocated)''', stop the VM. Wait until its status updates.# Click on the '''Delete''' button at the top of the blade.
== Part 35: Deleting A Virtual Machine Note About Resource Usage ==As mentioned during our lecture and throughout this lab, using resources responsibly is incredibly important. We pay for what we use. While we have a failsafe in place to stop all VMs at 2:00am EST daily, don't rely on it! Fully stop your VMs when you're not using them.
== Part 4: A Note About Resource Usage ==Your total allowed resource allocation has been restricted for this course. This means you can only have two VMs (or services) at a time. This includes Web Apps. If you have two already, you won't be able to add another until you delete one.
= Lab Submission =
Similar Submit to Blackboard's ''Lab 1, just finish Submission'' section full-desktop screenshots (PNG/JPG) of the lab! following:# Your professor will have access to view of the two VMs you created and will verify OPS705 DevTest Labs Overview blade.# The Azure ''Overview'' blade for your work'''Windows Server''' VM. Once you# The Azure ''Overview'' blade for your '''CentOS'''ve finished working on VM.# A full desktop screenshot of the text file created for your labWindows VM, shut down (not delete!) open in Notepad.# A screenshot of your CentOS remote SSH session after running the command: <code>cat ~/lab2.txt</code> Your professor will review your VMs to not waste fundsdirectly; the screenshots are a backup in case of catastrophic issues.  '''Your professor will spin them up again not check your lab until the screenshots have been submitted.''' Make sure to fully stop your VMs when marking.you're done!
[[Category:OPS705]]
[[Category:Digital Classroom]]
[[Category:Fall 2020]]
[[Category:Draft]]

Navigation menu