** Description changed:

+ [ Impact ]
+ 
+  * virt-install cannot launch armv7l emulated guests, due to invalid tpm-tis 
validation
+  * leading to failures like this: "ERROR unsupported configuration: TPM model 
'tpm-tis' is only available for x86 and aarch64 guests"
+ 
+  * Upstream fixed this issue by dropping the explicit tpm-tis
+ architecture validation, as it is in-fact already supported on armv7l.
+ Instead, it's now just checking against the QEMU capabilities (i.e.
+ feature flags at runtime).
+ 
+ [ Test Plan ]
+ 
+ $ lxc launch --vm ubuntu-daily:jammy jj-tmptis-lp2077336-vm
+ 
+ # enable -proposed or PPA with fixes
+ root@jj-tmptis-lp2077336-vm:~# add-apt-repository ppa:sergiodj/libvirt
+ 
+ 
+ root@jj-tmptis-lp2077336-vm:~# apt update && apt install qemu qemu-kvm 
qemu-system-arm libvirt-clients libvirt-daemon-system virtinst bridge-utils
+ root@jj-tmptis-lp2077336-vm:~# wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
+ root@jj-tmptis-lp2077336-vm:~# chown libvirt-qemu:kvm 
oracular-server-cloudimg-armhf.img
+ root@jj-tmptis-lp2077336-vm:~# mv oracular-server-cloudimg-armhf.img ..
+ root@jj-tmptis-lp2077336-vm:~# virt-install -n oracular-arm 
--os-variant=generic --ram=512 --vcpus=4 --disk 
../oracular-server-cloudimg-armhf.img --import --graphics none --network 
bridge:virbr0 --arch=armv7l
+ [...]
+ 
+ # use "Ctrl + ]" to exit the console. The Oracular guest should boot the
+ system normally, NOT showing errors like:
+ 
+ - ERROR    unsupported configuration: TPM model 'tpm-tis' is only available 
for x86 and aarch64 guests
+ - ERROR internal error: Could not run '/usr/bin/swtpm_setup'. exitstatus: 1; 
Check error log '/var/log/swtpm/libvirt/qemu/oracular-arm-swtpm.log' for 
details.
+ 
+ While the capabilities should continue to show tpm-tis to be supported:
+ $ virsh domcapabilities --arch armv7l | grep tpm
+     <tpm supported='yes'>
+         <value>tpm-tis</value>
+     </tpm>
+ 
+ [ Where problems could occur ]
+ 
+  * this change modifies src/qemu/qemu_validate.c, dropping explicit TPM 
validation and using domcaps for dynamic TPM validation instead.
+  * this change modifies src/qemu/qemu_command.c, choosing the tpm-this-device 
model for non-x86 architectures (it was just on arm64 before)
+  * this change modifies tests/ to mock swtpm initialization for all qemu tests
+ 
+  * Should anything go wrong, we could see issues with TPM devices being
+ unsupported, especially on non-x86 architectures.
+ 
+ [ Other Info ]
+ 
+  * Upstream bug: https://gitlab.com/libvirt/libvirt/-/issues/329
+  * Upstream fix (+follow-up):
+    - https://gitlab.com/libvirt/libvirt/-/commit/5aec476e2e3
+    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf8fc42
+    - https://gitlab.com/libvirt/libvirt/-/commit/8b09303f247
+    - https://gitlab.com/libvirt/libvirt/-/commit/5f0765f90f8
+ 
+ --- original bug report ---
+ 
  I downloaded an armhf cloud image on jammy and tried to create a vm but
  I got an error saying that tpm-tis is not supported
  
  $ wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
  $ sudo virt-install -n oracular-arm  --os-variant=generic  --ram=4096  
--vcpus=4  --disk ./oracular-server-cloudimg-armhf.img --import --graphics none 
--network bridge:virbr0 --arch=armv7l
  WARNING  Using --osinfo generic, VM performance may suffer. Specify an 
accurate OS for optimal results.
  
  Starting install...
  ERROR    unsupported configuration: TPM model 'tpm-tis' is only available for 
x86 and aarch64 guests
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start oracular-arm
  otherwise, please restart your installation.
  
  But checking domcapabilities, it should be available
  
  georgia@georgia:~$ virsh domcapabilities --arch armv7l | grep tpm
      <tpm supported='yes'>
          <value>tpm-tis</value>
      </tpm>
  
  Unfortunately no other tpm model is listed, so I don't have a workaround
  for this.
  
  Relevant bugs:
  https://bugzilla.redhat.com/show_bug.cgi?id=2078995
  https://gitlab.com/libvirt/libvirt/-/issues/329

** Description changed:

  [ Impact ]
  
-  * virt-install cannot launch armv7l emulated guests, due to invalid tpm-tis 
validation
-  * leading to failures like this: "ERROR unsupported configuration: TPM model 
'tpm-tis' is only available for x86 and aarch64 guests"
+  * virt-install cannot launch armv7l emulated guests, due to invalid tpm-tis 
validation
+  * leading to failures like this: "ERROR unsupported configuration: TPM model 
'tpm-tis' is only available for x86 and aarch64 guests"
  
-  * Upstream fixed this issue by dropping the explicit tpm-tis
+  * Upstream fixed this issue by dropping the explicit tpm-tis
  architecture validation, as it is in-fact already supported on armv7l.
  Instead, it's now just checking against the QEMU capabilities (i.e.
  feature flags at runtime).
  
  [ Test Plan ]
  
  $ lxc launch --vm ubuntu-daily:jammy jj-tmptis-lp2077336-vm
  
  # enable -proposed or PPA with fixes
  root@jj-tmptis-lp2077336-vm:~# add-apt-repository ppa:sergiodj/libvirt
- 
  
  root@jj-tmptis-lp2077336-vm:~# apt update && apt install qemu qemu-kvm 
qemu-system-arm libvirt-clients libvirt-daemon-system virtinst bridge-utils
  root@jj-tmptis-lp2077336-vm:~# wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
  root@jj-tmptis-lp2077336-vm:~# chown libvirt-qemu:kvm 
oracular-server-cloudimg-armhf.img
  root@jj-tmptis-lp2077336-vm:~# mv oracular-server-cloudimg-armhf.img ..
  root@jj-tmptis-lp2077336-vm:~# virt-install -n oracular-arm 
--os-variant=generic --ram=512 --vcpus=4 --disk 
../oracular-server-cloudimg-armhf.img --import --graphics none --network 
bridge:virbr0 --arch=armv7l
  [...]
  
  # use "Ctrl + ]" to exit the console. The Oracular guest should boot the
  system normally, NOT showing errors like:
  
  - ERROR    unsupported configuration: TPM model 'tpm-tis' is only available 
for x86 and aarch64 guests
  - ERROR internal error: Could not run '/usr/bin/swtpm_setup'. exitstatus: 1; 
Check error log '/var/log/swtpm/libvirt/qemu/oracular-arm-swtpm.log' for 
details.
  
  While the capabilities should continue to show tpm-tis to be supported:
  $ virsh domcapabilities --arch armv7l | grep tpm
      <tpm supported='yes'>
          <value>tpm-tis</value>
      </tpm>
  
  [ Where problems could occur ]
  
-  * this change modifies src/qemu/qemu_validate.c, dropping explicit TPM 
validation and using domcaps for dynamic TPM validation instead.
-  * this change modifies src/qemu/qemu_command.c, choosing the tpm-this-device 
model for non-x86 architectures (it was just on arm64 before)
-  * this change modifies tests/ to mock swtpm initialization for all qemu tests
+  * this change modifies src/qemu/qemu_validate.c, dropping explicit TPM 
validation and using domcaps for dynamic TPM validation instead.
+  * this change modifies src/qemu/qemu_command.c, choosing the tpm-this-device 
model for non-x86 architectures (it was just on arm64 before)
+  * this change modifies tests/ to mock swtpm initialization for all qemu tests
  
-  * Should anything go wrong, we could see issues with TPM devices being
+  * Should anything go wrong, we could see issues with TPM devices being
  unsupported, especially on non-x86 architectures.
  
  [ Other Info ]
  
-  * Upstream bug: https://gitlab.com/libvirt/libvirt/-/issues/329
-  * Upstream fix (+follow-up):
-    - https://gitlab.com/libvirt/libvirt/-/commit/5aec476e2e3
-    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf8fc42
-    - https://gitlab.com/libvirt/libvirt/-/commit/8b09303f247
-    - https://gitlab.com/libvirt/libvirt/-/commit/5f0765f90f8
+  * Upstream bug: https://gitlab.com/libvirt/libvirt/-/issues/329
+  * Upstream fix (+follow-up):
+    - https://gitlab.com/libvirt/libvirt/-/commit/5aec476e2e3
+    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf8fc42
+    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf89dc5
+    - https://gitlab.com/libvirt/libvirt/-/commit/8b09303f247
+    - https://gitlab.com/libvirt/libvirt/-/commit/5f0765f90f8
  
  --- original bug report ---
  
  I downloaded an armhf cloud image on jammy and tried to create a vm but
  I got an error saying that tpm-tis is not supported
  
  $ wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
  $ sudo virt-install -n oracular-arm  --os-variant=generic  --ram=4096  
--vcpus=4  --disk ./oracular-server-cloudimg-armhf.img --import --graphics none 
--network bridge:virbr0 --arch=armv7l
  WARNING  Using --osinfo generic, VM performance may suffer. Specify an 
accurate OS for optimal results.
  
  Starting install...
  ERROR    unsupported configuration: TPM model 'tpm-tis' is only available for 
x86 and aarch64 guests
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start oracular-arm
  otherwise, please restart your installation.
  
  But checking domcapabilities, it should be available
  
  georgia@georgia:~$ virsh domcapabilities --arch armv7l | grep tpm
      <tpm supported='yes'>
          <value>tpm-tis</value>
      </tpm>
  
  Unfortunately no other tpm model is listed, so I don't have a workaround
  for this.
  
  Relevant bugs:
  https://bugzilla.redhat.com/show_bug.cgi?id=2078995
  https://gitlab.com/libvirt/libvirt/-/issues/329

** Description changed:

  [ Impact ]
  
   * virt-install cannot launch armv7l emulated guests, due to invalid tpm-tis 
validation
   * leading to failures like this: "ERROR unsupported configuration: TPM model 
'tpm-tis' is only available for x86 and aarch64 guests"
  
   * Upstream fixed this issue by dropping the explicit tpm-tis
  architecture validation, as it is in-fact already supported on armv7l.
  Instead, it's now just checking against the QEMU capabilities (i.e.
  feature flags at runtime).
  
  [ Test Plan ]
  
  $ lxc launch --vm ubuntu-daily:jammy jj-tmptis-lp2077336-vm
  
  # enable -proposed or PPA with fixes
  root@jj-tmptis-lp2077336-vm:~# add-apt-repository ppa:sergiodj/libvirt
  
  root@jj-tmptis-lp2077336-vm:~# apt update && apt install qemu qemu-kvm 
qemu-system-arm libvirt-clients libvirt-daemon-system virtinst bridge-utils
  root@jj-tmptis-lp2077336-vm:~# wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
  root@jj-tmptis-lp2077336-vm:~# chown libvirt-qemu:kvm 
oracular-server-cloudimg-armhf.img
  root@jj-tmptis-lp2077336-vm:~# mv oracular-server-cloudimg-armhf.img ..
  root@jj-tmptis-lp2077336-vm:~# virt-install -n oracular-arm 
--os-variant=generic --ram=512 --vcpus=4 --disk 
../oracular-server-cloudimg-armhf.img --import --graphics none --network 
bridge:virbr0 --arch=armv7l
  [...]
  
  # use "Ctrl + ]" to exit the console. The Oracular guest should boot the
  system normally, NOT showing errors like:
  
  - ERROR    unsupported configuration: TPM model 'tpm-tis' is only available 
for x86 and aarch64 guests
  - ERROR internal error: Could not run '/usr/bin/swtpm_setup'. exitstatus: 1; 
Check error log '/var/log/swtpm/libvirt/qemu/oracular-arm-swtpm.log' for 
details.
  
  While the capabilities should continue to show tpm-tis to be supported:
  $ virsh domcapabilities --arch armv7l | grep tpm
      <tpm supported='yes'>
          <value>tpm-tis</value>
      </tpm>
  
  [ Where problems could occur ]
  
   * this change modifies src/qemu/qemu_validate.c, dropping explicit TPM 
validation and using domcaps for dynamic TPM validation instead.
   * this change modifies src/qemu/qemu_command.c, choosing the tpm-this-device 
model for non-x86 architectures (it was just on arm64 before)
   * this change modifies tests/ to mock swtpm initialization for all qemu tests
  
   * Should anything go wrong, we could see issues with TPM devices being
  unsupported, especially on non-x86 architectures.
  
  [ Other Info ]
  
   * Upstream bug: https://gitlab.com/libvirt/libvirt/-/issues/329
   * Upstream fix (+follow-up):
     - https://gitlab.com/libvirt/libvirt/-/commit/5aec476e2e3
-    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf8fc42
-    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf89dc5
+    - https://gitlab.com/libvirt/libvirt/-/commit/b233bf89dc5
     - https://gitlab.com/libvirt/libvirt/-/commit/8b09303f247
     - https://gitlab.com/libvirt/libvirt/-/commit/5f0765f90f8
  
  --- original bug report ---
  
  I downloaded an armhf cloud image on jammy and tried to create a vm but
  I got an error saying that tpm-tis is not supported
  
  $ wget 
https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-armhf.img
  $ sudo virt-install -n oracular-arm  --os-variant=generic  --ram=4096  
--vcpus=4  --disk ./oracular-server-cloudimg-armhf.img --import --graphics none 
--network bridge:virbr0 --arch=armv7l
  WARNING  Using --osinfo generic, VM performance may suffer. Specify an 
accurate OS for optimal results.
  
  Starting install...
  ERROR    unsupported configuration: TPM model 'tpm-tis' is only available for 
x86 and aarch64 guests
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start oracular-arm
  otherwise, please restart your installation.
  
  But checking domcapabilities, it should be available
  
  georgia@georgia:~$ virsh domcapabilities --arch armv7l | grep tpm
      <tpm supported='yes'>
          <value>tpm-tis</value>
      </tpm>
  
  Unfortunately no other tpm model is listed, so I don't have a workaround
  for this.
  
  Relevant bugs:
  https://bugzilla.redhat.com/show_bug.cgi?id=2078995
  https://gitlab.com/libvirt/libvirt/-/issues/329

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2077336

Title:
  Creation of armv7l vm fails due to tpm-tis

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2077336/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to