# Make a Windows VM secure boot

**URL:** <https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-8\
**Created:** [May 12, 2025, 3:11pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433 "2025-05-12T15:11:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbtnichols](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rbtnichols](https://forums.rockylinux.org/u/rbtnichols)\
**Post date:** [May 12, 2025, 3:11pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/1 "2025-05-12T15:11:39Z")

</div>

In preparation for Windows 11, I’ve converted a Windows 10 VM to GPT and UEFI. The TianoCore firmware does not let me enable secure boot. I’m obviously missing something. The only detailed instructions I’ve been able to find are very Debian-specific. I need help doing that in a Rocky Linux 8 host.

I suppose the first question is, “Does the host itself have to be running in secure boot?” That’s going to be a deal breaker, since I need a couple of kernel modules from EPEL, and those taint the kernel.

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [May 12, 2025, 3:26pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/2 "2025-05-12T15:26:21Z")

</div>

Secure boot on the host is not required to run secure boot on the vm. What you will need is a specific package and minor changes to the VM configuration to enable secure boot for the VM.

```auto
dnf install edk2-ovmf

```

It’s likely you already have the above. For the VM itself, there is a specific configuration area you’ve likely seen. Here’s an example of one of my older VM configs, using `virsh edit <vm_name>`.

```auto
  <os>
    <type arch='x86_64' machine='pc-q35-rhel9.4.0'>hvm</type>
    <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/xmpp01.angelsofclockwork.net_VARS.fd</nvram>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>

```

The loader tag is the one you’re likely looking for. It should point to the secboot file with those settings preferably set (`secure='yes'` being the obvious required one). You should be able to get secure boot after that.

I know you mentioned 8, but in Rocky Linux 9, there’s an additional section that is added/needed. Here it is just in case.

```auto
    <firmware>
      <feature enabled='yes' name='enrolled-keys'/>
      <feature enabled='yes' name='secure-boot'/>
    </firmware>

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![rbtnichols](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rbtnichols](https://forums.rockylinux.org/u/rbtnichols)\
**Post date:** [May 12, 2025, 4:29pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/3 "2025-05-12T16:29:27Z")

</div>

Thanks much for that. When I try to add that “secure=‘yes’”, virsh edit complains:  
error: unsupported configuration: Secure boot requires SMM feature enabled  
Failed. Try again? [y,n,i,f,?]:  
In the `<feature>` section I had to add:  
` <smm state='on'/>`  
That made virsh edit happy, but TianoCore is still showing “Current Secure Boot State Disabled” and won’t let me change it.  
Any ideas about what I might be missing now?

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [May 13, 2025, 8:49am UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/4 "2025-05-13T08:49:55Z")

</div>

> [@rbtnichols](#):
>
> I need a couple of kernel modules from EPEL, and those taint the kernel.

It is possible to sign modules yourself: [https://www.ibm.com/docs/en/linux-on-systems?topic=linuxone-using-your-own-keys](https://www.ibm.com/docs/en/linux-on-systems?topic=linuxone-using-your-own-keys)  
For example, the dkms (from EPEL) signs the modules it builds.  
The `kernel-devel` has the `sign-file` binary.

Alas, like IBM points out, if you start to sign modules, then you have to redo it for each updated version.

---

<div class="post-metadata">

**Author:** ![rbtnichols](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rbtnichols](https://forums.rockylinux.org/u/rbtnichols)\
**Post date:** [May 13, 2025, 7:37pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/5 "2025-05-13T19:37:14Z")

</div>

Well, it looks like secure boot is a non-issue. The Windows 10 VM just offered the Windows 11 upgrade, and I accepted. (Yes, I can always revert to a saved disk image.) The upgrade went through without a hitch – no complaints about secure boot, and no insistance on having a Microsoft account. The upgraded VM appears to run fine. I’ve reverted the XML file to remove the “secure=‘yes’” and “smm state=‘on’”. All appears well, and a couple of Windows updates completed successfully.

So, now I just have to learn about de-bloating and locking down Windows 11, but that’s a task for another channel.

Thanks to all.

---

<div class="post-metadata">

**Author:** ![neel](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@neel](https://forums.rockylinux.org/u/neel)\
**Post date:** [May 14, 2025, 1:34am UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/6 "2025-05-14T01:34:32Z")

</div>

While OP has solved their problem, I’ve noticed that Cockpit on Rocky 9 automatically enables secure boot on UEFI VMs even when it’s disabled on the host. I’ve bumped into that when running EVE-NG in a VM.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [May 19, 2025, 6:42pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/7 "2025-05-19T18:42:44Z")

</div>

> [@rbtnichols](#):
>
> So, now I just have to learn about de-bloating and locking down Windows 11

You could start with hidden scheduled tasks, but is there any point?

Being closed source, having a split brain API and needing a licence and activation makes me wonder if it has any future at all, compared with free and open source FOSS operating systems?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [July 18, 2025, 6:43pm UTC](https://forums.rockylinux.org/t/make-a-windows-vm-secure-boot/18433/8 "2025-07-18T18:43:27Z")

</div>

Closed on July 18, 2025, 6:43pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
