Skip to content
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

guestmount breaking Fedora #168

Open
NathanTP opened this issue Sep 23, 2020 · 2 comments
Open

guestmount breaking Fedora #168

NathanTP opened this issue Sep 23, 2020 · 2 comments

Comments

@NathanTP
Copy link
Contributor

On some setups (Ubuntu 18.04 for example), Fedora is not booting correctly. Specifically, some systemd services (including login) fail to startup. The problem seems to come from guestmount, although the exact mechanism is not clear. On Centos 7 (similar to the FireSim ec2 setup), guestmount works properly. Systemd uses symlinks all over so that may be part of the problem.

In general, guestmount has been a source of constant problems (see #137 for example). It also prevents easy CI integration (can't run any FUSE in a container apparently). We really need a more robust solution to getting data on/off images. A solution needs the following features:

  1. Copy files and directories out of the image and into a fixed location on the host
  2. Copy files and directories to the guest either to a specific location or as an overlay
  3. Package the entire image into a CPIO archive (for the nodisk builds)
@NathanTP
Copy link
Contributor Author

One possible solution:
Create a special workload that runs in qemu and can copy data around. This is actually similar to what guestmount is doing under the hood (hence the incompatibility with Ubuntu that requires manually enabling read of the kernel, yet another issue with it). In our case, we already have a working kernel so it won't be an issue.

The strategy would be to build a custom busybox init (just like our driver loading inits) that can share a folder with the host (via the plan9 networked filesystem, I've already tested this and it works). The init would mount the workload's image and read a command file from the host (ideally we'd do it from the kernel command line but that's broken in RV Linux). Busybox has cpio included, so we can do everything in the guest.

While this idea is pretty ugly and hacky, I think it would actually be robust and portable (we already have to support all the needed components and it has no additional dependencies). I wish there was a reasonable FUSE option out there, but apparently Linux just makes FUSE too difficult.

@NathanTP
Copy link
Contributor Author

@alonamid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant