INFO-1246: Operating Systems - Windows 1 - Lecture Notes
Chapter 0: Microsoft Hyper-V Virtualization
Learning Objectives
- What is virtualization?
- How to use Hyper-V.
- Creating virtual machines in Azure Labs.
This information is relevant because:
- You will be using VMs throughout the course.
- VMs are an excellent learning tool.
What is Virtualization?
- Using a computer application to run simulated computers.
- Simulated computers are called virtual machines or VMs.
- Complete simulation of firmware, hardware, operating system, software, and data.
- It is a pretty heavy load for a laptop.
Virtualization Example
- Windows Client Operating System (e.g., Windows 11).
- Programs and Apps (MS Word, Photos App, MS Edge).
- Files (essays, documents, images, pictures, videos).
- Hyper-V runs virtual machines.
- Hyper-V cannot run on Windows Home Edition.
Advantages of Cloud-Based Virtualization
- No hardware or software compatibility issues.
- Does not take up local disk space.
- Significant resources are available.
- Only need a laptop for access.
- Can be accessed from any computer.
Cloud Virtualization Setup
- Internet Connection to Microsoft Cloud.
- Windows Operating System and Programs & Apps within.
- Hyper-V runs virtual machines.
- Microsoft Azure.
Why Use Virtual Machines?
- You do not damage your own OS.
- We will be doing multiple labs and tests.
- One VM’s settings do not affect another VM’s.
- VMs can be restored easily with checkpoints.
- VMs can be exported and imported.
What is Hyper-V?
- A Windows feature installed using Control Panel – Programs & Features – Turn Windows Features on or off.
- Runs multiple virtual VMs, each with its own set of virtual hardware and virtual media.
Hyper-V Terminology
- Host Computer = physical computer or laptop.
- Virtual Host = VM with its own virtualization.
- Guest OS (Computer) = virtual machine (VM).
Hyper-V Manager
- Shows a list of VMs (Guest).
- Allows managing guest VM settings.
- Allows managing host and environment settings.
- Shows list of checkpoints.
Hyper-V Features
- Each VM must have its own folder.
- Virtualizes hardware, operating system, apps.
- Allows running any OS (Win 95, Linux etc).
- Excellent for experimenting and testing.
- Resolves any software compatibility issue.
Hyper-V Installation Requirements
- Windows Client Pro, Ent, or Edu (not Home).
- 64-bit hardware.
- Virtualization support in firmware or BIOS.
- 4 GB minimum RAM (memory).
Hyper-V Installation Steps
- Open Control Panel – Programs & Features.
- Click Turn Windows Features on or off.
- Select all Hyper-V components.
Note: Do not install if planning to use VMware.
Hyper-V Manager Actions
- Create a new virtual machine or hardware.
- Start, shut down, turn off, save, pause, reset, or resume VM.
- Turn off is a hard shutdown (so avoid).
- Reset = deletes all changes!
- Deleting a VM does not delete the virtual hard disk (.vhdx).
Shutting Down VMs
- Do: Always use the proper Windows shutdown procedure (Start Button) or Shut Down in Hyper-V Manager. Allow VMs sufficient time to power down completely.
- Don’t: Click the X in the top corner (VM stays running!!!). Turn off in Hyper-V Manager (this is a hard shutdown!!!) which can cause irreparable damage to the VM!!!.
Hyper-V Hard Disks
- 3 Types of Hyper-V hard disks:
- Fixed size
- Dynamically expanding
- Differencing
Differencing Disks
- Parent disk contains the Windows OS (fixed or dynamically expanding).
- Child disks (differencing disks) capture VM-specific changes only.
- Using a parent disk saves disk space but reduces resilience
Hyper-V Manager Hard Disk File Extensions
- .vhdx (Gen 2, 64-bit or 32-bit)
- .vhd (Gen 1, 32-bit only, no longer in use)
- Parent disk can save a lot of disk space but reduces resilience.
Virtual Disk Editing Options
- Compact – removes blank space.
- Convert – change type or format of disk.
- Expand – provides additional disk space.
- Merge – writes differencing disk to parent.
- Reconnect – re-associates differencing disk.
Checkpoints
- Backup of the disk at a given point in time.
- You can create multiple checkpoints for a disk.
- If you restore a checkpoint, you cannot return.
- Somewhat similar to Windows Restore Points.
Hypervisor
- The Hyper-V engine is a type of hypervisor.
- Also supports Windows Sandbox.
Windows Sandbox
- An additional feature of Windows client.
- Provides a very quick Windows environment.
- Ideal for testing apps and websites.
- Permanently deletes all changes on closing.
- Install via Programs & Features.
What is Azure Labs?
- Azure Labs is Microsoft’s cloud-based computer lab (we use the Hyper-V portion).
- Can run testing and training labs in the cloud.
- Fully managed and supported service.
- Automatically provisions resources.
Accessing Azure Labs
- Go to https://labs.azure.com/virtualmachines.
- Login using fanshaweonline credentials – see registration.
- You will see the INFO-1246 environment.
- Use the slider bar to start your lab (allow 5 minutes).
- Next use the computer icon to download a Remote Session shortcut.
- Open the remote session shortcut and login.
- Use the following credentials:
- Username: Student
- Password: Microsoft1
Azure Labs - Important Considerations
To prevent accidental hours against your quota, the follow items are in place which you need to be aware of:
- If you are idle in your environment for 15 minutes, your environment will shut down automatically.
- If you disconnect from your session, you will need to re-connect within 5 minutes or your environment will shut down automatically.
- Shut down your lab environment when not in use. To prevent additional lab usage time being added, ensure you stop your lab by using the slider bar within your azure labs portal.
Lesson Summary
- Familiarization with Hyper-V
- Creating virtual machines
- Accessing and using Azure Labs
Homework
- Register for Azure Labs (see link in your FOL email)
- Complete Lab Exercise 1
- Read Chapter 4 pages 303-328
- Read Chapter 1 pages 1-25 (only)
- Prepare for Stage 1 bonus test next week!