How to find virtual machine ID and machine type in SCALE?

I have a Windows 10 VM in SCALE that I want to upgrade to Windows 11. However, Windows 11 will not install unless I’m able to provide Trusted Platform Module (TPM). This was discussed here: Windows 11 and Secure Boot | TrueNAS Community.

The command that I would need to issue is apparently cli -c “service vm update id=2 machine_type=q35 arch_type=x86_64 trusted_platform_module=true”. Presumably this could be done over ssh.

However, I would need to supply the virtual machine ID and machine_type. (The arch_type I would assume is " x86_64.").

I cannot figure out how to find these parameters for the VM in question. Does anyone know how to find the virtual machine ID and machine type for a VM in SCALE?

This script might do what you want, it lists the names and IDs of the VMs from the middleware

In the thread you link to, @directhex uses machine_type q35

1 Like

Thanks! I ran the script you just provided, and it shows a number for each VM which I assume is the ID.

I don’t know what “q35” means for machine_type and whether it was specific to the machine in that thread, but I will try it.

I have now confirmed that this command appears to work. I shut down the VM, issued the command in SCALE over SSH, then restarted the VM, and Windows now says that it meets the hardware requirements to upgrade to Windows 11.

1 Like

Does this change persist after a shutdown?
I am also very interested in this.

1 Like

Me too :slight_smile:

I don’t know if it persists, and I only reboot SCALE a few times a year as doing so is a hassle given that I have OPNsense and other important VMs on it.

However, if it does not persist, then all you would need to do is add an init script to run the command at startup under “System Settings,” “Advanced,” "“Init/Shutdown Scripts.”

Yeah, I was thing about the init script.
I will test tomorrow if it atleast persists a VM reboot.

The q35 machine type refers to the emulated chipset. Q35 supports among other things pci-e, while the standard i440FX does not- only a very fast PCI.

I have now completed the upgrade to Windows 11 in the VM, and the upgrade process required a reboot before completing successfully. So, the Trusted Platform Module command certainly persists after a VM reboot. The only real question is whether it persists after a SCALE reboot. Just to be safe, I will probably add an init script. I already have one for negotiation of a network adapter, and it works perfectly. So I will probably add one for this.

1 Like
  1. Create the Windows 11 VM and start it.
  2. Go to the VM options and click Serial Shell.
  3. Note the # in front of the VM name.
  4. Go to System Settings > Shell.
  5. Paste [Shift]-[Insert] the line below and change the X to the #, then [Enter].

cli -c “service vm update id=X machine_type=q35 arch_type=x86_64 trusted_platform_module=true”

  1. Start up the VM and Windows 11 will install.
1 Like

I have done this and upgraded to Windows 11 in the VM.

Do you know if this persists after a reboot of the SCALE server? I don’t reboot SCALE often, but even so, I’m trying to figure out if I need to put this command in an INIT script under System, Advanced.

I’ve been using a test server for TrueNAS SCALE v23.10.2 and I can confirm after a complete shutdown of TrueNAS and the server hardware, upon startup, the Windows11 VM started up fine. The requirements checking was only at install.

1 Like

I also found this for a VirtualBox install of Windows11.
This involves interrupting the install process to add some registry keys to bypass checks. Step 1 is not needed.

  • Step 2: Then, press the Shift + F10 keys together to open the command line window on the first page of windows 11 installation.
  • Step 3: Type regedit and press the Enter key to open Registry Editor.
  • Step 4: Then, go to this path - Computer\HKEY_LOCAL_MACHINE\SYSTEM\Setup.
  • Step 5: Right-click the Setup key, then, choose New and click Key. Name it as LabConfig.
  • Step 6: Click LabConfig and right-click the empty space to select the DWORD (32-bit) Value option. Name it as BypassTPMCheck. Double-click it to change the value data to 1, and press OK.
  • Step 7: Right-click the empty space to select the DWORD (32-bit) Value option. Name it as BypassCPUCheck. Double-click it to change the value data to 1, and press OK.
  • Step 8: Right-click the empty space to select the DWORD (32-bit) Value option. Name it as BypassRAMCheck. Double-click it to change the value data to 1, and press OK.
  • Step 9: Right-click the empty space to select the DWORD (32-bit) Value option. Name it as BypassSecureBootCheck. Double-click it to change the value data to 1, and press OK.
1 Like

For Virtualbox, you don’t need to do all that as long as you have version 7 or higher of Virtualbox. All you need to do is tell Virtualbox that you’re installing Windows 11, and it adds the TPM and everything else that’s needed.

The directions you provided probably are necessary for versions of Virtualbox prior to 7. Unfortunately, the software package manager in Debian, Ubuntu, and Mint is way behind; so if you just install Virtualbox from the package manager, you get an older version that requires you to jump through all those hoops to install Windows 11. It’s better just to install Virtualbox 7 either manually or by adding a different software source, and then Windows 11 will install easily.