Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Passing SMBIOS Information to the Windows Subsystem in KVM

Digital solution partner

Passing SMBIOS Information to the Windows Subsystem in KVM

In this article, we will see how to configure KVM to allow the transfer of SMBIOS information, such as UUID and serial numbers, to the Windows subsystem. This process is essential to ensure that the virtualized operating system can access the correct hardware information and perform operations that depend on this data.

Prerequisites

Before starting, make sure you have:

  • A VM running with KVM and libvirt.
  • Root access or a user with sudo privileges.
  • The OVMF package installed to enable UEFI support.

1. Creating UEFI Variable Files

First, we need to create a copy of the UEFI variable file specific to the VM. This avoids conflicts between VMs and allows you to retain personalized UEFI settings.

2. Editing the VM’s XML File

Edit the XML configuration of your virtual machine using the command virsh edit VM_NAME. Add or modify the <os> section as follows:

3. Verifying Disk and Boot Order Configuration

Ensure that the boot disk is correctly configured in the XML file:

Access the VM BIOS during startup and check that the boot order is correct.

4. Restarting the libvirt Service

After making the changes, restart the libvirt service:

5. Starting the Virtual Machine

Start the virtual machine with the following command:

6. Troubleshooting UEFI Boot Issues

If the VM does not boot the operating system, follow these steps for troubleshooting:

  • Check the boot order in the UEFI configuration menu.
  • Verify the presence of system partitions and boot files by mounting the disk image.
  • Try restoring the UEFI boot loader using a Windows recovery disk.

7. Verifying the Transfer of SMBIOS Information

After properly configuring the VM, boot into Windows and verify the transfer of SMBIOS information by running the following commands:

Conclusion

By following these steps, you can enable the transfer of SMBIOS information from your KVM virtual machine to the Windows operating system. This is essential to ensure that applications and services that rely on this information function correctly within the VM.