-
Notifications
You must be signed in to change notification settings - Fork 6
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
[machine]:windows node setup #13
Open
bobsira
wants to merge
9
commits into
minikube-machine:main
Choose a base branch
from
bobsira:user/bosira/windows-machine-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[machine]:windows node setup #13
bobsira
wants to merge
9
commits into
minikube-machine:main
from
bobsira:user/bosira/windows-machine-support
+372
−39
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iankingori
reviewed
Jan 8, 2025
iankingori
reviewed
Mar 3, 2025
iankingori
reviewed
Mar 3, 2025
iankingori
reviewed
Mar 5, 2025
@@ -560,3 +558,50 @@ func (d *Driver) generateDiskImage() (string, error) { | |||
|
|||
return diskImage, nil | |||
} | |||
|
|||
func writeSSHKeyToVHDX(vhdxPath, publicSSHKeyPath string) error { | |||
mountDir := "E:\\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail if I have an existing drive E on my computer. Can we retrieve the assigned drive letter after mount?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the Hyper-V driver to support Windows Server VHD images. The most important changes include adding new fields to the
Driver
struct, updating the driver creation and pre-create check methods, and implementing a new method for handling SSH keys in VHDX files.Support for Windows Server VHD:
drivers/hyperv/hyperv.go
: Added new fieldsWindowsVHDUrl
andOS
to theDriver
struct, and set default values for Windows Server VHD URL and image filename. Updated theNewDriver
function to initializeWindowsVHDUrl
with the default value. [1] [2] [3]Driver creation and pre-create check updates:
drivers/hyperv/hyperv.go
: Modified thePreCreateCheck
andCreate
methods to handle the download and setup of Windows Server VHD images. Added logic to differentiate between Linux and Windows guest OS during the creation process. [1] [2] [3] [4]New method for handling SSH keys in VHDX files:
drivers/hyperv/hyperv.go
: Implemented thewriteSSHKeyToVHDX
method to mount the VHDX file, create the necessary directories, and write the public SSH key to the appropriate location.Updates to libmachine:
libmachine/libmachine.go
: AddedGuestOS
field to theHost
struct and updated theNewHost
method to accept aguestOS
parameter. Introduced theDefineGuest
method to set the guest OS utility. [1] [2] [3] [4]Enhancements to b2d utilities:
libmachine/mcnutils/b2d.go
: Added methods to handle VHD paths and check for VHD existence. IntroducedDownloadVHD
andUpdateVHDCache
methods for downloading and caching Windows Server VHD images. [1] [2] [3] [4] [5]