<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>47442</bug_id>
          
          <creation_ts>2023-09-01 23:20:58 +0300</creation_ts>
          <short_desc>После добавления модуля TPM 2.0 (TIS) виртуальная машина не запускается</short_desc>
          <delta_ts>2025-07-01 15:06:29 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libvirt-daemon</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>altchemist</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>altchemist</cc>
    
    <cc>amakeenk</cc>
    
    <cc>monastirskiyii</cc>
    
    <cc>rx1513</cc>
    
    <cc>shaba</cc>
    
    <cc>varaksaaa</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>232400</commentid>
    <comment_count>0</comment_count>
    <who name="">altchemist</who>
    <bug_when>2023-09-01 23:20:58 +0300</bug_when>
    <thetext>Использую рабочую станцию 10.1 c kvm и qemu. Без модуля TPM виртуальная машина запускается успешно (пользуюсь графическим интерфейсом virt-manager).
Если же в virt-manager нажать Add Hardware (добавить виртуальное оборудование) и выбрать TPM (модель TIS, версия 2.0), то модуль добавляется, но с ним виртуалка не запускается:

Error starting domain: Unable to find &apos;swtpm&apos; binary in $PATH: No such file or directory

Временное решение проблемы такое: доустановить пакеты 

# apt-get install swtpm swtpm-tools libswtpm

затем в конфиге /etc/libvirt/qemu.conf написать

user = &quot;root&quot;
group = &quot;root&quot;
swtpm_user = &quot;root&quot;
swtpm_group = &quot;root&quot;

и перезагрузить демона libvirtd

# systemctl restart libvirtd

После этого виртуальная машина запускается с модулем TPM. Но хотелось бы иметь работоспособность &quot;из коробки&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232550</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-09-05 10:51:08 +0300</bug_when>
    <thetext>Воспроизводится в сизифе.
Без установки пакетов swtpm swtpm-tools libswtpm даже не удаётся добавить TPM, возникает ошибка вида:
libvirtd[31844]: конфигурация не поддерживается: TPM version &apos;2.0&apos; is not supported</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>232575</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-09-05 17:17:48 +0300</bug_when>
    <thetext>libvirt-9.6.0-alt2 -&gt; sisyphus:

 Tue Sep 05 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.6.0-alt2
 - Update Requires, add R:swtpm-tools to daemon-driver-qemu (ALT#47442)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235134</commentid>
    <comment_count>3</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2023-10-18 12:10:14 +0300</bug_when>
    <thetext>Теперь добавление модуля работает, но ВМ всё равно не запускается, с другой ошибкой:
        
&gt; Ошибка запуска домена: ошибка операции: swtpm died and reported: 
&gt; 
&gt; Traceback (most recent call last):
&gt;   File &quot;/usr/share/virt-manager/virtManager/asyncjob.py&quot;, line 72, in cb_wrapper
&gt;     callback(asyncjob, *args, **kwargs)
&gt;   File &quot;/usr/share/virt-manager/virtManager/asyncjob.py&quot;, line 108, in tmpcb
&gt;     callback(*args, **kwargs)
&gt;   File &quot;/usr/share/virt-manager/virtManager/object/libvirtobject.py&quot;, line 57, in newfn
&gt;     ret = fn(self, *args, **kwargs)
&gt;           ^^^^^^^^^^^^^^^^^^^^^^^^^
&gt;   File &quot;/usr/share/virt-manager/virtManager/object/domain.py&quot;, line 1402, in startup
&gt;     self._backend.create()
&gt;   File &quot;/usr/lib64/python3/site-packages/libvirt.py&quot;, line 1373, in create
&gt;     raise libvirtError(&apos;virDomainCreate() failed&apos;)
&gt; libvirt.libvirtError: ошибка операции: swtpm died and reported: 
        
(что reported - не указано)

Помогает следующее:
        
&gt; затем в конфиге /etc/libvirt/qemu.conf написать
&gt; 
&gt; user = &quot;root&quot;
&gt; group = &quot;root&quot;
&gt; swtpm_user = &quot;root&quot;
&gt; swtpm_group = &quot;root&quot;
&gt; 
&gt; и перезагрузить демона libvirtd
&gt; 
&gt; # systemctl restart libvirtd
        
Проверялось на:

server-10.1-x86-64
[p10] libvirt-9.7.0-alt2.x86_64
[sisyphus] libvirt-9.7.0-alt2.x86_64</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235156</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Shabalin">shaba</who>
    <bug_when>2023-10-18 19:48:12 +0300</bug_when>
    <thetext>Разобрался.
Для быстрого решения можно удалить /lib/tmpfiles.d/libvirtd.conf и перезагрузиться.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235618</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-10-25 18:48:36 +0300</bug_when>
    <thetext>libvirt-9.7.0-alt2 -&gt; c10f2:

 Wed Sep 06 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.7.0-alt2
 - Add patch for vitastor support.
 Tue Sep 05 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.7.0-alt1
 - 9.7.0
 Tue Sep 05 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.6.0-alt2
 - Update Requires, add R:swtpm-tools to daemon-driver-qemu (ALT#47442)
 Wed Aug 30 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.6.0-alt1
 - 9.6.0 (Fixes: CVE-2023-3750)
 - Disabled support glusterfs for 32-bit arches and riscv64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235702</commentid>
    <comment_count>6</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2023-10-26 10:39:39 +0300</bug_when>
    <thetext>Согласно https://bugzilla.altlinux.org/show_bug.cgi?id=47442#c3, воспроизводится в libvirt-9.7.0-alt2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>236189</commentid>
    <comment_count>7</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-11-01 18:10:41 +0300</bug_when>
    <thetext>libvirt-9.7.0-alt2 -&gt; c10f1:

 Wed Sep 06 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.7.0-alt2
 - Add patch for vitastor support.
 Tue Sep 05 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.7.0-alt1
 - 9.7.0
 Tue Sep 05 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.6.0-alt2
 - Update Requires, add R:swtpm-tools to daemon-driver-qemu (ALT#47442)
 Wed Aug 30 2023 Alexey Shabalin &lt;shaba@altlinux&gt; 9.6.0-alt1
 - 9.6.0 (Fixes: CVE-2023-3750)
 - Disabled support glusterfs for 32-bit arches and riscv64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>236190</commentid>
    <comment_count>8</comment_count>
    <who name="Artem Varaksa">varaksaaa</who>
    <bug_when>2023-11-01 18:11:42 +0300</bug_when>
    <thetext>https://bugzilla.altlinux.org/show_bug.cgi?id=47442#c6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>259375</commentid>
    <comment_count>9</comment_count>
    <who name="Монастырский Илья">monastirskiyii</who>
    <bug_when>2025-02-16 20:09:11 +0300</bug_when>
    <thetext>Актуально для образа Alt Server 10.4 RC4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>268174</commentid>
    <comment_count>10</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2025-07-01 15:06:29 +0300</bug_when>
    <thetext>Проверил в р11 на версии 10.7.0-alt1 - не воспроизводится. Виртуальная машина запускается успешно.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>