<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-unicode">Hey guys,
<br>
<br>
I am currently running into a reproducible libvirt bug when I
detach a disk from a running VM using libvirt 1.2.18 and qemu
2.3.0.
<br>
<br>
I can attach a disk to a running VM without any problems.
<br>
During the attach operation I don't create a disk alias name,
which results in libvirt generating an unique alias.
<br>
Using virsh dumpxml I get the following output(snippet):
<br>
<br>
<disk type='file' device='disk'>
<br>
<driver name='qemu' type='raw' cache='none'/>
<br>
<source
file='/var/local/mnt/test-storage/test-storage.raw'/>
<br>
<backingStore/>
<br>
<target dev='vde' bus='virtio'/>
<br>
<iotune>
<br>
<read_bytes_sec>94371840</read_bytes_sec>
<br>
<write_bytes_sec>31457280</write_bytes_sec>
<br>
<read_iops_sec>1000</read_iops_sec>
<br>
<write_iops_sec>200</write_iops_sec>
<br>
</iotune>
<br>
<alias name='virtio-disk4'/>
<br>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x09' function='0x0'/>
<br>
</disk>
<br>
<br>
As you can see, libvirt generates 'virtio-disk4' as an alias. But
as soon as I try to detach the disk from the running VM, I will
receive the following two errors in my libvirt log:
<br>
<br>
2015-08-06 10:48:59.943+0000: 11657: warning :
qemuMonitorJSONHandleDeviceDeleted:939 : missing device in device
deleted event
<br>
2015-08-06 10:48:59.945+0000: 11662: error :
qemuMonitorTextDriveDel:2594 : operation failed: deleting
drive-virtio-disk4 drive failed: 2015-08-06T10:48:59.945058Z
Device 'drive-virtio-disk4' not found
<br>
<br>
Apparently libvirt tries to detach the disk with a drive- prefix,
which doesn't exist? The drive seems to detach correctly though.
<br>
<br>
I hope somebody with more extensive knowledge about libvirt can
help me solve this issue. If more information is needed, feel free
to contact me.
<br>
<br>
Thanks,
<br>
Frank
<br>
<br>
</div>
</body>
</html>