Changes

Jump to: navigation, search

OPS705 Lab 2 (2207)

1,485 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|400px375px|Figure 3. The Overview page blade for the winserv VM. Notice its status as ''Stopped (Deallocated)''.]]
This section is fairly simple. The one thing to never forget: Ensure your VM's status is set to '''Stopped (Deallocated)'''.
# In the ''Overview'' blade of your Windows Server VM, click on the '''Stop''' button.
# Don't worry about going into the Windows OS and shutting down first. Azure sends a signal to the VM to shut down safely.
# If your VM status says stopped, but does not include the '''(Deallocated)''' text, then resources are still being held by the VM and we're still being charged. The stop button will still be available, so click it.
# When you want to start the VM up again, click the '''Start''' button at the top of the blade.
# If you want to reboot the VM, do so from inside the OS.
= INVESTIGATION 2: Managing a CentOS Linux VM in Azure =
# '''Choose a base:''' CentOS-based 7.8
# '''Virtual machine name:''' yourSenecaUsername-lnx# '''User name:''' yourSenecaUsername-lnx
# '''Authentication type:''' Password
# '''Use a saved secret:''' Unchecked
# 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