Skip to main content
Version: v1.10 (Dev)

Create a Windows Virtual Machine

Create one or more virtual machines from the Virtual Machines page.

note

For creating Linux virtual machines, please refer to this page.

How to Create a Windows VM

Header Section

  1. Create a single VM instance or multiple VM instances.
  2. Set the VM name.
  3. (Optional) Provide a description for the VM.
  4. (Optional) Select the VM template windows-iso-image-base-template. This template will add a volume with the virtio drivers for Windows.

Basics Tab

  1. Configure the number of CPU cores assigned to the VM.
  2. Configure the amount of Memory assigned to the VM.

create-windows-vm

note

As mentioned above, it is recommended that you use the Windows VM template. The Volumes section will describe the options which the Windows VM template created automatically.

caution

The bootOrder values need to be set with the installation image first. If you change it, your VM might not boot into the installation disk.

Volumes Tab

  1. The first volume is an Image Volume with the following values:
    1. Name: The value cdrom-disk is set by default. You can keep it or change it.
    2. Type: Select cd-rom.
    3. Image: Select the Windows image to be installed. See Upload Images for the full description on how to create new images.
    4. Size: The value 20 is set by default. You can change it if your image has a bigger size.
    5. Bus: The value SATA is set by default. It's recommended you don't change it.
  2. The second volume is a Volume with the following values:
    1. Name: The value rootdisk is set by default. You can keep it or change it.
    2. Type: Select disk.
    3. StorageClass: You can use the default StorageClass harvester-longhorn or specify a custom one.
    4. Size: The value 32 is set by default. See the disk space requirements for Windows Server and Windows 11 before changing this value.
    5. Bus: The default value is VirtIO (virtio-blk), and it is recommended for most Windows workloads. In benchmarking on LVM CSI (Windows Server 2022, with Hyper-V enlightenments enabled), virtio-blk matched virtio-scsi on sequential and random-read throughput and delivered roughly twice the IOPS at about half the latency on random-write and mixed read/write workloads (databases, write-ahead logs, and backup targets) — in part because only virtio-blk can use a dedicated I/O thread. Choose SCSI (virtio-scsi) when you need many disks behind a single controller or SCSI-specific features such as UNMAP/DISCARD passthrough and persistent reservations. SATA is a fallback for scenarios where paravirtualized drivers cannot be loaded at boot time.
  3. The third volume is a Container with the following values:
    1. Name: The value virtio-container-disk is set by default. You can keep it or change it.
    2. Type: Select cd-rom.
    3. Docker Image: The value registry.suse.com/suse/vmdp/vmdp:2.5.4.2 is set by default. We recommend not changing this value.
    4. Bus: The value SATA is set by default. We recommend not changing this value.
  4. You can add additional disks using the buttons Add Volume, Add Existing Volume, Add VM Image, or Add Container.

create-windows-vm-volumes

Networks Tab

  1. The Management Network is added by default with the following values:
    1. Name: The value default is set by default. You can keep it or change it.
    2. Model: The default value is e1000. This option ensures the guest operating system can obtain network connectivity before paravirtualized drivers are installed. Once VMDP (or VirtIO drivers such as virtio-win) is loaded inside the guest, switching to virtio provides higher throughput and lower CPU overhead for sustained network transfers.
    3. Network: The value management Network is set by default. You can't change this option if no other network has been created. See Harvester Network for the full description on how to create new networks.
    4. Type: The value masquerade is set by default. You can keep it or change it to the other available option, bridge.
  2. You can add additional networks by clicking Add Network.

create-windows-vm-networks

caution

Changing the Node Scheduling settings can impact Harvester features, such as disabling Live migration.

Node Scheduling Tab

  1. Node Scheduling is set to Run VM on any available node by default. You can keep it or change it to the other available options from the dropdown.

create-windows-vm-scheduling

Advanced Options Tab

  1. OS Type: The value Windows is set by default. It's recommended you don't change it.
  2. Machine Type: The value None is set by default. It's recommended you don't change it. See the KubeVirt Machine Type documentation before you change this value.
  3. (Optional) Hostname: Set the VM hostname.
  4. Cloud Config (Optional): The values for both User Data and Network Data are set by default. If the selected Windows image includes Cloudbase-Init (a common addition to automated Windows cloud images), the guest processes the User Data during its initial boot phase. This allows injection of custom configurations (such as SSH keys, local administrator accounts, driver installation commands, custom hostnames, and first-boot PowerShell scripts) for each virtual machine. If the image does not include Cloudbase-Init, the system still mounts the User Data on the configuration drive (NoCloud ISO format), but the guest operating system ignores it.
  5. (Optional) Enable TPM, Booting in EFI mode, Secure Boot: Both the TPM 2.0 device and UEFI firmware with Secure Boot are hard requirements for Windows 11.
note

Currently, only non-persistent vTPMs are supported, and their state is erased after each VM shutdown. Therefore, Bitlocker should not be enabled.

create-windows-vm-advanced

Once all the settings are in place, click on Create to create the VM.

note

If you need to add advanced settings, you can edit the VM configuration directly by clicking on Edit as YAML. And if you want to cancel all changes made, click Cancel.

Installation of Windows

  1. Select the VM you just created, and click Start to boot up the VM.

  2. Boot into the installer, and follow the instructions given by the installer.

  3. (Optional) If you are using virtio based volumes, you will need to load the specific driver to allow the installer to detect them. If you're using VM template windows-iso-image-base-template, the instruction is as follows:

    1. Click on Load driver, and then click Browse on the dialog box, and find a CD-ROM drive with a VMDP-WIN prefix. Next, find the driver directory according to the Windows version you're installing; for example, Windows Server 2012r2 should expand win8.1-2012r2 and choose the pvvx directory inside. find-virtio-driver-directory
    2. Click OK to allow the installer to scan this directory for drivers, choose SUSE Block Driver for Windows, and click Next to load the driver. select-virtio-block-driver
    3. Wait for the installer to load up the driver. If you choose the correct driver version the virtio volumes will be detected once the driver is loaded. installer-found-virtio-drive
  4. (Optional) If you are using other virtio based hardware like network adapter, you will need to install those drivers manually after completing the installation. To install drivers, open the VMDP driver disk, and use the installer based on your platform.

The support matrix of VMDP driver pack for Windows are as follows (assume the VMDP CD-ROM drive path is E):

VersionSupportedDriver path
Windows 7NoN/A
Windows Server 2008NoN/A
Windows Server 2008r2NoN/A
Windows 8 x86(x64)YesE:\win8-2012\x86(x64)\pvvx
Windows Server 2012 x86(x64)YesE:\win8-2012\x86(x64)\pvvx
Windows 8.1 x86(x64)YesE:\win8.1-2012r2\x86(x64)\pvvx
Windows Server 2012r2 x86(x64)YesE:\win8.1-2012r2\x86(x64)\pvvx
Windows 10 x86(x64)YesE:\win10-11-server22\x86(x64)\pvvx
Windows Server 2016 x86(x64)YesE:\win10-server16-19\x86(x64)\pvvx
Windows Server 2019 x86(x64)YesE:\win10-server16-19\x86(x64)\pvvx
Windows 11 x86(x64)YesE:\win10-11-server22\x86(x64)\pvvx
Windows Server 2022 x86(x64)YesE:\win10-11-server22\x86(x64)\pvvx
note

If you didn't use the windows-iso-image-base-template template, and you still need virtio devices, please make sure to add your custom Windows virtio driver to allow it to detect the hardware correctly.

note

For full instructions on how to install the VMDP guest driver and tools see the documentation at https://documentation.suse.com/sle-vmdp/2.5/html/vmdp/index.html

Enable Hyper-V Enlightenments

Windows guests benefit significantly from KubeVirt's Hyper-V Top-Level Functional Specification (TLFS) enlightenment features. These include paravirtualized interrupt delivery (SynIC), the Hyper-V synthetic timer with direct interrupts, TLB flush hypercalls, VAPIC, and the Hyper-V clock timer. Enabling these features typically results in the following:

  • Reduced initial write allocation time on thin-provisioned storage.
  • Stable throughput during sustained write operations and minimal periodic stalls during large file copies.
  • Lower per-interrupt scheduling overhead within the guest operating system.

The enlightenments are not enabled by default. To enable them, perform the following steps:

  1. On the Harvester UI, go to Virtual Machines.

  2. Locate the target virtual machine, and then select ⋮ > Edit as YAML.

  3. Add the following block to .spec.template.spec.domain:

features:
acpi: { enabled: true }
apic: { enabled: true }
smm: { enabled: true }
hyperv:
relaxed: { enabled: true }
vapic: { enabled: true }
spinlocks: { enabled: true, spinlocks: 8191 }
vpindex: { enabled: true }
synic: { enabled: true }
synictimer: { enabled: true }
ipi: { enabled: true }
runtime: { enabled: true }
reset: { enabled: true }
clock:
utc: {}
timer:
hpet: { present: false }
hyperv: { present: true }
pit: { tickPolicy: delay }
rtc: { tickPolicy: catchup }
  1. Restart the virtual machine to apply the changes.

  2. Verify that the enlightenments are active from the cluster level.

kubectl get vmi <vm-name> -o json | jq '.spec.domain.features.hyperv'

The configuration above matches the recommendation for "best balance between performance and stability" in the SUSE Support Knowledge Base article Lower disk I/O performance in Windows 11 VMs compared to Linux guests on Harvester.

You can enable more aggressive enlightenments (such as tlbflush, frequencies, reenlightenment, or synictimer with direct: true) on individual virtual machines to improve their performance. However, these enlightenments have the following disadvantages:

  • Require explicit support from the underlying cluster hardware.
  • Can affect live-migration compatibility across cluster nodes that run on different CPU generations.

For more information, see HyperV optimizations in the KubeVirt documentation and Tuning Windows VM Performance on SUSE Virtualization in the SUSE blog.

Known Issues

Windows ISO unable to boot when using EFI mode

When using EFI mode with Windows, you may find the system booted with other devices like HDD or UEFI shell like the one below:

efi-shell

That's because Windows will prompt a Press any key to boot from CD or DVD... to let the user decide whether to boot from the installer ISO or not, and it needs human intervention to allow the system to boot from CD or DVD.

boot-from-cd

Alternately if the system has already booted into the UEFI shell, you can type in reset to force the system to reboot again. Once the prompt appears you can press any key to let system boot from Windows ISO.

VM crashes when reserved memory not enough

There is a known issue with Windows VM when it is allocated more than 8GiB without enough reserve memory configured. The VM crashes without warning.

This can be fixed by allocating at least 256MiB of reserved memory to the template on the Advanced Options tab. If 256MiB doesn't work, try 512MiB.

reserved-memory-config

BSoD (Blue Screen of Death) at first boot time of Windows

There is a known issue with Windows VM using Windows Server 2016 and above, a BSoD with error code KMODE_EXCEPTION_NOT_HANDLED may appears at the first boot time of Windows. We are still looking into it and will fix this issue in the future release.

As a workaround, you can create or modify the file /etc/modprobe.d/kvm.conf within the installation of Harvester by updating /oem/99_custom.yaml like below:

name: Harvester Configuration
stages:
initramfs:
- commands: # ...
files:
- path: /etc/modprobe.d/kvm.conf
permissions: 384
owner: 0
group: 0
content: |
options kvm ignore_msrs=1
encoding: ""
ownerstring: ""
# ...
note

This is still an experimental solution. For more information, please refer to this issue and please let us know if you have encountered any issues after applying this workaround.