Ubuntu (and its derivatives e.k Kubuntu) etc 20.04 LTS -- ppas to add for Swtpm ( the IBM TPM emulator)


jimbo45

Well-known member
Pro User
VIP
Local time
3:15 AM
Posts
4,704
Location
Hafnarfjörður IS
Visit site
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks
Those using Ubuntu (20.04 LTS) and all its derivatives e.g Kubuntu (KDE desktop GUI) and you want to install the IBM emulated TPM v2 emulator for use on Windows 11 VM's (works whether you have a physical TPM or not) with KVM/QEMU
add either of these repositories in the Linux (Host) command line

1) sudo add-apt-repository ppa:smoser/swtpm
sudo apt-get update
sudo apt-get install swtpm swtpm-tools

or 2) sudo add-apt-repository ppa:itrue/swtpm
sudo apt-get update
sudo apt-get install swtpm

You don't need to do any config or start any services /daemons.

Note also to create the VM's with UEFI and sec boot on KVM/QEMU ensure package ovmf is installed.

Hope this save those creating Windows 11 VM's with emulated TPM's on Linux hosts a lot of time googling and trying all sorts of wrong solutions.

I tried these on both ubuntu server lts 20.04 and kubuntu lts 20.04. kubuntu is official ubuntu (also from canonical) with kde gui installed -- a lot easier than installing the whole kybosh on ubuntu server (which works but installs a zillion other packages which you probably don't want. Kubuntu installs a minimal KDE desktop which is just fine for using the GUI virtual machine manager.

In the process of making clear step by step instructions for those who want to "have a go" with minimal knowlege required. However those with more knowledge who want to start creating the VM's straight away on their systems I've posted the details in this thread of the ppa's you need.

Running here on kubuntu lts 20.04 Guest W11 Pro GB Eng version


2022-03-29_14-43.png
2022-03-29_14-44.png


Those who want more info about Ubuntu ppa's on swtpm, what they contain and status of packages can follow this link : (or use the drop down to look for other software in ppa's)..


always check as some ppa's have got incorrect packages !!!!! so take care.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Hi folks
Those using Ubuntu (20.04 LTS) and all its derivatives e.g Kubuntu (KDE desktop GUI) and you want to install the IBM emulated TPM v2 emulator for use on Windows 11 VM's (works whether you have a physical TPM or not) with KVM/QEMU
add either of these repositories in the Linux (Host) command line

1) sudo add-apt-repository ppa:smoser/swtpm
sudo apt-get update
sudo apt-get install swtpm swtpm-tools

or 2) sudo add-apt-repository ppa:itrue/swtpm
sudo apt-get update
sudo apt-get install swtpm

You don't need to do any config or start any services /daemons.

Note also to create the VM's with UEFI and sec boot on KVM/QEMU ensure package ovmf is installed.

Hope this save those creating Windows 11 VM's with emulated TPM's on Linux hosts a lot of time googling and trying all sorts of wrong solutions.

I tried these on both ubuntu server lts 20.04 and kubuntu lts 20.04. kubuntu is official ubuntu (also from canonical) with kde gui installed -- a lot easier than installing the whole kybosh on ubuntu server (which works but installs a zillion other packages which you probably don't want. Kubuntu installs a minimal KDE desktop which is just fine for using the GUI virtual machine manager.

In the process of making clear step by step instructions for those who want to "have a go" with minimal knowlege required. However those with more knowledge who want to start creating the VM's straight away on their systems I've posted the details in this thread of the ppa's you need.

Running here on kubuntu lts 20.04 Guest W11 Pro GB Eng version


View attachment 25672
View attachment 25673


Those who want more info about Ubuntu ppa's on swtpm, what they contain and status of packages can follow this link : (or use the drop down to look for other software in ppa's)..


always check as some ppa's have got incorrect packages !!!!! so take care.

Cheers
jimbo
I have tried to install the swtpm ppa - pc just sits there and evetually does something, then asks you to press enter and after a short period bombs out with error message about a key.

Neither option worked I am afraid.


Edit 1 - found solution to hanging
1648593560233.png


Edit 2 - falling over with error message at last hurdle

1648593476861.png

no log file.

1648594027609.png

1648593646032.png

1648593703644.png
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Pro + Win11 Canary VM.
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Zenbook 14
    CPU
    I9 13th gen i9-13900H 2.60 GHZ
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB soldered
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    laptop OLED screen
    Screen Resolution
    2880x1800 touchscreen
    Hard Drives
    1 TB NVME SSD (only weakness is only one slot)
    PSU
    Internal + 65W thunderbolt USB4 charger
    Case
    Yep, got one
    Cooling
    Stella Artois (UK pint cans - 568 ml) - extra cost.
    Keyboard
    Built in UK keybd
    Mouse
    Bluetooth , wireless dongled, wired
    Internet Speed
    900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

    Macrium Reflect Home V8
    Office 365 Family (6 users each 1TB onedrive space)
    Hyper-V (a vm runs almost as fast as my older laptop)
I have tried to install the swtpm ppa - pc just sits there and evetually does something, then asks you to press enter and after a short period bombs out with error message about a key.

Neither option worked I am afraid.


Edit 1 - found solution to hanging
View attachment 25724


Edit 2 - falling over with error message at last hurdle

View attachment 25723

no log file.

View attachment 25727

View attachment 25725

View attachment 25726
Hi there
If you've already added or attempted to add the swtpm previously from different sources then it will get hosed up -- I'm busy doing a "From scratch" test and will post it later with screen shots of the processes.

I initially got the TPM error message on the VM when starting - because I'd installed or attempted to install a wrong TPM version. So I started everything from scratch again.

If the system is trying to run the swtpm setup then there's another error as it shouldn't be doing that.

Anyway I'll go again from scratch -- but will use KUBUNTU for the first pass through as it's easier to create the VM via a GUI with virtual machine manager. (KUBUNTU is an official UBUNTU release - same ppa's etc and endorsed by Canonical so "Not cheating"

cheers
jimbo
 

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Hi there
If you've already added or attempted to add the swtpm previously from different sources then it will get hosed up -- I'm busy doing a "From scratch" test and will post it later with screen shots of the processes.

I initially got the TPM error message on the VM when starting - because I'd installed or attempted to install a wrong TPM version. So I started everything from scratch again.

If the system is trying to run the swtpm setup then there's another error as it shouldn't be doing that.

Anyway I'll go again from scratch -- but will use KUBUNTU for the first pass through as it's easier to create the VM via a GUI with virtual machine manager. (KUBUNTU is an official UBUNTU release - same ppa's etc and endorsed by Canonical so "Not cheating"

cheers
jimbo
Just started over on a cleane UB 20.04 and installed swtpm from second link, then installed qemu, started to create a vm and it crapped out as before.

This is why Linux will never take over as things keep changing too much e.g. I followed my normal method of adding enhanced mode to Ubuntu, and it kept falling over at wget step.

It took me ages to realise the line "Download the updated script....." was to be used INSTEAD of wget!

It does not help at all if people make an error in updating documentation, and worse not changing the old screen.


1648666129027.png

I only found the trick to install the ppas after lots of googling.

Thought I had nailed it, then that error message about swtpm setup.

At this point, I give up.

Of course, it easy to bypass swtpm to install Windows 11 on QEMU but that as not my objective - I just wanted to install it the "official" way to prove I could.
 

My Computer

System One

  • OS
    Windows 11 Pro + Win11 Canary VM.
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Zenbook 14
    CPU
    I9 13th gen i9-13900H 2.60 GHZ
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB soldered
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    laptop OLED screen
    Screen Resolution
    2880x1800 touchscreen
    Hard Drives
    1 TB NVME SSD (only weakness is only one slot)
    PSU
    Internal + 65W thunderbolt USB4 charger
    Case
    Yep, got one
    Cooling
    Stella Artois (UK pint cans - 568 ml) - extra cost.
    Keyboard
    Built in UK keybd
    Mouse
    Bluetooth , wireless dongled, wired
    Internet Speed
    900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

    Macrium Reflect Home V8
    Office 365 Family (6 users each 1TB onedrive space)
    Hyper-V (a vm runs almost as fast as my older laptop)
Hi there

@cereberus

Not sure why I got it working -- I didn't use that script

Anyway I'm trying again on a totally clean disk - totally wiped with a freshly downloaded 20.04 Ubuntu LTS server. It;s worked before for me so I know it works - it certainly does on Arch Linux as that's my "Daily OS" but that is probably harder for people to install.

I agree about the documentation -- however incorrect documentation isn't only a problem on Linux. I've seen errors is Pilot's checklists etc, Ms Windows and in all sorts of areas where it shouldn't be. I've also seen loads of useless documentation als by huge companies -- e.g SAP where the documentation is usually factually correct but tells you absolutely nothing at all.

I'm determined to get "repeatable" consistent installs of this to display as a tutorial. As W11 is becoming more mainstream I agree things like TPM whether emulated or not should be better supported --there are literally millions of Windows installations running as Virtual machines.


The Linux OS of being able to take over isn't the point - Windows is and will remain perfectly suitable for the vast majority of computer users world wide unless Ms is stupid enough to make it go totally subscription, raises the price to unaffordable amounts (currently there's still a load of ways of getting free upgrades -100% legally) or starts updating the hardware requirements so much that people are forced to discard perfectly good machines.

When testing and then passing out methodology to others -- Before I'm satisfied I need to replicate identical procedures 3 times with the same result otherwise for me it's fail,

So I'm continuing to press on with ubuntu server as I've definitely had it working.

I saw some documentation about swtpm needs some tss user ?? and on ubuntu there seems to be a package called trousers which also seems to hose things up as I think that was written for TPM 1.2

So nothing workwise to do today - so I'll have some more time for this.

Cheers
jimbo
 

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Back
Top