On 7/30/19 10:40 PM, vincent(a)cojot.name wrote:
Does anyone have any idea what's going on or what I may be doing wrong?
I don't think it is you doing something wrong. The way shutdown works is
that libvirt tells qemu to shut down (or in case of guest initiated
shutdown it is guest OS who says that), and then qemu starts flushing
its own internal caches (note that these are on the top of host kernel
FS caches). And once done, qemu sends libvirt an event to which libvirt
reacts by killing the process.
However, if there is a bug in qemu so that the event is sent before all
cahces were flushed it may lead to disk corruption. This also
corresponds to your experience where cache='none' makes the bug go away
because in that case qemu doesn't add any of its caches into the picture
and thus no disk corruption is possible.
Unfortunatelly, I don't know enough about qemu to suggest where the bug
might be, sorry.
Michal