Skip to content

feat: add vsocket #26260

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add vsocket #26260

wants to merge 2 commits into from

Conversation

chifu1234
Copy link

@chifu1234 chifu1234 commented Jun 2, 2025

Does this PR introduce a user-facing change?

Yes. This will add a new field inside the machine config .QEMUHypervisor.VSocketCid

Usecase

Im using vsocket with waypipe in order to forward wayland session

Copy link
Contributor

openshift-ci bot commented Jun 2, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None label Jun 2, 2025
Copy link
Contributor

openshift-ci bot commented Jun 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chifu1234
Once this PR has been reviewed and has the lgtm label, please assign l0rd for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@chifu1234 chifu1234 force-pushed the main branch 2 times, most recently from 7806b42 to 5e0499f Compare June 2, 2025 11:46
Comment on lines +105 to +107
if vsocket <= 2 {
vsocket = 3
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this is always called you always pass cid=3 since the default config value is 0 which seems wrong.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes the default behavior should be that if nothing is set, that 3 is used (we could change that also to not set anything at all if 0). The only thing which is breaking if the user is setting a value below 3.

Comment on lines 44 to 45
// VSocketCid ID for VSocket communication
VSocketCid int32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only implemented for qemu this must be in the qemu specific option.

But in general how is this intended to be used? This is not wired into the podman cli at all so the config value is never set anywhere.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it. It is now used when calling podman machine start. I don't think we need to expose that setting with podman machine init or podman machine set what's your opinion ?
I need this feautre in order to use wayerpipe to forward a wayland session from guest to host. This way I can use UI application within a guest but display it on host.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what wayerpipe is or what you are exactly trying to do. We do not support using our code directly as import somewhere else and don't offer a stable ABI (except for pkg/bindings)

In general I have no idea if forwarding a vsock has a use case for podman specifically so I would rather not support that. Podman machine is not meant to be a generic VM manager.

Signed-off-by: Kevin Klopfenstein <[email protected]>
Signed-off-by: Kevin Klopfenstein <[email protected]>
@baude
Copy link
Member

baude commented Jun 2, 2025

I'm having trouble seeing the application of this PR to podman machine as well. However, perhaps a better description of what you are trying to accomplish for the PR will generate more discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None machine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants