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 libhvee as alternative Hyper-V driver on Windows #3824

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

Conversation

gbraad
Copy link
Contributor

@gbraad gbraad commented Sep 6, 2023

Fixes #3811

Basic functionality for:

  • create
  • start
  • stop
  • delete

@gbraad gbraad force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch 6 times, most recently from 9c10def to 2e72ce2 Compare September 11, 2023 06:51
@gbraad gbraad changed the title [WIP] fixes #3811 add libhvee as alternative Hyper-V driver on Windows Add libhvee as alternative Hyper-V driver on Windows Sep 11, 2023
@gbraad gbraad force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch from 0a919ec to 6013d5f Compare September 13, 2023 06:54
@gbraad

This comment was marked as outdated.

@adrianriobo
Copy link
Contributor

adrianriobo commented Oct 5, 2023

These are the results for this PR on windows https://crcqe-asia.s3.amazonaws.com/nightly/ocp/4.13.12/20231005/11-pro/qe-results/e2e-non-ux.xml all green except the known issue with the latest version for the pipelines operator

@gbraad
Copy link
Contributor Author

gbraad commented Oct 6, 2023

Want to incorporate 9P, but the current codebase for this lives in the PR containers/gvisor-tap-vsock#280

@cfergeau
Copy link
Contributor

cfergeau commented Oct 6, 2023

Want to incorporate 9P, but the current codebase for this lives in the PR containers/gvisor-tap-vsock#280

The code from this gvisor-tap-vsock PR is short, and thus easy to add to the daemon when we need it. But there's also some guest code involved, which might be trickier mheon/libpod@334e213

@gbraad
Copy link
Contributor Author

gbraad commented Oct 6, 2023

@cfergeau it basically is the same/similar code as the 9p-ufs that I tested with earlier, so I am not so concerned. I am more curious if this will therefore be part of a library, or the changes for libpod remain seperate?

@gbraad
Copy link
Contributor Author

gbraad commented Oct 17, 2023

ref: #3870

Copy link
Contributor

@cfergeau cfergeau left a comment

Choose a reason for hiding this comment

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

I've rebased this and squashed the commits in https://github.com/cfergeau/crc/tree/libhvee
This looks like a fairly straightforward change, though I haven't tried running it on a Windows machine :)

@@ -166,19 +165,6 @@ func fixUserPartOfCrcUsersAndHypervAdminsGroup() error {
return errReboot
}

func checkIfHyperVVirtualSwitchExists() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fwiw, it would be good to split the system mode networking removal on Windows in its own preparatory commit, this would make it easier to focus on/review the config/preflight changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, I do not even know if this functionality still works. I'll consider, but these checks are also performed when not even necessary (like the existence of the virtual switch) and therefore actually wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've done this in https://github.com/cfergeau/crc/tree/libhvee, this removes even more code

pkg/drivers/libhvee/libhvee_windows.go Show resolved Hide resolved
pkg/drivers/libhvee/libhvee_windows.go Show resolved Hide resolved
pkg/drivers/libhvee/libhvee_windows.go Outdated Show resolved Hide resolved
pkg/drivers/libhvee/libhvee_windows.go Show resolved Hide resolved
pkg/drivers/libhvee/libhvee_windows.go Outdated Show resolved Hide resolved
pkg/drivers/libhvee/libhvee_windows.go Outdated Show resolved Hide resolved
@gbraad gbraad changed the title Add libhvee as alternative Hyper-V driver on Windows [WIP] Add libhvee as alternative Hyper-V driver on Windows Nov 29, 2023
@gbraad gbraad changed the title [WIP] Add libhvee as alternative Hyper-V driver on Windows Add libhvee as alternative Hyper-V driver on Windows May 29, 2024
@cfergeau cfergeau force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch from 394e34e to 0a0ad63 Compare May 29, 2024 10:36
@gbraad
Copy link
Contributor Author

gbraad commented Jun 18, 2024

Everlasting rebasing

@cfergeau
Copy link
Contributor

Everlasting rebasing

Rebase done.

@cfergeau cfergeau force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch from 729ee25 to 3def960 Compare June 18, 2024 11:44
@cfergeau cfergeau force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch 2 times, most recently from 17ce677 to ee4795d Compare September 11, 2024 03:49
@gbraad
Copy link
Contributor Author

gbraad commented Sep 19, 2024

@lilyLuLiu @adrianriobo For this change, the proxy tests are failing. Do we have more information aroudn this?

@adrianriobo
Copy link
Contributor

@gbraad those are mainly failing due to timeout on the full suite, let me check downstream running only that one I will ack if it is green (and will increase the timeout for the suite here)

@lilyLuLiu
Copy link
Contributor

Downstream windows test passed for this PR.

@adrianriobo
Copy link
Contributor

adrianriobo commented Sep 20, 2024

🙏 hold till today mid day need to check something else

We are good to go, downstream proxy is green

cfergeau and others added 3 commits September 20, 2024 11:28
Should return an error when trying to set the "system networking"
option. But I think this is already the case, or it's not possible to
choose this option in release builds?

Signed-off-by: Christophe Fergeau <[email protected]>
This replaces the interaction of Hyper-V from our machine-drivers based
driver as used in Minikube/minishift to the libhvee library as used by
podman machine.
Disk handling API was added to libhvee since the first iteration of the
libhvee support, we can now make use of it.

Signed-off-by: Christophe Fergeau <[email protected]>
Copy link
Contributor

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

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

Full green on downstream windows env

Copy link

openshift-ci bot commented Sep 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianriobo

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

The pull request process is described 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

@cfergeau
Copy link
Contributor

Full green on downstream windows env

Didn't we wait too long though? We held this PR a while back as we did not want to land it at the same time as the switch to 4.16.
The next crc release could be 4.17-based, should we delay this again by one release?

@cfergeau cfergeau force-pushed the gbraad/spike-add-libhvee-as-alternative-3811 branch from ee4795d to 3003fc5 Compare September 20, 2024 11:07
Copy link

openshift-ci bot commented Sep 20, 2024

New changes are detected. LGTM label has been removed.

Copy link

openshift-ci bot commented Sep 20, 2024

@gbraad: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-crc ee4795d link true /test integration-crc
ci/prow/security 3003fc5 link false /test security

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

[Spike] Add libhvee as alternative driver for accessing Hyper-V
6 participants