Skip to content

Clarification about "path must be defined inside a valid overlay" (Fix incoming) #237

@bjackman

Description

@bjackman

I'm trying to work around #236 by creating subdirectories in my guest's /mnt and mounting stuff there via virtiofs.

With virtme-ng 1.32+129.g1ebb7fb this works:

❯❯  unshare -r vng --root ~/src/limmat-kernel/mkosi-rootfs/image/ --user root --rwdir=/mnt=$PWD/tools/testing/selftests/kselftest_install
mount: /etc/fstab: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
cp: cannot stat '/etc/hosts': No such file or directory
mount: /etc/hosts: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
mount: /etc/lvm: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
/usr/lib/tmpfiles.d/journal-nocow.conf:26: Failed to resolve specifier: uninitialized /etc/ detected, skipping.
All rules containing unresolvable specifiers will be skipped.
/run/virtme/guesttools/virtme-init: line 373: deallocvt: command not found
          _      _                                    
   __   _(_)_ __| |_ _ __ ___   ___       _ __   __ _ 
   \ \ / / |  __| __|  _   _ \ / _ \_____|  _ \ / _  |
    \ V /| | |  | |_| | | | | |  __/_____| | | | (_| |
     \_/ |_|_|   \__|_| |_| |_|\___|     |_| |_|\__  |
                                                |___/ 
   kernel version: 6.14.0-rc3+ x86_64
   (CTRL+d to exit)

root@virtme-ng:/# QEMU: Terminated

(I think those errors are harmless, just noise because my rootfs is very minimal).

But when I move to a subdirectory I get this failure:

❯❯  unshare -r vng --verbose --root ~/src/limmat-kernel/mkosi-rootfs/image/ --user root --rwdir=/mnt/kselftest_install=$PWD/tools/testing/selftests/kselftest_install
virtme: waiting for virtiofsd to start
virtme: use 'microvm' QEMU architecture
error: cannot initialize /mnt/kselftest_install inside the guest (path must be defined inside a valid overlay)

It looks like when I'm not using --overlay-rwdir (which I don't want to use, because I want the guest to be able to write files out to the host), vng expects the guest path to exist on the host.

Now I've written this out, I realise I understand the issue and it's trivial to fix, PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions