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

Add krun_add_disk() method #217

Merged
merged 5 commits into from
Sep 19, 2024
Merged

Add krun_add_disk() method #217

merged 5 commits into from
Sep 19, 2024

Conversation

alyssarosenzweig
Copy link
Contributor

This generalizes over krun_set_{root,data}_disk(). Notably:

* It allows arbitrarily many disk images.
* It allows mounting disks read-only.

To implement, we refactor a bit the existing handling while allowing
both APIs to be used together.

This is required to mount systemwide squashfs images which Asahi will use for FEX.

src/libkrun/src/lib.rs Outdated Show resolved Hide resolved
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 9, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host.

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
src/libkrun/src/lib.rs Outdated Show resolved Hide resolved
src/libkrun/src/lib.rs Outdated Show resolved Hide resolved
src/libkrun/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
@alyssarosenzweig
Copy link
Contributor Author

Per @slp's suggestion I have reworked this.

  • Both APIs are still supported, but the interaction is not supported. If add_disk is used, set_* must not be used.
  • set_* is now formally deprecated, slated for removal in 2.0. Users should migrate to add_disk.
  • "root" and "data" are now legal add_disk labels.

This retains b/w compat without introducing too much silliness. Hopefully we're all happy with this now 😄

This generalizes over krun_set_{root,data}_disk(). Notably:

* It allows arbitrarily many disk images.
* It allows mounting disks read-only.
* It does not assume specific root/data semantics.
* It allows setting labels.

To implement, we refactor a bit the existing handling. The set_*_disk
methods are deprecated due to the above issues, and will be removed in a
future major version. For now both APIs are supported but are mutually
exclusive.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 18, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
@slp slp merged commit bad9fc9 into containers:main Sep 19, 2024
5 checks passed
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 23, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 24, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 24, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 24, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
alyssarosenzweig added a commit to alyssarosenzweig/krun that referenced this pull request Sep 25, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
slp pushed a commit to AsahiLinux/muvm that referenced this pull request Sep 26, 2024
This adds a mechanism for automatically managing the FEX rootfs,
mounting and overlayfs'ing the relevant squashfs files from the host (as
many as desired).

Depends on:

 * libkrun containers/libkrun#217
 * libkrunfw containers/libkrunfw#65

Signed-off-by: Alyssa Rosenzweig <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants