Hello, I'm using *virt-sparsify* for compressing image file [ash2] jenkins@b-imagebuilder-worker-r13h17-prod:~/workspace/imagebuilder/packer/output$ virt-sparsify --compress /data/home/jenkins/workspace/imagebuilder/packer/output/packer-vm.qcow2 /data/home/jenkins/workspace/imagebuilder/packer/output/packer-vm.qcow2.sparsified Input disk virtual size = 41943040000 bytes (39.1G) Create overlay file in /data/tmp/ to protect source disk ... Examine source disk ... Fatal error: exception Guestfs.Error("guestfs_launch failed. This usually means the libguestfs appliance failed to start or crashed. See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs or run 'libguestfs-test-tool' and post the *complete* output into a bug report Here is *libguestfs-test-tool* output http://pastebin.com/raw/anuu6wkh I would really appreciate any help or hint Have a nice day, Illia Svyrydov
On Wed, Jan 27, 2016 at 09:24:47PM +0200, Illia Svyrydov wrote:> Here is *libguestfs-test-tool* output > > http://pastebin.com/raw/anuu6wkhI'm guessing that /tmp (on the host) either doesn't exist, or is a symlink to a directory that doesn't get copied to the appliance, or something along those lines. This was fixed upstream in: https://github.com/libguestfs/libguestfs/commit/34439a04f1921c4e5ece1077570b0f036a64c7ee but you should be able to work around it by dropping a file into /usr/lib/guestfs/supermin.d that contains the required symlink target plus all parent directories. eg. If /tmp (on the host) is a symlink to /foo/bar/baz then you'd do something like this (as root): echo > /usr/lib/guestfs/supermin.d/zz-tmp-fix <<EOF / /foo /foo/bar /foo/bar/baz EOF update-guestfs-appliance I should note that this Ubuntu version of libguestfs is both ancient and has a number of serious bugs, including security issues: https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1433750 https://bugzilla.redhat.com/show_bug.cgi?id=1194472#c2 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
On Thu, Jan 28, 2016 at 09:01:38AM +0000, Richard W.M. Jones wrote:> echo > /usr/lib/guestfs/supermin.d/zz-tmp-fix <<EOFOf course I mean 'cat', not 'echo' ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top