diff -Nru libvirt-1.3.1/debian/changelog libvirt-1.3.1/debian/changelog --- libvirt-1.3.1/debian/changelog 2016-12-01 07:46:49.000000000 +0000 +++ libvirt-1.3.1/debian/changelog 2017-01-18 18:35:25.000000000 +0000 @@ -1,3 +1,11 @@ +libvirt (1.3.1-1ubuntu10.7) xenial; urgency=medium + + [ Mauricio Faria de Oliveira ] + * Use a fixed uid/gid for libvirt-qemu user to avoid permission + issues on network filesystems like NFS (backport) (LP: #1637601). + + -- Christian Ehrhardt Wed, 18 Jan 2017 16:15:34 +0100 + libvirt (1.3.1-1ubuntu10.6) xenial; urgency=medium * d/apparmor/usr.lib.libvirt.virt-aa-helper: add missing rules for name diff -Nru libvirt-1.3.1/debian/libvirt-bin.NEWS libvirt-1.3.1/debian/libvirt-bin.NEWS --- libvirt-1.3.1/debian/libvirt-bin.NEWS 2016-12-01 07:46:49.000000000 +0000 +++ libvirt-1.3.1/debian/libvirt-bin.NEWS 2017-01-18 15:15:19.000000000 +0000 @@ -1,3 +1,25 @@ +libvirt (1.3.1-1ubuntu10.7) unstable; urgency=medium + + libvirt-daemon-system now uses the allocated uid and gid 64055 + for the libvirt-qemu user and group on new installations, when + the uid/gid is available (Xenial: debconf warning isn't shown). + + On existing installations, which have different uid/gid values + assigned, the recommended procedure is to reassign the uid/gid + (might require considerations for ownership/permission changes). + No debconf warning is shown in this case; only this NEWS entry. + + This change is in order to prevent I/O errors during migration + of guests with disk image files shared over NFS, caused by the + different uid/gid ownership between the source and destination + host systems, which leads to access/permission errors with NFS. + + If guest migration over NFS is not a requirement in the system, + there should not be any impact to the guests for not using the + allocated uid/gid. + + -- Mauricio Faria de Oliveira Thu, 18 Nov 2016 13:56:38 -0200 + libvirt (1.2.9~rc1-1) experimental; urgency=medium libvirtd now uses PolicyKit instead of unix socket domain permissions for r/w diff -Nru libvirt-1.3.1/debian/libvirt-bin.postinst libvirt-1.3.1/debian/libvirt-bin.postinst --- libvirt-1.3.1/debian/libvirt-bin.postinst 2016-12-01 07:46:49.000000000 +0000 +++ libvirt-1.3.1/debian/libvirt-bin.postinst 2017-01-18 15:14:34.000000000 +0000 @@ -17,6 +17,10 @@ # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package +# Allocated UID and GID for libvirt-qemu +LIBVIRT_QEMU_UID=64055 +LIBVIRT_QEMU_GID=64055 # not used in Xenial. + add_users_groups() { if ! getent group libvirtd >/dev/null; then @@ -39,6 +43,13 @@ addgroup --quiet --system kvm fi if ! getent passwd libvirt-qemu >/dev/null; then + + # set uid if available (expected); don't fail otherwise. + PARAMETER_UID='' + if ! getent passwd $LIBVIRT_QEMU_UID >/dev/null; then + PARAMETER_UID="--uid $LIBVIRT_QEMU_UID" + fi + adduser --quiet \ --system \ --ingroup kvm \ @@ -48,6 +59,7 @@ --home /var/lib/libvirt \ --no-create-home \ -gecos "Libvirt Qemu" \ + $PARAMETER_UID \ libvirt-qemu fi if ! getent passwd libvirt-dnsmasq >/dev/null; then