What is the fastest way to create a new Windows on Arm virtual machine?

The virtual machine creation script creates a complete Windows 11 on Arm virtual machine with the all option. The default values are used for all configurable parameters. The location to store the VM files is also provided as an argument.

To create a new VM, run the command:

    

        
        
./create-win11-vm.sh all $HOME/win11-vm

    

This single command executes all required virtual machine creation steps as explained in the previous section.

The VM data is stored in the $HOME/win11-vm directory, and Windows will install automatically without any user intervention.

Once the VM creation is complete, you’ll see:

    

        
        QEMU closed successfully.
Windows installation should be complete!
You can now use: ./run-win11-vm.sh $HOME/win11-vm

        
    

Your Windows on Arm VM is now ready to use. You can proceed to the next section to run the VM or continue on this page to review additional information about modifying default values, running the individual steps of VM creation, and fixing common errors.

Configuration options

The creation script supports several options to customize your virtual machine setup.

For example, you can change the Windows user, password, and disk size using the arguments shown below.

    

        
        
./create-win11-vm.sh all $HOME/win11-vm --username MyUser --password MyPass --disksize 60

    

The table below lists the configuration options and default values.

FlagDescriptionDefault ValueExample
--username <name>Windows user namewin11arm--username Admin
--password <pass>Windows user passwordwin11arm--password MySecurePass
--disksize <size>Disk size in GB40--disksize 60
--rdp-port <port>RDP port for remote connections3389--rdp-port 3390
--language <lang>Windows language"English (United States)"--language "English International"
--vm-mem <size>VM memory in GBhalf of system RAM--vm-mem 8

Disk space requirements

The creation script checks available disk space before starting.

An estimate of required disk space is shown in the table below.

ComponentSizeDescription
Windows 11 ISO~5GBDownloaded from Microsoft
VirtIO drivers~500MBPerformance drivers
VM disk imageVariableDefault is 40 GB
Temporary files~1GBInstallation workspace
Total needed~7GB + disk sizeExample: 47GB for default 40GB disk

Configuration examples

Create a VM with custom disk size and network port:

    

        
        
./create-win11-vm.sh all $HOME/win11-vm --disksize 60 --rdp-port 3390 --username Admin

    

Set up a VM with English International language:

    

        
        
./create-win11-vm.sh all $HOME/win11-vm --language "English International"

    

Alternative four-step creation process

You can run each step of the VM creation process individually. Understanding each step helps with troubleshooting and customization.

Step 1: Create the VM directory structure

    

        
        
./create-win11-vm.sh create $HOME/win11-vm

    

Command summary:

  • Creates the VM directory at the specified path
  • Sets up the initial directory structure for VM files
  • Creates a vm-config.txt file with your configuration settings for reference
  • Copies the Remmina connection template if available

Files created:

  • vm-config.txt - Configuration reference file
  • connect.remmina - RDP connection template (if available)

Each VM stores its configuration in vm-config.txt:

    

        
        
# VM Configuration (for reference)
# Generated by create-win11-vm.sh v2.0.0
VM_PATH=$HOME/win11-vm
USERNAME=win11arm
PASSWORD=win11arm
DISKSIZE=40
RDP_PORT=3389
LANGUAGE=English (United States)
VM_MEM=8
CREATED=Thu Aug 28 10:30:45 UTC 2025

    

This step is lightweight and completes quickly. It establishes the workspace where all VM files will be stored.

Step 2: Download Windows 11 and drivers

    

        
        
./create-win11-vm.sh download $HOME/win11-vm 

    

Command summary:

  • Downloads the Windows 11 Arm64 ISO directly from Microsoft’s servers
  • Patches the ISO to boot automatically without requiring a keypress
  • Downloads VirtIO drivers for optimal VM performance
  • Extracts and organizes drivers for the unattended installation
  • Creates unattended installation configuration files
  • Sets up the autounattend.xml with your specified username, password, and language

Files created:

  • installer.iso - Windows 11 Arm64 installation media
  • unattended/ directory - Contains drivers and installation automation files
  • unattended/autounattend.xml - Windows unattended installation configuration
  • unattended/firstlogin.ps1 - Post-installation script

If you already downloaded the Windows 11 installer ISO, you can copy it to your VM directory as installer.iso before running this step. The script will detect the existing file and ask if you want to use it or download a fresh copy:

    

        
        installer.iso already exists. Delete it and download a fresh copy? [Y/n]

        
    

Choosing ’n’ will skip the download and use your existing ISO, saving significant time and bandwidth.

Download Process Details: The script uses an automated process to download Windows 11 from Microsoft’s official servers:

  1. Parse Microsoft’s download page - Extracts product edition information
  2. Get language SKU ID - Identifies the correct language variant
  3. Obtain download link - Retrieves the direct download URL for Arm64
  4. Download and verify - Downloads the ISO and verifies its integrity

Step 3: Prepare the VM disk

    

        
        
./create-win11-vm.sh prepare $HOME/win11-vm

    

Command summary:

  • Creates the unattended.iso containing drivers and installation files
  • Sets up the main VM hard drive as a QCOW2 disk image
  • Allocates the specified disk space with optimized settings
  • Prepares all components needed for the automated installation

Files created:

  • unattended.iso - ISO containing drivers and automation scripts
  • disk.qcow2 - Main VM hard drive (empty, ready for Windows installation)

Disk Creation Details: The script creates a QCOW2 disk image with these optimizations:

  • Cluster size: 2 MB for better performance
  • No copy-on-write: Disabled for improved I/O performance
  • Metadata preallocation: Reduces fragmentation during VM operation

Important Note: If disk.qcow2 already exists, the script will warn you that proceeding will delete the existing VM’s hard drive and start over with a clean installation.

Step 4: Boot and install Windows for the first time

    

        
        
./create-win11-vm.sh firstboot $HOME/win11-vm

    

Command summary:

  • Launches QEMU with the Windows installer
  • Boots from the Windows 11 ISO with unattended installation
  • Automatically installs Windows with your specified settings
  • Installs VirtIO drivers for optimal performance
  • Configures the user account and system settings
  • Completes the entire Windows setup process without user intervention

System Requirements Check: Before starting, the script verifies:

  • Desktop environment is available (DISPLAY or WAYLAND_DISPLAY)
  • All required files exist (installer.iso, unattended.iso, disk.qcow2)
  • Sufficient system resources are available

Automatic Resource Allocation: If you don’t specify --vm-mem, the script automatically allocates:

  • Memory: Half of your system’s total RAM (minimum 2GB)
  • CPU cores: Half of your system’s total cores (minimum 2 cores)

For example, on a system with 16GB RAM and 8 CPU cores:

  • VM gets 8GB RAM and 4 CPU cores
  • Host system retains 8GB RAM and 4 CPU cores for other tasks

The script launches QEMU with these settings:

  • Machine type: virt with KVM acceleration
  • CPU: Host CPU passthrough for best performance
  • Graphics: RamFB with GTK display and OpenGL acceleration
  • Input: USB keyboard and tablet for proper mouse integration
  • Network: User-mode networking with virtio-net for performance
  • Storage: VirtIO block device with optimized caching
  • Random number generator: Hardware entropy for security

The installation process performs the following steps:

  1. UEFI boot - VM starts with UEFI firmware
  2. Windows installer loads - Boots from installer.iso
  3. Unattended installation begins - Uses autounattend.xml configuration
  4. Driver installation - VirtIO drivers installed automatically
  5. User account creation - Your specified username and password
  6. System configuration - Language, region, and basic settings
  7. First login script - Runs firstlogin.ps1 for final setup

The entire installation process typically takes 20-30 minutes depending on your system’s performance.

Troubleshooting common problems

Insufficient disk space

If you see an error about insufficient disk space:

    

        
        Error: Insufficient free disk space. 40 GB is needed, but you only have 25 GB.

        
    

Use the following options to correct the error:

  • Free up disk space on your system
  • Use a smaller disk size: --disksize 30
  • Choose a different location with more space

Download failures

If Windows ISO download fails:

    

        
        Error: Failed to download Windows 11 installer.iso from Microsoft

        
    

Use the following options to correct the error:

  • Check your internet connection
  • Try again later (Microsoft can block frequent automated downloads)
  • Manually download the ISO from Microsoft’s website and save it as installer.iso

Memory allocation issues

If the VM fails to start due to memory issues:

Use the following options to correct the error:

  • Reduce VM memory: --vm-mem 4
  • Close other applications to free system memory

You now have a good understanding of virtual machine creation. The next section will cover how to run and connect to your VM using the run script.

Back
Next