Skip to content

johnstel/AzureVMOperations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

VM Operation - Hands on Lab Guide

Authors:

Tom Wilde - Microsoft

Dan Baker - Microsoft

Contents

Prerequisites

Lab Introduction

Lab 1: Auto-shutdown

Lab 1.1: Configure Auto-shutdown

Lab 2: Backup

Lab 2.1: Protecting a VM with Backup

Lab 2.2: Restoring a VM from Azure Backup

Lab 3: Disaster Recovery

Lab 3.1: Enabling a VM for Disaster Recovery

Lab 3.2: Configuring Test Failover

Lab 4: Update Management

Lab 4.1: Configure Update Management

Lab 5: Inventory

Lab 5.1: Configure Inventory Management

Lab 6: Change Tracking

Lab 6.1: View Change Tracking

Conclusion

Useful References

Prerequisites

To complete this workshop, the following will be required:

  • A valid subscription to Azure. If you don't currently have a subscription, consider setting up a free trial. If this workshop is being hosted by a Microsoft Cloud Solution Architect, Azure passes should be provided.

  • At least one virtual machine to apply virtual machine operations on.

Lab Introduction

Contoso have recently migrated several of their on-premise resources to Microsoft Azure. These resources include virtual machines (both Windows 2016 and Ubuntu Linux), virtual networks and storage accounts. Unfortunately, as this is the first migration carried out, Contoso are somewhat unfamiliar with Azure (and public cloud platforms in general) – as a result, they haven't applied any virtual machine operations.

At the point of writing, virtual machine operations consist of Auto-Shutdown, Backup, Disaster Recovery, Update Management, Inventory and Change Tracking.

VM Operations

Figure 1: VM Operations

The Contoso IT team have requested your help to manage the infrastructure resources that they have migrated to Azure. Current challenges:

  1. Some virtual machines are not used outside working hours
  2. Some virtual machines have critical data on them but have no backup configured at all
  3. Critical virtual machines have no DR strategy
  4. Update Management WSUS
  5. Change Tracking

Lab 1: Auto-shutdown

Auto-shutdown speaks for itself, it's great from a cost saving perspective and commonly used in dev test scenarios where virtual machines are not needed after a specific time.

Lab 1.1: Confugre Auto-shutdown

In this lab, we’ll use the auto-shutdown operation to schedule a virtual machine to shutdown at a specific time.

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Auto-shutdown

3) Enable the feature, schedule the shutdown time for 5 minutes from now, confirm the correct local time zone is set, click save.

Auto-Shutdown

Figure 2: Auto-Shutdown

4) You can also get notifications via a webhook or email before the VM shuts down, around 15 minutes before the shutdown time.

Note: The auto-shutdown option has also been added as an optional extension when creating a new virtual machine using the Azure Portal.

Lab 2: Backup

Azure Backup enables you to back up and restore your data in the Microsoft cloud by replacing your existing on-premises or off-site backup solution with a reliable, secure, and cost-competitive alternative.

Lab 2.1: Protecting a VM with Backup

In this exercise we will enable Azure Backup on a virtual machine.

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Backup

3) Azure Backup requires a recovery vault. Create a new Recovery Services Vault named “vmbackup” and a new Backup Policy accepting the defaults.

Create Vault and backup Policy

Figure 3: Create Vault and backup Policy

4) After a few minutes the configuration will be complete, and we’ll be able to test. To achieve this, head back into the VM blade and once again select “Backup” under Operations. From this window select “Backup Now” accepting the default retention before pressing the “OK” Button.

Backup now

Figure 4: Backup now

5) From “Notifications” Select the “Triggering backup for the VM" notification to open up the Backup Jobs. Notice that the Backup of VM is in progress.

Backup in progress

Figure 5: Backup in progress

Note: This normally takes around 30 minutes to complete for an average size VM.

Lab 2.2: Restoring a VM from Azure Backup

In this exercise we’ll restore a Virtual Machine from the Azure Backup.

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Backup

3) In the top Menu select “Restore VM” and in the new blade that opens, select a restore point and the “OK” button.

Restore VM

Figure 6: Restore VM

4) In the “Restore Configuration” pane we can select our “Restore Type” From here we can either choose to “Create a New Virtual Machine” or “Restore Disks” to a staging location. For this exercise we will choose to “Create a New Virtual Machine” with a name of “VM2Restore”.

Restore Configuration

Figure 7: Restore Configuration

5) Click on the job Notification to launch the Backup Jobs window and Monitor Progress.

Restore Progress

Figure 8: Restore Progress

Note: This normally takes around 30 minutes to complete for an average size VM.

6) Once complete, navigate to “Virtual Machines” from the left-hand side of the Azure portal. Notice that we now have a new VM present titled “VM2Restore”

VM Restored

Figure 9: VM Restored

7) To test that the restoration has completed successfully attempt to log into “VM2Restore”.

Lab 3: Disaster Recovery

Azure Site Recovery helps ensure business continuity by keeping business apps and workloads running during outages. Site Recovery replicates workloads running on physical and virtual machines (VMs) from a primary site to a secondary location.

Lab 3.1: Enabling a VM for Disaster Recovery

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Disaster Recovery, this will open the Disaster Recovery Configuration Pane. Notice the default Disaster Recovery Settings, including target Resource Group, Network, Disk and Replication pairs. When Ready click on the “Enable Replication” Button.

Configure DR

Figure 10: Configure DR

Lab 3.2: Configuring Test Failover

1) When Replication has completed, in the Azure portal, go to your VM.

2) Under OPERATIONS click Disaster Recovery. Notice in the new blade that opens, you’re able to both Failover and Test Failover

Failover Options

Figure 11: VM Restored

3) Click on the “Test Failover” button which will open a new blade.

4) From here notice how you can select the Recovery Point and Virtual Network. In this instance we will keep the latest recovery point and select the network.

5) Click the “OK” Button to begin test failover

Create failover test

Figure 12: Create failover test

6) When Test Failover Completes, click on the notification to open the job summary. Notice the stages the failover went through, in creating a test VM.

Failover test stages

Figure 13: Failover test stages

7) This proves that failover is supported and configured correctly so let’s navigate back into the Disaster Recovery section under the Operations Heading of our Virtual machine and select the “Clean up test failover” button.

8) From here type test completed in the Notes dialogue box and select to delete the test failover virtual machine(s) before pressing the “OK” button.

Failover test clean-up

Figure 14: Failover test clean-up

Lab 4: Update Management

Azure Update Management allows you to manage operating system security updates for your Windows and Linux computers deployed in Azure, on-premises environments, or other cloud providers. You can quickly assess the status of available updates on all agent computers and manage the process of installing. Computers managed by update management use the following configurations for performing assessment and update deployments: • Microsoft Monitoring agent for Windows or Linux • PowerShell Desired State Configuration (DSC) for Linux • Automation Hybrid Runbook Worker • Microsoft Update or Windows Server Update Services for Windows computers

Lab 4.1: Configure Update Management

In this exercise we will Configure Update Management for a Virtual Machine.

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Update Management

3) From the Update Management the blade that opens accept the defaults for the Log Analytics Workspace and Automation Account before pressing the “Enable” button.

Configure Update Management

Figure 15 Configure Update Management

4) Notice the message stating that the solution will take a few minutes to provision. "The 'Update Management' solution is being enabled on this virtual machine. This can take a few minutes. You can do other work while this is in progress." And then another stating that the Virtual Machine is being configured. "The components for the 'Update Management' solution have been enabled, and now this virtual machine is being configured." Please be patient, as this can sometimes take up to 15 minutes

5) Once complete you will notice that the “Update Management” blade lists many “Missing Updates” including links to the associated Knowledgebase Articles.

Missing updates

Figure 16 Missing updates

6) From here, move up to the top menu bar and select “Schedule Update Deployment”. In the new blade that opens, enter a name, choose not to exclude updates, configure the deployment to start 20 Minutes after the “Current Time” and leave the Maintenance Window to the default 120 Minutes. Once configured, press “OK” followed by “Create” to continue.

Schedule updates

Figure 17 Schedule updates

7) Back into the Update Management blade, notice under “Scheduled Update Deployments” how the schedule is now listed.

Scheduled updates

Figure 18 Scheduled updates

8) After 20 minutes, click onto the “Update Deployments” tab to see the scheduled maintenance window open (Remember you have a 2 hour window)

Scheduled updates in progress

Figure 19 Scheduled updates in progress

Lab 5: Inventory

Get inventory of in-guest resources for visibility into installed applications as well as custom-defined configuration items. Azure Inventory allows rich reporting and search capability to help you quickly find detailed information and understand everything that is configured within your hybrid environment.

Lab 5.1: Configure inventory Management

In this exercise we will Configure Inventory Management.

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click inventory

3) From the inventory blade enable the service by clicking on the “Enable” button.

Enable inventory

Figure 18 Enable inventory

Note: This can take up to 15 minutes

4) Once Provisioned, it will already be configured to collect data on the virtual machine. To enable data collection on other machines, select “Manage Multiple Machines” at the top of the blade and then “Add Azure VM” or “Add Non-Azure Machine” for cross cloud or on premises solutions.

Note: Due to the collection time, the results may not be visible for about up to 60 minutes.

5) When configured, you will notice that the blade lists the VMs' software, Files, Registry and Services.

VM inventory

Figure 19 VM inventory

Lab 6: Change Tracking

In this exercise we will view Change Management which allows you to track changes across services, daemons, software, registry, and files.

Note: This will only be visible once the Update Management Lab has completed and may have to be set as further study.

Lab 6.1: View Change Tracking

1) In the Azure portal, go to your VM.

2) Under OPERATIONS click Change Tracking to see the results of our earlier lab.

Change Tracking

Figure 19 Change Tracking

Conclusion

Well done, you made it to the end of the lab! Hopefully this guide has given you a good grounding in virtual machine operations. We could have gone into much more detail but space is limited! We hope you enjoyed running through the lab and that you learnt a few useful things from it. Don't forget to delete your resources after you have finished!

Useful References

About

Azure VM Operations Lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published