Description of problem: virt-tar gives an obscure error if the destination directory is not writable when uploading. Version-Release number of selected component (if applicable): 1.3.11 How reproducible: Always. Steps to Reproduce: 1. Create a phony disk image using guestfish: $ guestfish -N fs -m /dev/sda1 <<EOF mkdir /bin mkdir /boot mkdir /boot/grub mkdir /etc mkdir /usr touch /boot/grub/menu.lst upload -<<end /etc/fstab /dev/sda1 / ext2 defaults 1 2 end EOF 2. Make it read-only: $ chmod -w test1.img 3. Check virt-inspector recognizes it: $ virt-inspector --perl test1.img [prints some Perl stuff and doesn't give an error] 4. Try uploading something: $ virt-tar -u test1.img test.tar / [where 'test.tar' is a random small tarball] Actual results: virt-tar says: tar_in: tar subcommand failed on directory: / at /usr/bin/virt-tar line 246. Expected results: Better error message. Additional info: Originally reported by Natxo Asenjo here: https://www.redhat.com/archives/virt-tools-list/2010-May/msg00008.html
This is generally an instance of bug 576879.
the vm image is on the local hard disk, so local storage. The permissions are -rw-------. 1 root root 8589934592 2010-05-11 19:56 wiki-clone.img and the virt-tar -u command is being run as administrator. SElinux is in permissive mode. I attach the debug log using export LIBGUESTFS_DEBUG=1
Created attachment 413213 [details] output of debug virt-tar -u
Patches posted upstream to improve the error messages: https://www.redhat.com/archives/libguestfs/2010-May/msg00062.html https://www.redhat.com/archives/libguestfs/2010-May/msg00063.html