Skip to main content

Lab 1.0: Installing a Windows Virtual Machine

Learning Objectives​

By the end of this lab, you will be able to:

  • Download and install VirtualBox on your computer
  • Obtain a Windows 10 or Windows 11 ISO image
  • Create a virtual machine from scratch
  • Configure appropriate settings (RAM, disk, network)
  • Install Windows in the virtual machine
  • Configure Guest Additions for a better experience
  • Create backup snapshots
  • Prepare your environment for the following labs

Estimated Duration​

90 minutes (including 45 min of automatic Windows installation)

Prerequisites​

Hardware​

  • Computer with at least 8 GB RAM (16 GB recommended)
  • Minimum 50 GB of free disk space
  • Processor with virtualization support (Intel VT-x or AMD-V)
  • Internet connection for downloads
  • Administrator rights on your computer

Software​

  • IMPORTANT: First complete the Appendix: Azure for Students
  • You must have:
    • Windows 11 ISO image (downloaded via Azure for Students)
    • Windows 11 product key (obtained via Azure for Students)
  • If you haven't done this step yet, return to the Azure for Students Appendix BEFORE continuing this lab

Video Resources​

Complete video tutorial (reference):

Full demonstration video available here: Installing Windows 11 on VirtualBox - Complete Tutorial

This video visually shows all the steps described in this guide. It is recommended to watch it before or during the installation.


Part 1: Installing VirtualBox​

Step 1.1: Downloading VirtualBox​

Visit the official site: https://www.virtualbox.org/

Download the version for your system:

For Windows:

  1. Click on "Downloads"
  2. Select "Windows hosts"
  3. Download the .exe file (about 100 MB)

For macOS:

  1. Select "OS X hosts"
  2. Download the .dmg file

For Linux:

  1. Follow the instructions for your distribution
  2. Or download the .deb/.rpm package

Verify integrity (optional but recommended):

  • Compare the SHA256 checksum with the one on the official site

Step 1.2: Installing VirtualBox​

On Windows:

  1. Run the downloaded file (VirtualBox-7.x.x-xxxxx-Win.exe)
  2. Welcome screen: Click "Next"
  3. Component selection:
    • VirtualBox Application (mandatory)
    • VirtualBox USB Support (recommended)
    • VirtualBox Networking (mandatory)
    • VirtualBox Python Support (optional)
    • Leave everything checked, click "Next"
  4. Installation location:
    • Default: C:\Program Files\Oracle\VirtualBox\
    • Modify if necessary
    • Click "Next"
  5. Network warning:
    • Message: "Your network connection will be temporarily interrupted"
    • This is normal, click "Yes"
  6. Ready to install:
    • Click "Install"
  7. Driver installation:
    • Windows may ask for confirmation to install Oracle drivers
    • Check "Always trust software from Oracle Corporation"
    • Click "Install" for each driver
  8. Installation complete:
    • Uncheck "Start Oracle VM VirtualBox" (we'll do it manually)
    • Click "Finish"

Verification:

  1. Search for "VirtualBox" in the Start menu
  2. Launch "Oracle VM VirtualBox"
  3. The main interface should open

VirtualBox Interface:

┌─────────────────────────────────────────────┐
│ Oracle VM VirtualBox Manager │
├─────────────────────────────────────────────┤
│ │
│ No virtual machines at the moment │
│ │
│ [New] [Import] [Preferences] │
└─────────────────────────────────────────────┘

Questions:

  1. What version of VirtualBox did you install?
  2. Does the VirtualBox interface open correctly?

Part 2: Obtaining the Windows ISO Image​

Step 2.1: Official Windows Download​

Windows 10:

  1. Visit: https://www.microsoft.com/en-ca/software-download/windows10
  2. Click: "Download tool now"
  3. Run Media Creation Tool
  4. Accept the license terms
  5. Select: "Create installation media (USB flash drive, DVD, or ISO file) for another PC"
  6. Language: French (Canada) or your preference
  7. Architecture: 64-bit (x64)
  8. Media: ISO file
  9. Location: Choose where to save (e.g., Downloads)
  10. Wait: Download (~5-6 GB, may take 30-60 min)

Windows 11:

  1. Visit: https://www.microsoft.com/en-ca/software-download/windows11
  2. Section: "Download Windows 11 Disk Image (ISO)"
  3. Select: Windows 11 (multi-edition ISO)
  4. Click: Download
  5. Language: Select your language
  6. Click: Confirm
  7. 64-bit Download: Click the button
  8. Wait: Download (~5-6 GB)

Obtained file:

Win10_22H2_French_x64.iso  (about 5.5 GB)
OR
Win11_23H2_French_x64.iso (about 6.0 GB)

Step 2.2: Verifying the ISO File​

Verify that the file is complete:

Windows PowerShell:

Get-FileHash "C:\Users\YourName\Downloads\Win11_French_x64.iso" -Algorithm SHA256

Compare with the hash on the Microsoft site (to verify integrity)

Verify the size:

The ISO file should be about 5-6 GB.

Questions: 3. Which version of Windows did you download (10 or 11)? 4. What is the exact size of the ISO file?


Part 3: Creating the Virtual Machine​

Step 3.1: New Virtual Machine​

In VirtualBox:

  1. Click on the "New" button (blue star icon)

"Create Virtual Machine" window opens

  1. Name and operating system:

    • Name: Windows 11 Lab (or your choice)
    • Folder: Leave default or choose
    • ISO Image: Click the dropdown list
      • Select "Other..."
      • Navigate to your Win11_xxx.iso file
      • Select it
    • Type: Microsoft Windows (automatically detected)
    • Version: Windows 11 (64-bit) (automatically detected)
  2. Check "Skip Unattended Installation" (full manual installation)

  3. Click "Next"

Step 3.2: Memory Configuration (RAM)​

Memory allocation:

Recommendations based on your total RAM:

If you have 8 GB RAM:

  • Allocate: 4096 MB (4 GB) to the VM
  • Your host system keeps: 4 GB

If you have 16 GB RAM:

  • Allocate: 6144 MB (6 GB) to the VM
  • Your host system keeps: 10 GB (comfortable)

If you have 32 GB RAM:

  • Allocate: 8192 MB (8 GB) to the VM
  • Large comfort

IMPORTANT: Do NOT give more than 50% of your total RAM!

Configuration:

  1. Use the slider or enter the value in MB

  2. Green zone: Safe allocation

  3. Orange zone: Usable but limit

  4. Red zone: AVOID (host system will suffer)

  5. Click "Next"

Step 3.3: Virtual Hard Disk Configuration​

Creating the hard disk:

  1. Disk size:

    • Minimum: 32 GB (Windows only, no space)
    • Recommended: 50 GB (comfortable for labs)
    • Optimal: 80 GB (plenty of space for tools)
  2. Disk file type:

    • VDI (VirtualBox Disk Image) - Recommended
    • VMDK (VMware compatible)
    • VHD (Hyper-V compatible)
    • Select: VDI
  3. Storage:

    • Dynamically allocated (Recommended)
      • File grows as needed
      • Saves disk space
      • If VM uses 20 GB, file = 20 GB (not 50 GB)
    • Fixed
      • 50 GB file created immediately
      • Slightly faster
      • Uses space even if empty

    Select: Dynamically allocated

  4. File location:

    • Leave default: C:\Users\YourName\VirtualBox VMs\Windows 11 Lab\
    • Or choose another location (disk with more space)
  5. Click "Next"

  6. Summary:

    • Check all settings
    • Name: Windows 11 Lab
    • RAM: 6144 MB
    • Disk: 50 GB
    • ISO: Win11_xxx.iso
  7. Click "Finish"

VM created! But not yet started.

Questions: 5. How much RAM did you allocate to the VM? 6. What disk size did you choose?


Part 4: Advanced VM Configuration​

Step 4.1: System Settings​

Before starting, let's optimize the configuration:

  1. Select your VM (Windows 11 Lab)
  2. Click on "Settings" (orange gear icon)

"Settings" window opens

"System" section:

"Motherboard" tab:

  • Boot order:
    • Check: Floppy (uncheck, unnecessary)
    • Check: Optical Disk (CD/DVD) - First
    • Check: Hard Disk - Second
    • Network - Uncheck
  • Chipset: Leave default (PIIX3 or ICH9)
  • Pointing device: USB Tablet (for better mouse)
  • Extended features:
    • Check: "Enable EFI" (if Windows 11)
    • Check: "Hardware clock in UTC time"

"Processor" tab:

  • Processors:
    • 1 processor = Minimum
    • 2 processors = Recommended
    • 4 processors = Optimal (if you have 8+ cores on host)
  • Green zone: Safe allocation
  • Extended features:
    • Check: "Enable PAE/NX" (security)
    • Check: "Enable nested VT-x/AMD-V" (if available)

"Acceleration" tab:

  • Paravirtualization interface: Default or Hyper-V (for Windows 11)
  • Leave other settings default

Step 4.2: Display Settings​

"Display" section:

"Screen" tab:

  • Video memory:
    • 128 MB = Recommended
    • Maximum available if you have a good graphics card
  • Monitors: 1 (or 2 if you have 2 monitors)
  • Scale factor: 100%
  • Graphics acceleration:
    • Check: "Enable 3D acceleration" (improves performance)
    • VBoxVGA or VMSVGA

Step 4.3: Network Settings​

"Network" section:

Adapter 1:

  • Enable network adapter: Checked
  • Attached to: NAT (default)
    • NAT: VM accesses Internet via your PC
    • Internal Network: For labs isolation (we'll change later)
    • Bridged Adapter: VM visible on local network
  • Adapter Type: Intel PRO/1000 MT Desktop

Leave NAT for installation (need Internet for updates)

Step 4.4: Final Verification​

Click "OK" to save all settings

Summary of your configuration:

Name: Windows 11 Lab
RAM: 6 GB
Processors: 2
Disk: 50 GB (dynamic)
Network: NAT
ISO: Win11_xxx.iso (mounted)

Questions: 7. How many processors did you allocate? 8. How much video memory did you configure?


Part 5: Installing Windows​

Step 5.1: First Start​

  1. Select your VM "Windows 11 Lab"
  2. Click on "Start" (green arrow)

VM window opens in full screen

Black screen with:

Press any key to boot from CD or DVD...
  1. Press any key quickly (within 5 seconds)

Windows logo appears

If you missed it: Restart the VM (Machine → Reset)

Step 5.2: Windows Installation - Initial Steps​

Screen 1: Language and Region

  • Language to install: French (France) or your preference
  • Time and currency format: French (Canada)
  • Keyboard or input method: French (Canada) or French (France)
  • Click "Next"

Screen 2: Install Now

  • Click on the large "Install now" button

Screen 3: Windows Activation

  • Option 1: Enter a product key if you have one
  • Option 2: Click "I don't have a product key"
    • Windows will install in evaluation mode (30 days)
    • Sufficient for labs

Screen 4: Edition Selection

  • Select: Windows 11 Pro (recommended for BitLocker)
  • OR: Windows 11 Home (also works)
  • Click "Next"

Screen 5: License Terms

  • Check: "I accept the license terms"
  • Click "Next"

Screen 6: Installation Type

  • Select: "Custom: Install Windows only (advanced)"
    • NOT upgrade (no existing Windows)

Step 5.3: Disk Partitioning​

"Where do you want to install Windows?" screen

You see:

Drive 0 Unallocated Space    50.0 GB

Actions:

  1. Click on "Drive 0 Unallocated Space"
  2. Click "New" (to create partition)
  3. Size: Leave maximum size (50000 MB)
  4. Click "Apply"

Message: "Windows might create additional partitions for system" 5. Click "OK"

Result: Several partitions created

Partition 1: Recovery    529 MB
Partition 2: System EFI 100 MB
Partition 3: MSR 16 MB
Partition 4: Primary 49.3 GB ← This one for Windows
  1. Select Partition 4 (largest, "Primary")
  2. Click "Next"

Installation begins!

Step 5.4: Automatic Installation (45 minutes)​

Windows automatically performs:

Step 1: Copying Windows files (5 min)

Copying Windows files... 23%

Step 2: Preparing files for installation (5 min)

Preparing files for installation... 47%

Step 3: Installing features (15 min)

Installing features... 65%

Step 4: Installing updates (10 min)

Installing updates... 82%

Step 5: Finishing up (10 min)

Finishing installation... 95%

Automatic restarts: 2-3 times (normal)

IMPORTANT:

  • Do not touch anything!
  • Let the installation finish
  • The VM will restart several times
  • Patience: 45-60 minutes total

During this time, you can:

  • Take a break
  • Read the documentation for upcoming labs
  • Prepare your work environment

Questions: 9. How many automatic restarts did you observe? 10. What was the total installation duration?


Part 6: Initial Windows Configuration​

Step 6.1: Region and Keyboard Screen​

After installation, Windows starts:

Blue screen with Windows logo

Initial configuration:

  1. Region:

    • Select: Canada
    • Click "Yes"
  2. Keyboard layout:

    • Select: French (Canada) - QWERTY
    • OR: French (France) - AZERTY
    • Click "Yes"
  3. Second keyboard layout:

    • Click "Skip" (not necessary)

Step 6.2: Account Setup​

Windows 11 asks for Microsoft account:

To use a LOCAL account (recommended for labs):

Method 1: No network

  1. Press Shift + F10 (opens CMD)
  2. Type: oobe\bypassnro
  3. Enter
  4. VM restarts
  5. "I don't have Internet" option now appears!
  6. Click "I don't have Internet"
  7. Click "Continue with limited setup"

Method 2: Dummy account

  1. Enter: user@noemail.com
  2. Password: x
  3. Error appears
  4. Click "Next" without changing anything
  5. Local account option appears

Creating the local account:

  1. Username: Admin (or your choice)
  2. Password: Password123! (or your choice)
    • NOTE IT DOWN! You will need it
  3. Confirm the password
  4. Security questions:
    • Question 1: Choose a question
    • Answer: answer1
    • Repeat for 3 questions
    • NOTE the answers!

Step 6.3: Privacy Settings​

Series of privacy screens:

  1. Location: Your choice (Yes/No)
  2. Find my device: No (lab VM)
  3. Diagnostic data: Required only
  4. Tailored experiences: No
  5. Advertising ID: No
  6. Improve inking and typing: No

Click "Accept" for each

Finalization:

This might take a few minutes...

Wait 2-5 minutes

WINDOWS DESKTOP APPEARS!

Windows is installed and operational!

Questions: 11. What username did you create? 12. Did you note the password somewhere safe?


Part 7: Post-Installation Configuration​

Step 7.1: Temporarily Disable UAC​

To facilitate labs:

  1. Search "UAC" in the Windows search bar
  2. Open "Change User Account Control settings"
  3. Move the slider all the way down: "Never notify"
  4. Click "OK"
  5. Restart the VM

WARNING: For production, leave UAC enabled! We disable it here to facilitate labs.

Step 7.2: Installing Guest Additions​

Guest Additions = VirtualBox drivers for:

  • Better screen resolution
  • Copy-paste between host and VM
  • Shared folders
  • Drag-and-drop files
  • Improved performance

Installation:

  1. In VirtualBox, VM menu: Devices → Insert Guest Additions CD image

  2. In Windows, explorer opens automatically

    • If not, open "This PC"
    • Double-click on the CD drive (VBox_GAs_xxx)
  3. Run: VBoxWindowsAdditions-amd64.exe

  4. Installation:

    • Click "Next"
    • Location: Default
    • Components: All checked
    • Click "Install"
  5. Driver installation:

    • Several confirmation windows
    • Check "Always trust software from Oracle"
    • Click "Install" for each driver
  6. End of installation:

    • Check "Reboot now"
    • Click "Finish"

VM restarts

After restart:

  • Screen resolution adapts to the window
  • Copy-paste works
  • Improved performance

Copy-paste test:

  • Copy text on your host PC
  • Paste in the VM (Ctrl+V)
  • Should work!

Questions: 13. Are the Guest Additions installed? 14. Does copy-paste work between host and VM?


Part 8: Installing Basic Tools​

Step 8.1: Windows Update​

Search "Windows Update"

  1. Settings → Update & Security → Windows Update
  2. Click "Check for updates"
  3. Wait (may take 30-60 minutes for all updates)
  4. Restart when prompted

IMPORTANT: VM must be up to date for security

Step 8.2: Web Browser​

Microsoft Edge is preinstalled

To install Chrome (optional):

  1. Open Edge
  2. Visit: https://www.google.com/chrome/
  3. Download and install

Step 8.3: Text Editor​

Notepad is basic, install better:

Notepad++ (recommended):

  1. Visit: https://notepad-plus-plus.org/
  2. Download installer
  3. Install (Next, Next, Finish)

Visual Studio Code (for scripts):

  1. Visit: https://code.visualstudio.com/
  2. Download and install

Step 8.4: PowerShell 7 (Optional)​

Modern PowerShell:

  1. Visit: https://github.com/PowerShell/PowerShell/releases
  2. Download: PowerShell-7.x.x-win-x64.msi
  3. Install

Questions: 15. What additional tools did you install? 16. Is Windows fully updated?


Part 9: Creating Snapshots​

Step 9.1: What is a Snapshot?​

Snapshot:

  • Backup of the COMPLETE state of the VM at a given time
  • Allows rollback in seconds
  • Essential for labs (test without breaking)

Step 9.2: Create Your First Snapshot​

IMPORTANT: Create a snapshot NOW (clean and updated Windows)

In VirtualBox:

  1. Select your VM (can be running)
  2. Menu: Machine → Take Snapshot
    • OR: Click on the hamburger icon (3 lines) → Snapshots
    • OR: Camera button in the toolbar

"Take Snapshot" window:

  1. Snapshot name: CLEAN - Windows 11 Fresh Install
  2. Description:
Freshly installed Windows 11
- Complete updates
- Guest Additions installed
- Account: Admin
- UAC disabled (for labs)
- Ready for labs
- Date: [Current date]
  1. Click "OK"

Snapshot created in 5-10 seconds!

Verification:

  • In VirtualBox Manager, select your VM
  • "Snapshots" tab (next to "Details")
  • You should see your snapshot

Step 9.3: Test Restoration​

Safety test:

  1. In the VM, delete something (e.g., Desktop)
  2. In VirtualBox, restore the snapshot:
    • Snapshots → Right-click on "CLEAN - Windows 11..."
    • "Restore Snapshot"
    • Confirm
  3. Restart the VM
  4. Verify: Everything is back to the snapshot state!

PERFECT! You can now test anything without fear.

Questions: 17. Was the snapshot created successfully? 18. Does the restoration work?


Part 10: Configuration for Labs​

Step 10.1: Create a Standard User​

For privilege escalation labs:

  1. Settings → Accounts → Family & other users
  2. Add a user
  3. Without Microsoft account → Local account
  4. Name: StandardUser
  5. Password: User123!
  6. Account type: Standard user (NOT administrator)

You now have:

  • Admin (administrator)
  • StandardUser (standard user)

Step 10.2: Network Configuration for Labs​

For labs requiring isolation (ARP spoofing, MitM):

  1. Shut down the VM
  2. Settings → Network → Adapter 1
  3. Attached to: Change from NAT to "Internal Network"
  4. Name: LabNet
  5. OK

Create a second adapter (optional):

  • Adapter 2: Enabled
  • Mode: NAT (for Internet when needed)

Switch between adapters according to labs:

  • Isolated labs: Adapter 1 (Internal Network)
  • Need Internet: Adapter 2 (NAT)

Step 10.3: Disable Defender (For Labs Only!)​

WARNING: Only for lab environment!

Admin PowerShell:

Set-MpPreference -DisableRealtimeMonitoring $true

OR via interface:

  1. Windows Security → Virus & threat protection
  2. Manage settings
  3. Turn off "Real-time protection"

Create a "LAB READY" snapshot:

  • Name: LAB READY - Defender OFF
  • Description: "Optimal configuration for security labs"

Questions: 19. Did you create the StandardUser account? 20. How many snapshots do you have now?


Part 11: Final Checklist​

Complete Verification​

Before starting the labs, verify:

System:

  • Windows 11 installed and functional
  • Complete updates
  • Guest Additions installed
  • Copy-paste works
  • Adaptive screen resolution

Accounts:

  • Admin account created (administrator)
  • StandardUser account created (user)
  • Passwords noted

Configuration:

  • UAC disabled
  • Windows Defender disabled (temporarily)
  • Network in NAT mode (or internal according to lab)

Snapshots:

  • "CLEAN - Windows 11 Fresh Install"
  • "LAB READY - Defender OFF"

Tools:

  • Notepad++ or VS Code installed
  • Functional web browser
  • PowerShell available

Tests:

  • CMD opens: Works
  • PowerShell opens: Works
  • Internet access: Works
  • Snapshot restoration: Tested

If everything is checked: READY FOR THE LABS!


Deliverables​

To submit:

  1. Installation report (Word/PDF, 2-3 pages):

    • Hardware configuration of your VM (RAM, CPU, disk)
    • Completed installation steps
    • Problems encountered and solutions
    • Snapshots created
    • Total installation time
  2. Screenshots (minimum 6):

    • VirtualBox interface with created VM
    • Windows installation screen
    • Functional Windows desktop
    • Guest Additions installed (proof: copy-paste)
    • Snapshot list
    • System information (Settings → System → About)
  3. Documented configuration:

    • Specs of your VM (table)
    • Accounts created
    • Tools installed

Evaluation Criteria​

CriterionPoints
Windows VM installed and functional30%
Guest Additions correctly installed20%
Snapshots created and tested20%
Appropriate configuration for labs20%
Quality of documentation10%

Troubleshooting​

Problem: "VT-x is not available"​

Solution:

  1. Restart your PC
  2. Enter BIOS (F2, Del, F10 depending on manufacturer)
  3. Look for "Virtualization Technology" or "Intel VT-x" or "AMD-V"
  4. Enable it
  5. Save and restart

Problem: Installation very slow​

Solutions:

  • Allocate more RAM if possible
  • Allocate more processors (2-4)
  • Check available host disk space
  • Close other applications on host

Problem: Black screen after installation​

Solutions:

  • Wait 2-3 minutes (may be normal)
  • Try Enter or Ctrl+Alt+Del
  • Verify ISO is properly mounted
  • Restart the VM

Problem: Guest Additions won't install​

Solutions:

  • Run as administrator
  • Temporarily disable antivirus
  • Download ISO separately from VirtualBox site

Problem: Not enough disk space​

Solutions:

  • Free up space on host disk
  • Reduce virtual disk size (minimum 32 GB)
  • Use another disk/partition if available

Tips and Best Practices​

Strategic Snapshots​

Create snapshots at key moments:

  1. CLEAN: After fresh installation
  2. UPDATED: After all updates
  3. TOOLS: After tool installation
  4. BEFORE_LAB_X: Before each important lab
  5. AFTER_LAB_X: After successful labs

Advantages:

  • Easy rollback if problem
  • Test multiple approaches
  • No need for reinstallation

Disk Space Management​

Monitor space:

On host:

C:\Users\YourName\VirtualBox VMs\Windows 11 Lab\

Created files:

Windows 11 Lab.vdi           - Virtual disk (grows with usage)
Windows 11 Lab.vbox - VM configuration
Snapshots\ - Snapshots folder
Logs\ - VirtualBox logs

If space is lacking:

  • Delete old snapshots
  • Compact the virtual disk
  • Move VM to another disk

Compact disk (Windows):

In the VM:

defrag C: /O

Then, VM off, on host:

VBoxManage modifymedium disk "C:\path\to\Windows 11 Lab.vdi" --compact

Backups​

Export the complete VM (external backup):

  1. VirtualBox → File → Export
  2. Select your VM
  3. Format: OVA (Open Virtualization Archive)
  4. Location: External disk, cloud, etc.
  5. Export

.ova file created: Can be imported on another PC!

Questions: 21. How much disk space does your VM currently use? 22. Have you created an external backup?


Additional Resources​

VirtualBox Documentation​

Windows Documentation​

Video Tutorials​


Conclusion​

This lab taught you:

  • Complete installation of VirtualBox
  • Legally obtaining Windows ISO
  • Creating and configuring a virtual machine
  • Installing Windows 10/11 in VirtualBox
  • Optimal post-installation configuration
  • Snapshot management for security
  • Preparing the environment for labs

You now have:

  • A functional Windows VM
  • A secure environment for testing
  • Backup snapshots
  • Optimal configuration for learning

Next steps:

  • Lab 1.1: Discovering the network environment
  • Lab 1.2: Traffic analysis with Wireshark
  • Lab 1.3: System inventory
  • Lab 1.4: WiFi credentials

This VM will be your testing environment for ALL course labs!

Take care of it and create snapshots regularly!


Lab developed as part of the Operating Systems course - MODULE 1

IMPORTANT NOTE: This lab is the FOUNDATION of all others. Take the time to properly configure your VM. All subsequent labs depend on it.