-
Notifications
You must be signed in to change notification settings - Fork 17
docs: A tip on using rootfs #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
With this trick I've been able to use rootfs directories built using [mkosi](https://github.com/systemd/mkosi), without needing root on the host system. I guess people who are running this via Docker etc effectively already have this in place.
danobi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error do you get otherwise? I'm trying to get a sense of whether or not vmtest could automatically do this.
Btw, might be good to hint about building images with mkosi. IMO usually useful to leave an example when leaving hints
In my case the error is:
Yeah I was also thinking about this, like maybe there would be some benefit to having I think it would probably have to be configurable, otherwise it could cause pain for someone who wants direct control over the rootfs? I dunno though I might just be creating speculative complexity with that statement.
I didn't add it coz a) I don't think I can provide instructions that I'm confident will work on multiple distros and b) I think (?) mkosi is a bit of an overpowered tool for this problem, I am using it because I also want to be able to build the same thing into a disk image complete with bootloader etc for booting on HW. Anyway, I can definitely dump what I know and an example config :) I'll do it in a separate PR to decouple. |
danobi#104 (review) prompted me to try an experimentm it turns out conatiner runtimes provide a super lightweight way to produce a rootfs. Also provide a minimal example for mkosi. This won't work without a user namespace so I guess we shouldn't merge this until after danobi#104 or something simliar is in place.
On 2nd thoughts, those tips aren't useful without the user namesapce so no point in decoupling.
Yeah, I tried an experiment and it seems an OCI container image works fine for this. I think those are incomplete systems, like I don't think they have a full systemd etc, but I guess that's not an issue for vmtest. |
|
CC @DaanDeMeyer :), maybe he can provide extra tips / point out potential issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet! great doc
|
The latest virtiofsd will have uid mapping built in without needing user namespaces. vmtest can use that so you don't have to mess around with namespaces since I vaguely remember reading about vmtest using virtiofsd as a library. |
danobi#104 (review) prompted me to try an experimentm it turns out conatiner runtimes provide a super lightweight way to produce a rootfs. Also provide a minimal example for mkosi. This won't work without a user namespace so I guess we shouldn't merge this until after danobi#104 or something simliar is in place.
danobi#104 (review) prompted me to try an experimentm it turns out conatiner runtimes provide a super lightweight way to produce a rootfs. Also provide a minimal example for mkosi. This won't work without a user namespace so I guess we shouldn't merge this until after danobi#104 or something simliar is in place.
Yep, that's being worked on in #88. Should remember to delete the hint when we merge it |
With this trick I've been able to use rootfs directories built using mkosi, without needing root on the host system.
I guess people who are running this via Docker etc effectively already have this in place.