Red Hat Bugzilla – Bug 771128
"Failed to build sexpr" when adding PCI passthrough device to Xen domain
Last modified: 2013-05-16 15:54:04 EDT
Description of problem:
I have been trying to pass through a PCI device (a USB hub) to a Xen domU. virt-manager gives this error when I try to do so.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create F16 domain using virsh-install
2. Open the F16 domain in virt-manager and click the Add Hardware button at the bottom of the window
3. Select a PCI USB hub and click the Finish button
An error dialog appears saying:
Error adding device: XML error: failed to build sexpr
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/addhardware.py", line 1048, in add_device
File "/usr/share/virt-manager/virtManager/domain.py", line 397, in add_device
File "/usr/share/virt-manager/virtManager/domain.py", line 326, in redefine_cached
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 147, in _redefine_xml
return self._redefine_helper(origxml, newxml)
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 137, in _redefine_helper
File "/usr/share/virt-manager/virtManager/domain.py", line 762, in _define
File "/usr/share/virt-manager/virtManager/connection.py", line 805, in define_domain
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2110, in defineXML
if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: XML error: failed to build sexpr
Robin, can you provide the virt-manager --debug output when reproducing?
No response for a while, closing. If anyone can still reproduce, please reopen with the info requested in comment #1
I'd like to reopen this. I'm having this problem currently on a RHEL 6.4 with xen installed. I ran virt-manager --debug, however there is no output on the command line. I've seeing the same error when using virsh to attempt to modify the vm.
Here ist he pci device dump:
virsh # nodedev-dumpxml pci_0000_06_00_0
<product id='0x0dd8'>GF106GL [Quadro 2000]</product>
<vendor id='0x10de'>NVIDIA Corporation</vendor>
Here is what I'm trying to add to the configuration:
<hostdev mode='subsystem' type='pci' managed='yes'>
<address domain='0x0000' bus='0x02' slot='0x00' function='0x0' />
And here is the result when I try to save:
error: XML error: failed to build sexpr
Failed. Try again? [y,n,f,?]:
I'm not sure how to re-open this ticket. Can you do that for me?
That error message is very general, and there have been several releases of libvirt since the version in this BZ (which is filed against F16 / libvirt-0.9.6). I would recommend opening a new BZ, then post about it to firstname.lastname@example.org to make sure that somebody who works on the xen part of libvirt sees it. Almost all libvirt developers working on Fedora are using qemu instead.