Comment 8 for bug 917245

Revision history for this message
wangpan (hzwangpan) wrote :

sorry for responsing so late.
I got the same result by using /dev/vdc after reattaching the volume.
but I try the same steps by using ‘virsh attach-disk&detach-disk’(as well as attach-device&detach-device), it gives me some error log like this:
root@114-113-199-9:/home/hzwangpan# virsh attach-disk 25 /home/hzwangpan/zero vdc
Disk attached successfully

root@114-113-199-9:/home/hzwangpan# virsh detach-disk 25 /home/hzwangpan/zero
Disk detached successfully

root@114-113-199-9:/home/hzwangpan# virsh attach-disk 25 /home/hzwangpan/zero vdc
error: Failed to attach disk
error: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk2' for device
but I can successfully attach the same disk(/home/hzwangpan/zero) to a device which is the first time be attached such as 'vdd'.
so I think this is a bug in libvirt or kvm.
the libvirt version of mine is:
root@114-113-199-9:/home/hzwangpan# virsh version
Compiled against library: libvir 0.9.11
Using library: libvir 0.9.11
Using API: QEMU 0.9.11
Running hypervisor: QEMU 1.0.0
kvm version info:
root@114-113-199-9:/home/hzwangpan# kvm -version
QEMU emulator version 1.0 (qemu-kvm-1.0+dfsg-11, Debian), Copyright (c) 2003-2008 Fabrice Bellard