On Tue, Nov 22, 2022 at 07:19:31AM +0000, Addison Gourluck wrote:
Hey,
I'm trying to use guestfish to run a few lvm-related commands on an image, but
I'm getting errors. The error message suggested that I should send the error
output to this mailing list.
The simplest version of the command I'm running is as follows:
```
PSEUDO_DISABLED=1 guestfish -v --format=raw -a MY_IMAGE << EOF
run
pvcreate /dev/sda
EOF
```
and the error that I'm getting is quite long, but it seems to start failing
about here:
```
supermin: deleting initramfs files
supermin: chroot
Starting /init script ...
mount: only root can use "--types" option (effective UID is 65534)
/init: line 38: /proc/cmdline: No such file or directory
mount: only root can use "--types" option (effective UID is 65534)
mount: only root can use "--options" option (effective UID is 65534)
dd: failed to open '/dev/urandom': No such file or directory
Failed to redirect standard streams to /dev/null: No such file or directory
```
The errors at this point are quite obviously due to the mount commands somehow
failing, and most errors are complaining about /dev/ not existing, and other
fatal failures.
This is especially unusual, because running this command normally on Ubuntu
20.04 works fine, but when it runs as part of my build process, it fails. The
build tool that I'm using is Yocto's bitbake. I don't think it even begins
to
try to run the LVM commands, as it seems to fail before it even gets there.
Interestingly, if I clean out the files at /tmp/.guestfs-1000/, then run the
test tool like this "TMPDIR=/tmp libguestfs-test-tool", then also run my build
with "TMPDIR=/tmp" set, it will succeed normally. The files in /tmp are
identical in every way (I shasumed them), except for two: "/tmp/.guestfs-1000/
appliance.d/initrd" and "/tmp/.guestfs-1000/appliance.d/root". Their
permissions and user/group are also identical.
The versions of relevant packages are as follows:
```
supermin 5.1.20
guestfish 1.40.2
Is it the Debian libguestfs package, or self-built?
Please run libguestfs-test-tool and attach the complete, unedited output.
Rich.
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23)
Linux Kernel 5.15.0-53-generic
```
I'm happy to provide more information, or full debug logs, if someone can offer
instructions on how best to share them.
Regards,
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v