The project page http://libguestfs.org/ claims that we can do operations without sudo
, which is awesome.
However, if I try it out:
sudo apt-get install libguestfs-tools
mkdir sysroot
# Just a test file.
dd if=/dev/urandom of=sysroot/myfile bs=1024 count=1024
virt-make-fs --format=ext2 --type=qcow2 sysroot sysroot.qcow2
I get the error:
libguestfs: error: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again. For further information, read:
http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.
How to solve that?
Tested in Ubuntu 16.04.4, libguestfs-tools
1:1.32.2-4ubuntu2.
The underlying problem is that the kernel cannot be read and is reported at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 and was wontfixed for some reason.
A more direct bug report is present at: https://bugs.launchpad.net/fuel/+bug/1467579
I could not find a method that will work automatically when new kernels are installed.
I think it needs the kernel because it works by booting the kernel with QEMU to do the file operations using the kernel filesystem operations.
They should just ship their own prebuilt kernel + QEMU, you just can't rely on other people's dependencies basically.
If you have faced to this problem for the first time, near to 100 percent the problem is related to a bug which linux kernel is not readable!
You can overcome to this problem by running following command in your host operating system:
If the problem persists, you must check the error more deeper! run following command:
and then run your expected command again!:
straight after that run following command :
It shows the log of error which helps to find the raise point much better.
If you couldn't find exactly the point of error and problem or couldn't find the solution, you must provide us the output which
libguests-test-tool
provides, to let us know about the cause of error and help us to help you much better.Even if this question is today a bit old, I fell into this problem today, and found that the reason was disk saturation. Once freed, the problem didn't show up anymore. So check also this, and do not ignore the other suggestions in this thread.