Creating a Windows VMs compliant to AWS EC2 Windows License Included
Environment
- Red Hat OpenShift Virtualization
- Red Hat OpenShift Service on AWS (ROSA)
Issue
- I want to create a Windows VM compliant with Windows License Included (LI)
Resolution
If you plan to run Windows VMs on OpenShift hosts (AMD64 bare metal EC2 instances) with enabled AWS Windows License Included you need to create the Windows VMs in a license-compliant manner by utilizing d1 preferences.
For details about preparing a host in a ROSA cluster, see this article: https://access.redhat.com/articles/7136295 .. about Windows License-Included hosts.
You can create a compliant VM from a list of available bootable volumes.
- In the web console, navigate to Virtualization -> Catalog.
- The InstanceTypes tab opens by default.
- Create a new Windows boot source by click Add volume to upload a new volume or to use an existing persistent volume claim (PVC), a volume snapshot, or a
containerDiskvolume.- In the Volume metadata section, ensure to select a preference with a name starting with
windowsand followed by your Windows version, e.g.,windows.11.virtio. - Click Save.
- In the Volume metadata section, ensure to select a preference with a name starting with
- Select a suitable bootable volume from the list. If the list is truncated, click the Show all button to display the entire list.
- The bootable volume table contains the previously uploaded boot source.
- Select a suitable
InstanceTypefrom thed1family.- Click in
User providedtab. - Select an
InstanceTypestarting with thed1name suitable for your VM, e.g.,d1.2xmediumfor a Windows 11 VM.
- Click in
- Optional: If you are creating a Windows VM, you can mount a Windows driver disk:
- Click the Customize VirtualMachine button.
- On the VirtualMachine details page, click Storage.
- Select the Mount Windows drivers disk checkbox.
- Optional: Click View YAML & CLI to view the YAML file. Click CLI to view the commands for OpenShift Virtualization
virtctlCLI. You can also download or copy either the YAML file contents or the CLI commands. - Click Create VirtualMachine.
After the VM is created, you can monitor the status on the VirtualMachine details page. In a cluster with enabled AWS Windows License Included, only VMs utilizing InstanceType from the d1 family are expected to run. Windows VMs created from templates or utilizing other InstanceTypes are expected to be unable to start. Windows VMs must enable the dedicatedCpuPlacement attribute. This attribute is enabled by default if the IntanceTypes having a name starting with d1 is used.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.