3.3. Creating Windows virtual machines


You can create a fully-virtualized Windows machine on a RHEL 10 host, launch the graphical Windows installer inside the virtual machine (VM), and optimize the installed Windows guest operating system (OS).

To create the VM and to install the Windows guest OS, use the virt-install command or the RHEL 10 web console.

Prerequisites

  • A Windows OS installation source, which can be one of the following, and be available locally or on a network:

    • An ISO image of an installation medium
    • A disk image of an existing VM installation
  • A storage medium with the KVM virtio drivers.

    To create this medium, see Preparing virtio driver installation media on a host machine.

  • If you are installing Windows 11, the edk2-ovmf, swtpm and libtpms packages must be installed on the host.

Procedure

  1. Create the VM. For instructions, see Creating virtual machines, but be aware of the following specifics.

    • If you are using the virt-install utility to create the VM, add the following options to the command:

      • The storage medium with the KVM virtio drivers. For example:

        --disk path=/usr/share/virtio-win/virtio-win.iso,device=cdrom
      • The Windows version you will install. For example, for Windows 10 and 11:

        --os-variant win10

        For a list of available Windows versions and the appropriate option, use the following command:

        # osinfo-query os
      • If you are installing Windows 11, enable Unified Extensible Firmware Interface (UEFI) and virtual Trusted Platform Module (vTPM):

        --boot uefi
    • If using the web console to create the VM, specify your version of Windows in the Operating system field of the Create new virtual machine window.

      • If you are installing earlier Windows versions than Windows 11 and Windows Server 2022, start the installation by clicking Create and run.
      • If you are installing Windows 11, or you want to use additional Windows Server 2022 features, confirm by clicking Create and edit and enable UEFI and vTPM using the CLI:

        1. Open the VM’s XML configuration:

          # virsh edit windows-vm
        2. Add the firmware='efi' option to the os element:

          <os firmware='efi'>
            <type arch='x86_64' machine='pc-q35-6.2'>hvm</type>
            <boot dev='hd'/>
          </os>
        3. Add the tpm device inside the devices element:

          <devices>
            <tpm model='tpm-crb'>
              <backend type='emulator' version='2.0'/>
            </tpm>
          </devices>
        4. Start the Windows installation by clicking Install in the Virtual machines table.
  2. Install the Windows OS in the VM.

    For information about how to install a Windows operating system, refer to the relevant Microsoft installation documentation.

  3. If you are using the web console to create the VM, attach the storage medium with virtio drivers to the VM by using the Disks interface.

    For instructions, see Attaching existing disks to virtual machines by using the web console.

  4. Configure KVM virtio drivers in the Windows guest OS. For details, see Installing KVM paravirtualized drivers for Windows virtual machines.
  5. Optional: Optimize the performance of the Windows VM. For details, see Optimizing Windows virtual machines.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部