I tested this on 9.04 and got:
(jaunty)$ virsh attach-device testqemu /tmp/sdc.xml
Connecting to uri: qemu:///system
Device attached successfully
(jaunty)$ virsh attach-device testqemu /tmp/sdc.xml
Connecting to uri: qemu:///system
error: Failed to attach device from /tmp/sdc.xml
error: operation failed: target vda already exists
I also used the following xml, where /dev/sdc is a usb stick rather than an AoE device:
<disk type='block'>
<driver name='virtio'/>
<source dev='/dev/sdc'/>
<target dev='vda' bus='virtio'/>
</disk>
I then tried this on karmic with the same results as before (ie, it segfaults):
$ virsh attach-device sec-karmic-amd64 /tmp/sdc.xml
Connecting to uri: qemu:///system
Device attached successfully
$ virsh attach-device sec-karmic-amd64 /tmp/sdc.xml
Connecting to uri: qemu:///system
error: Failed to attach device from /tmp/sdc.xml
error: server closed connection
$ dmesg|tail -1
[71676.786697] libvirtd[5018]: segfault at 70 ip 00000000004345f2 sp 00007f3d833ddb70 error 4 in libvirtd[400000+77000]
I tested this on 9.04 and got:
(jaunty)$ virsh attach-device testqemu /tmp/sdc.xml
Connecting to uri: qemu:///system
Device attached successfully
(jaunty)$ virsh attach-device testqemu /tmp/sdc.xml
Connecting to uri: qemu:///system
error: Failed to attach device from /tmp/sdc.xml
error: operation failed: target vda already exists
I also used the following xml, where /dev/sdc is a usb stick rather than an AoE device:
<disk type='block'>
<driver name='virtio'/>
<source dev='/dev/sdc'/>
<target dev='vda' bus='virtio'/>
</disk>
I then tried this on karmic with the same results as before (ie, it segfaults):
$ virsh attach-device sec-karmic-amd64 /tmp/sdc.xml
Connecting to uri: qemu:///system
Device attached successfully
$ virsh attach-device sec-karmic-amd64 /tmp/sdc.xml
Connecting to uri: qemu:///system
error: Failed to attach device from /tmp/sdc.xml
error: server closed connection
$ dmesg|tail -1 400000+ 77000]
[71676.786697] libvirtd[5018]: segfault at 70 ip 00000000004345f2 sp 00007f3d833ddb70 error 4 in libvirtd[