Skip to content

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Sep 25, 2025

Skip the host version v0-v2 migration code and os provisioners.
Also skip all the version handling, for downloading boot2docker.

Only copy the hyperv and virtualbox drivers actually being used.
Skip the errdriver and return the binary not found error instead.

Fixes #21619

Removes the vmware and parallels drivers, since they are not hosted within the minikube monorepo.

The old libmachine code has not been updated or linted or fixed in any way, it is straight off "vendor".

NOTICE: Copyright 2014 Docker, Inc.

LICENSE: Apache-2.0

45 issues:

  • gocritic: 10
  • gocyclo: 1
  • ineffassign: 1
  • revive: 4
  • staticcheck: 14
  • unconvert: 3
  • unparam: 3
  • unused: 9

Skip the host version v0-v2 migration code and os provisioners.
Also skip all the version handling, for downloading boot2docker.

Only copy the hyperv and virtualbox drivers actually being used.
Skip the errdriver and return the binary not found error instead.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: afbjorklund
Once this PR has been reviewed and has the lgtm label, please assign comradeprogrammer 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

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 25, 2025
@afbjorklund afbjorklund requested a review from nirs September 25, 2025 19:38
Copy link
Contributor

@nirs nirs left a comment

Choose a reason for hiding this comment

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

Removing the VMware and parallels drivers look good.

libmachine is pretty big, and it seems that some files are duplicating existing minikube files.

The UnsupportedDriver looks interesting, we could use it to simplify the kvm internal driver.

@k8s-ci-robot
Copy link
Contributor

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

Test name Commit Details Required Rerun command
pull-minikube-integration 4673152 link true /test pull-minikube-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@@ -0,0 +1,509 @@
package hyperv
Copy link
Member

Choose a reason for hiding this comment

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

woud need to add boilerplate copyright here and other new files

Copy link
Collaborator Author

@afbjorklund afbjorklund Sep 26, 2025

Choose a reason for hiding this comment

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

The problem is that the boilerplate test does not accept the copyright:

Copyright 2014 Docker, Inc.
Copyright 2022 The Kubernetes Authors All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Even if you do merge it with the kubernetes copyright, and the license.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep the docker copyright? This code will quickly change and docker has abandoned this code years ago.

We can add a note that this was imported from the docker project.

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

thank you for taking on this big technical debt,

I am curious does it mean we will stop supporting parallel,vmware ? or they were broken anyways ?

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Sep 26, 2025

I am curious does it mean we will stop supporting parallel,vmware ? or they were broken anyways ?

I have no idea, if they actually worked. Just deleted them, since it was less code for me to move that way...
My impression was that they were deprecated and presumed broken - and not updated in years (2021).


But it is not required to remove them, you could add them next to virtualbox if you want to keep them on.

	github.com/Parallels/docker-machine-parallels/v2 v2.0.1
	github.com/Parallels/docker-machine-parallels/v2 => github.com/minikube-machine/machine-driver-parallels/v2 v2.0.2-0.20240730142131-ada9375ea417

   72 vendor/github.com/Parallels/docker-machine-parallels/v2/prlctl.go
  799 vendor/github.com/Parallels/docker-machine-parallels/v2/parallels_darwin.go
   14 vendor/github.com/Parallels/docker-machine-parallels/v2/version.go
    9 vendor/github.com/Parallels/docker-machine-parallels/v2/parallels.go
  894 total
	github.com/machine-drivers/docker-machine-driver-vmware v0.1.5
	github.com/machine-drivers/docker-machine-driver-vmware => github.com/minikube-machine/machine-driver-vmware v0.1.6-0.20230701123042-a391c48b14d5

  138 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/config/config.go
   74 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmware_windows.go
  628 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/driver.go
  129 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmrun.go
   88 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmx.go
   42 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmware_linux.go
   57 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmware_darwin.go
   44 vendor/github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/vmware.go
 1200 total

I just thought the idea was to remove virtualbox as well? And hyperkit removed itself, for using vfkit instead.

@nirs
Copy link
Contributor

nirs commented Sep 26, 2025

I am curious does it mean we will stop supporting parallel,vmware ? or they were broken anyways ?

I have no idea, if they actually worked. Just deleted them, since it was less code for me to move that way... My impression was that they were deprecated and presumed broken - and not updated in years (2021).

But it is not required to remove them, you could add them next to virtualbox if you want to keep them on.

It would be nice to do this change without removing the VMware and parallels drivers. But it this means adding even more code from libmachine than it is better to remove them. We have too many drivers and nobody to test or maintain them. Adding more code to support old and possibly unused driver is the wrong direction.

It will be useful to have some telemetry so we know which drivers and features are actually used.

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Sep 26, 2025

But it this means adding even more code from libmachine than it is better to remove them

The code is not from libmachine itself, it is from the vendors (possibly through machine-drivers)

MIT License

Copyright (c) 2015-2020 Parallels IP Holdings GmbH.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright 2017 The Kubernetes Authors All rights reserved.
Copyright 2017 VMware, Inc.  All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

The vmware driver actually builds on the original vmware driver that was included with libmachine.

@nirs
Copy link
Contributor

nirs commented Sep 26, 2025

But it this means adding even more code from libmachine than it is better to remove them

The code is not from libmachine itself, it is from the vendors (possibly through machine-drivers)

I think for the old drivers we can keep them and use the old vendor packages until we understand the status better.

MIT License

Copyright (c) 2015-2020 Parallels IP Holdings GmbH.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

If we add this code we must keep this copyright notice. Does it conflict with some linter in minikube?

Copyright 2017 The Kubernetes Authors All rights reserved.
Copyright 2017 VMware, Inc.  All rights reserved.

Any issue add docker copyright in the same way to minikube copyright blog?

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Sep 27, 2025

I'm thinking it might be easier to wait with this, until the deprecation period is over and ready to remove?

Meanwhile it would be possible to fix the linter issues, by paying some attention to the CI in minikube-machine

But at least you know what it would look like, pros and cons.

I will cherry-pick the documentation changes to a new PR...

EDIT:

@afbjorklund
Copy link
Collaborator Author

It would be nice to do this change without removing the VMware and parallels drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove old references to docker machine
4 participants