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

Ability to test an image localy #752

Open
slemeur opened this issue Aug 25, 2024 · 2 comments
Open

Ability to test an image localy #752

slemeur opened this issue Aug 25, 2024 · 2 comments
Labels
kind/epic ⚡ Issue describing an epic
Milestone

Comments

@slemeur
Copy link
Contributor

slemeur commented Aug 25, 2024

Epic domain

As a user of the bootc extension, I would like to make turnaround and edits while I'm creating a bootable image easy to test.

The goal of this epic, would be to explore the different possibilities that could be used to enable testing a bootable image locally, by running it as a VM. (While we will probably not be able to encompass all the different environments, we should aime to provide a minimal support for this)

Additional context

In the past, we were having a "Launch VM" button, which was useful to better showcase the value of bootc images.

@slemeur slemeur added the kind/epic ⚡ Issue describing an epic label Aug 25, 2024
@cdrage
Copy link
Collaborator

cdrage commented Sep 4, 2024

I agree and I think this should be done.

We have 2 routes, we can either:

Option 1. native qemu commmands

We can use native qemu commands similar to the hackathon, and output it to a console socket and pick it up with a socket. This was done before for the demo.

Advantages:

  • Fast, runs the .qcow2 / .raw natively after building it
  • Was done before / POC / works
  • Stable-ish than before, requires brew install of qemu / qemu install on Fedora 40
  • Works for arm64 and amd64

Disadvantages:

  • Only one I can think of is must provide installation doc how to install qemu, but we have to do the same for podman-bootc binary too.

Option 2. podman-bootc CLI

We could also use https://github.com/containers/podman-bootc however, this is still pretty early.

Advantages:

  • Single binary
  • Same ecosystem / provide upstream support

Disadvantages:

  • Must provide image rather than qcow2 / raw / etc.
  • Slow, podman-bootc run converts the image, uses bootc-install and then runs it, compared to qemu running it immediately.
  • Needs builder support perhaps in order to avoid the above rebuilding? support bootc-image-builder podman-bootc#4
  • No cross-arch support vs native qemu: Unable to run amd64 image podman-bootc#27
  • Have to install binary AND qemu (uses qemu under the hood to deploy containers)

IMHO we should go the qemu route as we already had that working with the POC and then wait until podman-bootc features are implemented upstream?

@cdrage
Copy link
Collaborator

cdrage commented Sep 10, 2024

Screen.Recording.2024-09-10.at.10.21.47.AM.mov

I created a POC that uses qemu since it integrates well with our library.

I discovered yesterday that qemu has websocket support out of luck, and our terminal library (xterm.js) supports websockets out of pure coincidence.

We can launch the VM and access the terminal all within the podman extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/epic ⚡ Issue describing an epic
Projects
Status: No status
Development

No branches or pull requests

4 participants