Thursday, November 20, 2025

How to Create and Optimize a Windows 11 Virtual Machine Using Hyper-V?

Virtual machines (VMs) are useful for testing software or running isolated environments without affecting your main system. Windows 11 Pro and Enterprise include Hyper-V, a virtualization tool that is ready to use out of the box.

Many Windows 11 users aren’t even aware that this feature exists, but it can completely change how you experiment with different systems.

In this guide, we’ll take you through each step: enabling Hyper-V, creating a Windows 11 virtual machine, and optimizing it so it runs smoothly and efficiently.

Step 1: Enable Virtualization in BIOS/UEFI

Before you can run VMs, you must ensure that hardware virtualization is enabled. If it is not already enabled, here’s how to do it:

  1. Restart your PC and enter the BIOS/UEFI menu. Usually, by pressing Del, Esc, F2, or F10 during boot.
  2. Go to the Advanced, CPU Configuration, or Security tab (varies by manufacturer).
  3. Find and enable one of the following options:
    • Intel Virtualization Technology (VT-x)
    • AMD-V or SVM Mode
  4. Save the changes and exit BIOS.

After reboot, your PC will now be ready to create virtual environments.

Step 2: Enable Hyper-V on Windows 11

Now, we’ll activate Hyper-V, Microsoft’s native virtualization platform. To enable Hyper-V, perform the following steps:

1. From Start Menu, search “Windows Features”. Open “Turn Windows features on or off.”


wp-image-32998

2. In the list, check these options:

    • Hyper-V
    • Virtual Machine Platform
    • Windows Hypervisor Platform

wp-image-32999

3. Click OK, then restart your computer.

wp-image-33000

 

Once restarted, open the Start Menu and search “Hyper-V Manager.”

 

wp-image-33001

 

This is the console where you’ll create and manage your VMs.

 

wp-image-33002

Step 3: Create a New Virtual Machine in Hyper-V

To set up your Windows 11 VM, follow the steps below:

1. First, search for “Hyper-V Manager” from the Start menu and open it.

2. Click New and then select Virtual Machine to launch the setup wizard.

wp-image-33003

 

wp-image-33004

 

3. Enter a clear machine name (e.g., Windows11-VM) and choose a location to store the VM files (optional).

 

wp-image-33005

 

4. Choose Generation 2. Required for UEFI and Secure Boot support.

 

wp-image-33006

 

5. Allocate at least 4096 MB (4 GB) of memory. Enable “Use Dynamic Memory” so the VM adjusts RAM as needed.

 

wp-image-33007

 

6. Choose an existing virtual switch to connect the VM to your network. If you don’t have one, create it from Virtual Switch Manager → New Virtual Switch.

 

wp-image-33008

 

7. Select Create a new virtual hard disk. Set size to 64-128 GB (depending on available storage). Use VHDX format for better performance and reliability.

 

wp-image-33009

 

8. Select Install an operating system from a bootable image file. Browse and choose your ISO file. This will be used for the OS installation.

 

wp-image-33010

9. Review your settings and click Finish.

 

wp-image-33011

 

10. Right-click your new VM and select Connect → Start. Follow the Ubuntu setup wizard to complete the installation.

 

wp-image-33012

Create a Virtual Network Switch (Optional)

If you don’t see any network options:

  1. In Hyper-V Manager, go to Action and then select Virtual Switch Manager.
  2. Select New virtual network switch and navigate to the External.
  3. Name it (e.g., “ExternalSwitch”) and bind it to your real network adapter. Click Apply and press OK.

Now your VM can access the internet through your PC’s connection.

Step 4: Install Windows 11 in the Virtual Machine

After you start the VM:

  1. The Windows 11 installer will appear.
  2. Choose your language, region, and keyboard layout.
  3. Click Install Now.
  4. When asked for a key, select “I don’t have a product key.”
  5. Pick your edition of Windows 11 (Pro is ideal).
  6. Choose Custom Installation → Select the virtual disk → Next.

The installation will begin. Once finished, Windows 11 will boot inside your VM window.

Step 5: Optimize Your Windows 11 Virtual Machine

Now that your VM is running, let’s make it faster and smoother.

1. Adjust CPU and RAM allocation.

In Hyper-V Manager, right-click your VM → Settings → Processor. Set at least 2 virtual processors (more if your system can handle it).

 

wp-image-33014

 

Go to Memory → Enable Dynamic Memory. Set Startup RAM = 4 GB, Minimum = 2 GB, Maximum = 8 GB.

 

wp-image-33016

 

This allows your VM to adjust memory usage based on workload automatically.

2. Use SSD storage.

If your PC has an SSD or NVMe drive:

  • Store your VHDX file there for better speed.
  • Avoid running VMs on mechanical HDDs (they’re much slower).

3. Exclude VM files from Antivirus Scans.

Real-time antivirus scanning can slow down virtual disks. Open Windows Security → Virus & Threat Protection → Manage Settings → Exclusions.

Add the folder where your VHDX files are stored (e.g., C:\HyperV\VMs).

4. Enable Integration Services.

Integration Services improve communication between your PC and the VM:

  • Clipboard sharing
  • Time sync
  • Graceful shutdown

In Hyper-V Manager, right-click VM → Settings → Integration Services → Check all available options.

 

wp-image-33017

5. Optimize Windows 11 Inside the VM.

Inside the guest OS:

  1. Go to Settings → System → Power & Battery → Power Mode → Best Performance.
  2. Turn off animations. To do this, go to System → About → Advanced System Settings → Performance → Adjust for best performance.
  3. Disable unnecessary startup and background apps.

Step 6: Create Checkpoints (Snapshots)

Before you install new software or make changes:

In Hyper-V Manager, right-click your VM and select Checkpoint.

Name it (e.g., “Clean Setup”).

 

wp-image-33018

 

If something breaks later, you can restore this snapshot instantly

Step 7: Advanced Settings (Optional)

If you’re experimenting or want more control, use the nested virtualization that allows running another VM inside this one.
Run this PowerShell command:
Set-VMProcessor -VMName “Windows11-VM” -ExposeVirtualizationExtensions $true

Automatic Startup:
Go to VM Settings → Automatic Start Action → “Automatically start this VM when the host starts.”

 

wp-image-33019

 

Enhanced Session Mode:
Enables file copy and better screen resolution between the host and the guest.

Conclusion

With these settings, your Windows 11 VM in Hyper-V will run reliably. It is a safe environment for testing, coding, or learning. Hyper-V provides control similar to professional virtualization software, but it is free and already integrated into Windows 11 Pro.

After setting up your VM, you can clone it, take checkpoints, or create separate test environments. All of this happens without affecting your main system.



from StarWind Blog https://ift.tt/d7rJC2s
via IFTTT

No comments:

Post a Comment