I've encountered a broken symbolic link for /lib/modules/$kver if the --root points to a rootfs directory that is not the parent of the directory where the kernel sources are located.
E.g. kernel sources at directory linux and rootfs is sibling directory to sources:
So, when running vng --root ../rootfs being at linux I have modules at linux/.virtme_mods/lib/modules/0.0.0 and virtme_link_mods will be set to /../linux/.virtme_mods/lib/modules/0.0.0 because of os.path.relpath(kernel.moddir, args.root) (virtme/commands/run.py#L991).
Hence, virtme-init tries to symlink /lib/modules/$kver outside of the provided rootfs.
As a workaround I add a disk image (using --disk) with the missing directory, mount it to /tmp and manually relink /lib/modules/$kver to /tmp/my_disk/.virtme_mods/lib/modules/0.0.0. But are there other solutions besides this?
I've encountered a broken symbolic link for
/lib/modules/$kverif the--rootpoints to a rootfs directory that is not the parent of the directory where the kernel sources are located.E.g. kernel sources at directory
linuxand rootfs is sibling directory to sources:So, when running
vng --root ../rootfsbeing atlinuxI have modules atlinux/.virtme_mods/lib/modules/0.0.0andvirtme_link_modswill be set to/../linux/.virtme_mods/lib/modules/0.0.0because ofos.path.relpath(kernel.moddir, args.root)(virtme/commands/run.py#L991).Hence,
virtme-inittries to symlink/lib/modules/$kveroutside of the provided rootfs.As a workaround I add a disk image (using
--disk) with the missing directory, mount it to/tmpand manually relink/lib/modules/$kverto/tmp/my_disk/.virtme_mods/lib/modules/0.0.0. But are there other solutions besides this?