Description of problem: Guest mounting a vdi file belonging to some user with "sudo guestmount -a <vdi file> -i --ro <mountpoint>" sets the owner of the vdi file to qemu.qemu, but does not restore the original owner if unmounting with guestunmount. Version-Release number of selected component (if applicable): libguestfs-1.26.5-1.fc20.x86_64 How reproducible: always Steps to Reproduce: 1.sudo guestmount -a <some user vdi file> -i --ro <mount point> 2.sudo guestunmount <mount point> 3. Actual results: The owner of <some user vdi file> is now qemu.qemu Expected results: The owner is reset to the original owner Additional info: ls -l /vbox/win7.vdi -rw-------. 1 backes backes 35174649856 Jul 17 07:01 /vbox/win7.vdi backes@eule [~]: sudo guestmount -a /vbox/win7.vdi -i --ro /mnt backes@eule [~]: ls -l /vbox/win7.vdi -rw-------. 1 qemu qemu 35174649856 Jul 17 07:01 /vbox/win7.vdi backes@eule [~]: sudo guestunmount /mnt backes@eule [~]: ls -l /vbox/win7.vdi -rw-------. 1 qemu qemu 35174649856 Jul 17 07:01 /vbox/win7.vdi
libvirt does the chown. It should chown it back, but does not. I think there is an open bug about this. If you want to avoid it, then tell libguestfs to run qemu directly, without using libvirt: export LIBGUESTFS_BACKEND=direct
The lack of restoring to the original owner/group is tracked in bug 636156 *** This bug has been marked as a duplicate of bug 636156 ***