[libvirt] Checking the expected behavior on dynamic image file ownership when live migrating

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon Jul 1 15:26:45 UTC 2019


Hi,
today I was debugging an issue that I found with qemu 4.0 and ended up
puzzled about file ownership. I'm almost EOD now, but wanted to reach
out here for a sanity check before I debug further. The case
sumamrized is this:

1. start guest
  1.1 image files are changed to libvirt-qemu:kvm (which matches
Ubuntus user/group config)
2. live migrate the guest to a different node
  2.1 image files go back to root:root which they initially had (ok)
3. migrate guest back to the original node
  x. image files stay root:root and are not changed back to libvirt-qemu:kvm

That is odd/unexpected, but it seems the same applies to older
versions and there it was never a problem so far.
In my case I stumbled over it because the newer qemu --copy-storage-*
options now want to re-open the file at some point and that fails
with:
error: internal error: unable to execute QEMU command 'drive-mirror':
Could not reopen file: Permission denied

If I e.g. shut down and start the guest on the source node (which
fixes up the ownership at runtime) then migration with copy-storage
works fine again.

I'm mostly looking for hints if this is a known issue or being worked
on to not waste time tomorrow.
So hints are welcome.

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd




More information about the libvir-list mailing list