How to Create and Configure Your First Virtual Machine with Hyper-V: A Complete Step-by-Step Guide

Last update: 24/04/2025
Author Isaac
  • Hyper-V is the native Windows virtualization solution for creating efficient and secure virtual environments.
  • The correct choice of virtual switch and machine generation determines compatibility and connectivity.
  • Properly configuring memory, processors, and security optimizes virtual machine performance and security.

hyper-v

Virtualization is one of the most powerful and versatile tools available today for any IT professional or enthusiast. This technology allows you to get the most out of your physical hardware, facilitating the creation of test environments, labs, servers, and isolated systems, all without leaving your own computer. Among the available virtualization platforms, Microsoft's Hyper-V has become a leading option for both individual users and businesses, thanks to its native integration with Windows and its enormous potential.

If you've ever wondered how to set up your first virtual machine in Hyper-V, or if you want to learn all the details and nuances to do it the right way, you've landed in the perfect article. Here you'll find a comprehensive, step-by-step guide, leaving no stone unturned, so you can learn everything you need to know to create, configure, and optimize virtual machines in Hyper-V with Windows 10 and Windows 11 , from scratch . Get comfortable and brew your best coffee, because you're going to leave here a virtualization expert!

What is virtualization and why choose Hyper-V?

To get started with virtual machines, the first step is understanding this concept. Virtualization is a technique that allows you to run multiple operating systems and applications simultaneously on a single physical computer, creating independent virtual environments . In this way, you can simulate different computers, each with its own operating system, isolated and customized, using the resources of the real hardware in a shared manner.

In this context, Hyper-V is Microsoft's native virtualization solution , integrated into Windows Server since 2008 and now also available in the Pro, Enterprise, and Education editions of Windows 10 and Windows 11. Its use is widespread both at home and in businesses, as it allows managing multiple virtual machines from a central panel, allocating resources flexibly and with high levels of security and performance.

By choosing Hyper-V, you gain seamless operating system integration, simplified management, high efficiency, advanced networking options, and enhanced security . You won't need to install third-party software and you can fully leverage the power of your own PC or server.

Key Advantages of Hyper-V on Windows

  • full integration: No external installation required, now available on Windows 10/11 Pro, Enterprise, and Education.
  • intuitive management: Its 'Hyper-V Manager' panel is simple for entry-level users, but allows for very advanced configurations.
  • Compatibility: Allows you to run most Windows operating systems, Linux and FreeBSD, both 32 and 64 bits, depending on the generation of virtual machine chosen.
  • Scalability and efficiency: Resources are allocated dynamically and efficiently, optimizing the use of CPU, memory and storage.
  • Security: More levels of isolation, Boot Secure and virtualized hardware protection, even with modules TPM or state encryption.
  • Professional robustness: Supports advanced features such as snapshots, backup integrated, live migrations and connection to cloud solutions.

What do you need before you start? Requirements and pre-checks

Install and configure Hyper-V on Windows 11-8

1. Compatible Windows Edition

Hyper-V is only available in Windows 10 and 11 Pro, Enterprise, and Education editions . If you have a Home version, you will not be able to use Hyper-V natively. To check your system edition:

  • Go to Settings → System → About, and look for "Windows Edition." It should say Pro, Enterprise, or Education.

2. Hardware Compatibility

Virtualization requires that your PC have certain hardware features enabled:

  • Processor: A chip that supports hardware virtualization (Intel VT-x or AMD-V). 3nd generation Core i5, i7, i9, i2 and later, and AMD Ryzen, Epyc and Threadripper, meet this requirement.
  • SLAT (Second Level Address Translation): Technology needed for acceleration virtual memory, especially useful in Hyper-V environments.
  • RAM: Minimum 4GB, although 8GB or more is recommended if you intend to run modern systems inside the virtual machine.
  • Disk Space: You should have at least 20-30 GB of free space for the virtual machine and guest operating system, although this figure may vary depending on your needs.

To check CPU compatibility with assisted virtualization and SLAT, you can open a command prompt ( CMD ) as administrator and run:

systeminfo

Look for messages like “Hardware-assisted virtualization is enabled” or “SLAT supported: Yes.”

3. Enable virtualization in BIOS/UEFI

Modern laptops and PCs usually have this option enabled, but in some cases you will have to enter the BIOS/UEFI and manually enable the "Intel Virtualization Technology (VT-x)" or "AMD-V" option, as well as "SLAT" if applicable.

  • Restart your PC and access the BIOS/UEFI (usual keys: F2, Del, F10, Esc depending on the manufacturer).
  • Look for the Virtualization option and activate it.
  • Save and exit.
  How to Download and Install Cursors for Windows 10

First essential step: Activate Hyper-V in Windows

By default, Hyper-V is disabled in Windows, so the first thing you need to do is enable it. There are several ways to do this, but the most common is through Windows Features:

  1. Open the Control panel and go to “Programs and Features.”
  2. Click "Turn Windows features on or off."
  3. Find the Hyper-V section and check all the boxes, including:
    • Hyper-V platform
    • Hyper-V Management Tools
    • Virtual machine platform
    • Hyper-V Compatibility Tools
  4. Click OK and wait for Windows to install the components.
  5. You'll be prompted to restart your PC. Do so to complete the activation.

Once finished, search the Start menu for "Hyper-V Manager" to verify that everything is correct.

What is a virtual switch and why should you create one now?

One of the key concepts of Hyper-V is the use of virtual switches. A virtual switch is a software network bridge that connects virtual machines to the host's physical network, to each other, or completely isolates them . Knowing what type of switch you need is important before creating your first virtual machine, as it will affect connectivity and security.

Types of switches in Hyper-V

  • External Switch: Provides full access to the physical network. The VM will be able to communicate with other computers, printers, or servers, and will have Internet access.
  • Internal Switch: Allows communication between virtual machines and the host, but not with the external network. Ideal for test labs or isolated environments.
  • Private SwitchboardVirtual machines can only talk to each other; not even the host has access. Useful for secure testing or 100% isolated environments.
  • Default Switch: It exists by default in Windows 10/11 and allows easy Internet access, although with less control over advanced settings.

How to create a virtual switch in Hyper-V

  1. Open the Hyper-V Manager and select your team in the left panel.
  2. In the right pane, click “Virtual Switch Manager.”
  3. Choose the type of switch that suits you best (usually “External” to start with).
  4. Click on “Create virtual switch.”
  5. Assign a recognizable name and select the physical network adapter (Wi-Fi or Ethernet) to which it will connect.
  6. You can configure whether you want to enable virtual LAN (VLAN) identification, describe it in “Notes,” etc.
  7. Save your changes and accept any notifications about temporary network disconnection.

Creating Your First Virtual Machine with Hyper-V: A Complete Step-by-Step Guide

hyper v

1. Start the wizard from Hyper-V Manager

In Hyper-V Manager , select the host and in the right-hand panel click New → Virtual Machine . The wizard will appear to guide you step by step.

2. Name and locate your virtual machine

Give it a clear name (for example, "Ubuntu 24.04" or "Windows 11 Test") and decide whether you want to save the files in the default location or a custom folder. It's recommended to keep all VMs in their own folder ('HYPERV') to make management and backup easier.

3. Choose the right generation: Generation 1 or Generation 2?

Choosing the correct virtual machine generation is crucial here , as it cannot be changed after creation. The options are:

  • 1 generation: Compatible with older operating systems (both 32 and 64 bit), uses BIOS classic, supports VHD and VHDX disks, and allows booting from IDE controllers and virtual floppy disks.
  • 2 generation: Requires modern operating systems (64-bit only), uses UEFI, enables Secure Boot, supports large VHDX drives (up to 64TB), is faster and more secure, and enables advanced features (TPM, SCSI boot, virtual DVD, etc.). For better compatibility with modern systems, see How to change the resolution of a virtual machine.

Always consult the official documentation to check if your guest operating system supports Generation 2. For Ubuntu, Windows 10/11, RHEL/CentOS 8, Debian 10, etc., you can choose Generation 2. If in doubt, select Generation 1 for maximum compatibility.

4. RAM allocation

Indicates how much RAM the virtual machine should receive. Common examples:

  • Ubuntu: minimum 2048 MB (2GB), recommended 4096 MB (4GB).
  • Windows 10/11: Minimum 4096 MB (4GB), recommended 8192 MB (8GB) or more.

You can enable Dynamic Memory to have Hyper-V automatically manage RAM allocation based on the machine's actual demand. This helps optimize hardware usage, especially if you have multiple VMs on the same host.

5. Network settings

Select the virtual switch you created earlier (for example, "Virtual LAN"). If you leave it set to "Not Connected," the virtual machine won't have access to any networks.

  5 Best Programs for Mechanical Workshops

6. Create the virtual hard disk

Defines the name, location, and size of the virtual hard disk. Hyper-V allows you to create new disks, select an existing one, or leave the selection for later.

For a lightweight Ubuntu or Windows test environment, you can start with 20-40GB. If you're installing large applications or storing a lot of data, adjust the size to suit your needs.

By default, a dynamic VHDX disk is created (it grows with use). If you need maximum speed and reliability, choose the fixed-size option, although it will use all the space initially allocated.

7. Selecting the operating system installation media

  • You can choose to install the operating system later, boot from a bootable CD/DVD-ROM (usually an ISO file), from a virtual floppy disk, or from a network installation server (PXE).
  • The most common option is to choose "install from an ISO image file," selecting the downloaded image of the system you want to install.

8. Review the summary and finalize the creation

The wizard will show you a summary of all the options. Review it carefully and click "Finish" to finish creating your virtual machine.

Starting and installing the operating system on your virtual machine

Your virtual machine is now ready. Now all you have to do is start the operating system installation process:

  • In Hyper-V Manager, select your virtual machine in the center list and click Connect.
  • A console window will open. Press the button Start in that window.
  • If you've associated the ISO, the operating system installer will boot on the virtual screen. Follow the installation wizard as if you were on a real computer (choosing language, partitioning, user, etc.).
  • When the installation is complete, the machine will reboot and boot the already installed operating system from the virtual hard disk.

Advanced Settings: Optimizing and Customizing Your Hyper-V Virtual Machine

After installing the operating system, it's a good idea to adjust the advanced options to get the most out of it and adapt it to your needs. From Hyper-V Manager, select the virtual machine and access "Settings" in the right panel.

1. Hardware: Add, modify or remove resources

  • Processors: You can increase the number of virtual CPUs (up to the maximum allowed by your hardware). Ideally, you should adjust this based on the VM's actual usage and the needs of other VMs running alongside it.
  • Conference proceedings: Change allocated RAM, enable/disable dynamic memory, and adjust minimum and maximum limits.
  • Discs: Add more virtual hard drives, expand the size of existing ones, or connect physical drives directly.
  • SCSI controllers: They allow you to add hard drives, DVDs or shared drives.
  • Network adapters: Change the assigned virtual switch, add more adapters, adjust VLAN, bandwidth control, and advanced features.

2. Security: Secure Boot, TPM and Shielding

  • Secure Boot: Prevents unauthorized systems or drivers from loading during boot. It's enabled by default on Generation 2 machines and is especially useful for Windows environments or modern Linux distributions.
  • Trusted Platform Module (TPM): Allows you to enable a virtual TPM to encrypt disks and use advanced security features like BitLocker in Windows.
  • Armor: Protects the VM from unauthorized access, even if the host is compromised. When enabled, Secure Boot and TPM are automatically enabled, but certain management features are limited.

Choose the appropriate security level based on the use and type of data handled.

3. Boot order and UEFI firmware

  • Configure the boot order (from hard drive, DVD, network, etc.), especially after installing the operating system to speed up reboots.
  • On Generation 2 machines, you can choose UEFI firmware and adjust other Secure Boot-related options.

4. Network settings and advanced features

  • Secure Network and DHCP Security: They allow you to isolate the VM and block malicious or unauthorized network messages.
  • Port mirroring: Copies incoming/outgoing traffic from an adapter for analysis or monitoring.
  • Team building (NIC Teaming): Combines multiple virtual network adapters into one to increase performance and fault tolerance.
  • MAC dynamic/static: Defines whether the MAC address should change automatically or be fixed (useful for servers).

5. Memory and CPU weighting, NUMA and resource control

  • Memory weighting: Prioritizes memory access among multiple virtual machines based on importance.
  • CPU Resource Control: Limit or reserve percentages of CPU to prevent a VM from consuming all resources.
  • NUMA: Configures memory and processor topology for advanced hardware environments.

6. Control points (checkpoints)

Checkpoints, also known as snapshots, allow you to save the complete state of the virtual machine at a given point in time (system, disk, and memory) so you can easily revert to it if something goes wrong after an update or a sensitive change. It's recommended to use them before major changes, but don't overdo it, as they take up a lot of disk space.

  How to use Windhawk on Windows to customize your system

7. Automatic actions and administration

  • Autostart action: Defines whether the VM should boot or remain shut down when the physical host boots.
  • Automatic shutdown action: : Marks whether the VM should be shut down, saved, or disconnected when the host is shut down.

Installing and converting external images: VHDX and VMDK

Hyper-V allows you to not only create virtual machines from scratch, but also import existing images from other systems (for example, from VirtualBox or VMware). To convert virtual disks, such as VMware VMDKs, you can use tools like virtual disk converters.

Convert VMDK (VirtualBox) to VHDX (Hyper-V)

  • Use tools like StarWind V2V Converter to easily move from VMDK to VHDX.
  • You can also use Microsoft Virtual Machine Converter in combination with PowerShell for more advanced conversions.
  • Remember that after the conversion, you will need to create a new virtual machine in Hyper-V and associate the converted VHDX disk with it as an “Existing Virtual Hard Disk.”

Advanced Creation Options: PowerShell and Quick Create

Automated creation with PowerShell

If you need to deploy many virtual machines or want to automate processes, you can use PowerShell scripts to create VMs, assign disks, switches, memory, and all the options discussed above. Basic example:

New-VM -Name "VMName" -Path "Path" -NewVHDPath "VHDXPath" -NewVHDSizeBytes 40GB -Generation 2 -MemoryStartupBytes 4096MB -SwitchName "SwitchName"

You can then add processors, dynamic memory, etc., and check all the available cmdlets by running:

Get-Command -Module hyper-v | Out-GridView

Using Quick Create

  • In Windows 10/11, there is the “Hyper-V Quick Create” option, which makes it even easier to create ready-to-use virtual machines (with preconfigured Windows or Linux images) in just a few clicks.
  • You can choose from predefined templates or use your own ISO.
  • It is not as flexible as the classic wizard, but it saves time for testing or initiation tasks.

Troubleshooting common problems in Hyper-V

1. The virtual machine does not start

  • Check the resource allocation (CPU, memory and virtual hard disk).
  • Check the Windows event logs (Event Viewer → Applications and Services Logs → Microsoft → Windows → Hyper-V-VMMS).
  • Make sure the VHDX disk isn't corrupted. Use repair tools if necessary.

2. Network problems

  • Check that the VM is connected to the correct virtual switch.
  • Verify that the host has network connectivity.
  • Temporarily disable the firewall to avoid blockages.

3. Operating system installation failures

  • Confirm that the ISO is not corrupted and is a supported version.
  • Verify that the necessary drivers are present (some Linux distros need them) drivers Hyper-V network or storage to function properly).
  • Check generation-OS compatibility.

Compatibility Considerations and Advanced Limits

  • You can't change a VM's generation once it's created. If you choose the wrong generation, you'll have to create it again.
  • Generation 2 machines allow for much larger virtual hard drives (up to 64TB).
  • On hosts with more than 64 logical CPUs, you'll need to create VMs using PowerShell or Windows Admin Center.
  • Generation 2 VMs can only boot from ISO images and SCSI virtual devices, not from physical devices or floppy disks.
  • You can upload your VHDX disks to the Azure cloud, if they meet the format and size requirements.

Optimization and management in complex environments

In enterprise deployments or when managing multiple VMs it is essential to:

  • Use checkpoints before critical changes.
  • Correctly allocate RAM and CPU depending on the priority of each VM.
  • Configure the network with VLANs, multiple switches, and isolation policies for secure or segmented environments.
  • Implement regular backups, using internal solutions such as Windows Backup or integrating third-party tools such as clone virtual machine with Hyper-V for backups, replication, and even disaster recovery orchestration.
  • Monitor resource usage from the Task Manager, Performance Monitor, or advanced tools to detect bottlenecks and adjust the allocated hardware.

Migrating, importing, and exporting virtual machines

Hyper-V makes it easy to export and import VMs between different hosts and Windows versions, which is useful for:

  • Move entire labs between computers.
  • Make backups before a host upgrade.
  • Transfer VM environments to production servers.

Always make sure to maintain Hyper-V version and disk format compatibility before migrating.

clone Hyper-V virtual machine
Related articles:
How to clone a virtual machine in Hyper-V step by step and in detail