如何在没有 sudo 的情况下运行 libguestfs-tools 工具,例如 virt-make-fs?

Cir*_*郝海东 6 kernel virtualization

项目页面http://libguestfs.org/声称我们可以在没有 的情况下进行操作sudo,这很棒。

但是,如果我尝试一下:

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 
Run Code Online (Sandbox Code Playgroud)

我收到错误:

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.
Run Code Online (Sandbox Code Playgroud)

如何解决?

在 Ubuntu 16.04.4, libguestfs-tools 1:1.32.2-4ubuntu2 中测试。

Cir*_*郝海东 8

sudo chmod +r /boot/vmlinuz-*
Run Code Online (Sandbox Code Playgroud)

根本问题是内核无法读取并在以下位置报告:https : //bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 并且由于某种原因无法修复。

更直接的错误报告位于:https : //bugs.launchpad.net/fuel/+bug/1467579

我找不到在安装新内核时自动工作的方法。

我认为它需要内核,因为它通过使用 QEMU 引导内核来使用内核文件系统操作来执行文件操作。