Bug 1169183
Summary: | improve error messages when use attach-device add tpm or panic device to a guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.1 | CC: | dyuan, ealvarez, mzhan, rbalakri |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:56:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Luyao Huang
2014-12-01 01:19:32 UTC
Fixed upstream by commits v1.2.10-219-gbfeee8d, v1.2.10-220-g03caa54 and v1.2.10-222-g934c388: commit bfeee8dee4aebdaeeadfc30aede6c81ab54094e6 Author: Martin Kletzander <mkletzan> Date: Sun Nov 30 20:54:50 2014 +0100 conf: Add device-related code for TPM devices commit 03caa543c236d47fe93fd5dba4d1ea1539649719 Author: Martin Kletzander <mkletzan> Date: Sun Nov 30 20:54:50 2014 +0100 conf: Add device-related code for panic devices commit 934c38878964a63e61372dafb07bb67c5031bf10 Author: Martin Kletzander <mkletzan> Date: Mon Dec 1 13:19:55 2014 +0100 conf: Don't redefine virDomainTPMDefPtr I can produce this bug with build libvirt-1.2.8-9.el7.x86_64 and verify it with build libvirt-1.2.14-1.el7.x86_64 1. prepare a healthy guest without tpm and panic device 2. # cat /tmp/panic.xml <panic> <address type='isa' iobase='0x505'/> </panic> 3. try to do hot-plug for panic device # virsh attach-device rl /tmp/panic.xml error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device rl /tmp/panic.xml --config error: Failed to attach device from /tmp/panic.xml error: Operation not supported: persistent attach of device 'panic' is not supported # virsh attach-device rl /tmp/panic.xml --live error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device rl /tmp/panic.xml --current error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device rl /tmp/panic.xml --persistent error: Failed to attach device from /tmp/panic.xml error: Operation not supported: persistent attach of device 'panic' is not supported 4. # cat /tmp/tpm.xml <tpm model='tpm-tis'> <backend type='passthrough'> <device path='/dev/tpm0'/> </backend> </tpm> 5. try to do hot-plug for tpm device # virsh attach-device rl /tmp/tpm.xml error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device rl /tmp/tpm.xml --live error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device rl /tmp/tpm.xml --current error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device rl /tmp/tpm.xml --config error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: persistent attach of device 'tpm' is not supported # virsh attach-device rl /tmp/tpm.xml --persistent error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: persistent attach of device 'tpm' is not supported 6. prepare a guest with panic device, start it 7. try to do hot-unplug for panic device # virsh detach-device rl /tmp/panic.xml error: Failed to detach device from /tmp/panic.xml error: Operation not supported: live detach of device 'panic' is not supported 8. due to qemu not support tpm, so start guest failed with tpm, and can not do detach-device for it # virsh start rl error: Failed to start domain rl error: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough verify this with build libvirt-1.2.15-2.el7.x86_64 Steps: 1. prepare a healthy guest without tpm and panic device 2. # cat /tmp/panic.xml <panic> <address type='isa' iobase='0x505'/> </panic> # cat /tmp/tpm.xml <tpm model='tpm-tis'> <backend type='passthrough'> <device path='/dev/tpm0'/> </backend> </tpm> 3. try to do hot-plug for panic device # virsh attach-device vm2 /tmp/panic.xml error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device vm2 /tmp/panic.xml --config error: Failed to attach device from /tmp/panic.xml error: Operation not supported: persistent attach of device 'panic' is not supported # virsh attach-device vm2 /tmp/panic.xml --live error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device vm2 /tmp/panic.xml --current error: Failed to attach device from /tmp/panic.xml error: Operation not supported: live attach of device 'panic' is not supported # virsh attach-device vm2 /tmp/panic.xml --persistent error: Failed to attach device from /tmp/panic.xml error: Operation not supported: persistent attach of device 'panic' is not supported 4. edit XML to add panic, and try to hot-unplug panic device # virsh detach-device vm2 /tmp/panic.xml error: Failed to detach device from /tmp/panic.xml error: Operation not supported: live detach of device 'panic' is not supported # virsh detach-device vm2 /tmp/panic.xml --live error: Failed to detach device from /tmp/panic.xml error: Operation not supported: live detach of device 'panic' is not supported # virsh detach-device vm2 /tmp/panic.xml --config error: Failed to detach device from /tmp/panic.xml error: Operation not supported: persistent detach of device 'panic' is not supported # virsh detach-device vm2 /tmp/panic.xml --persistnet error: command 'detach-device' doesn't support option --persistnet # virsh detach-device vm2 /tmp/panic.xml --persistent error: Failed to detach device from /tmp/panic.xml error: Operation not supported: persistent detach of device 'panic' is not supported 5. try to hot-plug tpm device # virsh attach-device vm2 /tmp/tpm.xml error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device vm2 /tmp/tpm.xml --live error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device vm2 /tmp/tpm.xml --current error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: live attach of device 'tpm' is not supported # virsh attach-device vm2 /tmp/tpm.xml --config error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: persistent attach of device 'tpm' is not supported # virsh attach-device vm2 /tmp/tpm.xml --persistent error: Failed to attach device from /tmp/tpm.xml error: Operation not supported: persistent attach of device 'tpm' is not supported 6. config tpm device to XML, guest start failed, so hot-unplug can not be performed for guest # virsh start vm2 error: Failed to start domain vm2 error: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough move to verified reset hot-unplug tpm with --config # virsh detach-device vm1 /tmp/tpm.xml --config error: Failed to detach device from /tmp/tpm.xml error: Operation not supported: persistent detach of device 'tpm' is not supported verify this bug This error still persist in RHEL 7.1 Client and Workstation (and maybe Server): [root@wxm4800 ~]# rpmquery libvirt libvirt-1.2.8-16.el7_1.4.x86_64 [root@wxm4800 ~]# virsh attach-device win7 /tmp/tpm.xml error: Failed to attach device from /tmp/tpm.xml error: unsupported configuration: unknown device type 'devices' [root@wxm4800 ~]# virsh attach-device win7 /tmp/tpm.xml --live error: Failed to attach device from /tmp/tpm.xml error: unsupported configuration: unknown device type 'devices' [root@wxm4800 ~]# virsh attach-device win7 /tmp/tpm.xml --current error: Failed to attach device from /tmp/tpm.xml error: unsupported configuration: unknown device type 'devices' [root@wxm4800 ~]# virsh attach-device win7 /tmp/tpm.xml --config error: Failed to attach device from /tmp/tpm.xml error: unsupported configuration: unknown device type 'devices' Details using virt-manager: Error starting domain: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/domain.py", line 1393, in startup self._backend.create() File "/usr/lib64/python2.7/site-packages/libvirt.py", line 966, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough I'm not sure but perhaps this has to be with the kernel in rhel 7.1 doesn't come with the tpm-tis as module in the kernel, it seems the tpm is hardcoded in the kernel: [root@wxm4800 ~]# uname -a Linux wxm4800 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Aug 25 11:21:22 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux [root@wxm4800 ~]# ls /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/drivers/char/tpm/ tpm_atmel.ko tpm_infineon.ko tpm_nsc.ko[root@wxm4800 ~]# lsmod | grep tpm [root@wxm4800 ~]# [root@wxm4800 ~]# lsmod | grep tpm [root@wxm4800 ~]# [root@wxm4800 ~]# cat /sys/class/misc/tpm0/device/resources state = active mem 0xfed40000-0xfed44fff [root@wxm4800 ~]# Needed tpm urgently! Exist a way for me to help to solve this soon? Is like almost 1 year from the first report! (In reply to Eduardo Alvarez from comment #8) As you can see, this problem was filed for 7.1 (see "Version") and fixed in libvirt-1.2.13-1.el7 (see "Fixed In Version"). Anyway, what you are describing is not relevant to this bug at all. This bug is about wording of the message that gets printed out. What you are experiencing are bunch of different problems: 1) The XML in /tmp/tpm.xml is wrong, according to the error message, there should be no "devices" device type. 2) The QEMU you have installed doesn't support TPM device with passthrough backend. Maybe it doesn't even support TPM. It's just a different wording of the error message you posted. Anyway, the problem is that you are using QEMU that is too old. Please don't add irrelevant information into this bug so it doesn't confuse anyone else. If you need further help with this issue, please follow up with your support contact. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |