Install on Windows
Note:
Windows 10 Pro or higher is required for Hyper-V — the install was recommended to be on the C: drive.
Auto Install
- Check that your CPU virtualization is enabled
- Download minishift and extract it into a folder
- Add your user to the Hyper-V Administrators
- Open Command-Line as Admin User
- Execute minishift Install
- Reboot
- Configure network
- Start (use optional
--cpus
and--memory
)
The network install doesn’t always work, see manual install, step 4 and the following, to setup the network in case the following message is encountered [Virtual Switch not found]
in step 7.
# 5. run install as admin in the folder minishift was extracted minishift setup # 5. reboot, no admin mode needed anymore # 7. configure network minishift config set hyperv-virtual-switch minishift-external # 8. start minishift minishift start
Manual install
- Enable Virtualization in the Bios
- Download minishift and extract it into a folder
- Enable Hyper-V in Windows 10 Pro
- Create a virtual network
- Add the Hyper-V Administrators role to your user account
- Update minishift config to use the network
- Start minishift
# Requires admin permissions # 3. enable hyper-V Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All # 4. create virtual network Get-NetAdapter # Select the adapter and provide the name in this line $net = Get-NetAdapter -Name 'Ethernet 2' New-VMSwitch -Name "minishift-external" -AllowManagementOS $True -NetAdapterName $net.Name
# 6. update minishift config and use the network minishift config set hyperv-virtual-switch "minishift-external" # 7. start minishift minishift start
Troubleshooting
Checking if Hyper-V driver is installed … FAIL
This error can occur e.g.:
- Hyper-V Service is not running
- Virtualization in the firmware isn’t enabled
- Hyper-V isn’t supported
Run the following command to check the virtualization settings:
# following command should return true @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent # show all CPU settings gwmi Win32_Processor | fl *
The following settings should be both true
. Most likely the first one which means the Bios settings aren’t set to enabled – (SVM Mode for Ryzen CPUs).
VirtualizationFirmwareEnabled : False VMMonitorModeExtensions : True
.SSH cmd err, output: exit status 255
During the start of minishift following error often occur on Windows:
# during normal start "minishift start" Error starting the VM: Error creating the VM. Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available. # with logging the details minishift start --show-libmachine-logs -v5 About to run SSH command: exit 0 .SSH cmd err, output: exit status 255: Error getting ssh command 'exit 0' : ssh command error: command : exit 0 err : exit status 255
The main problem here is the SSL client version 0.0.1.0 from Microsoft which as to be uninstalled. After that, the minishift start works fine.
Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Useful shell Commands
# delete VM, delete the ssh identities after that, as the SSH key will change minishift delete # delete everything minishift delete --force --clear-cache # set auto start for Hyper-V Manager Service sc config vmms start=auto # start Hyper-V Manager Service sc start vmms # start minishift with log output minishift start --show-libmachine-logs -v5
Useful Power Shell Commands
# check if Hyper-V is running well @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent # output ip of the minishift VM echo (( Hyper-V\Get-VM minishift ).networkadapters[0]).ipaddresses[0]