Install Minishift on Windows 10 with Hyper-V

1) Setting Up the Hyper-V Driver

– Install Hyper-V in Windows 10. See Windows instructions.

– Add the user to the local Hyper-V Administrators group.

PS command :
([adsi]"WinNT://./Administrateurs Hyper-V,group").Add("WinNT://$env:UserDomain/$env:Username,user")

– Add an External Virtual Switch.

Identify first the net adapter to use.
PS command :
Get-NetAdapter

Then store which one you want to use for Minishift network access.
PS command :
$net = Get-NetAdapter -Name 'Wi-Fi' A

At last create a virtual switch for Hyper-V :
New-VMSwitch -Name "External VM Switch" -AllowManagementOS $True -NetAdapterName $net.Name

I named it « External VM Switch » but the name doesn’t matter.
From now Powershell is not required any longer. You can use either PowerShell or cmd.exe.

2) Starting Up Minishift

Minishift has to aware of the external virtual switch to use.
You can set its name from the Minishift command arg or as a environment variable.  

In theory, that should be enough but it will not the case on Windows 10:
minishift start --hyperv-virtual-switch "External VM Switch"

This command execution downloads the Minishift ISO but (in my case at least) fails when it tries to retrieve the downloaded ISO on Windows 10 because of the path specified in the running script that relies on the Linux based filesystem layout.
After the failure, a simple workaround is to move the downloaded ISO where you like and to refer it as you execute the start command of the Minishift executable.
It would give :
minishift start --hyperv-virtual-switch "External VM Switch" --iso-url file://D:/minishift/minishift-centos7.iso
Where you should refer in the iso-url  parameter the file URI (in your local drive) of the Minishift ISO.
The startup will take a some time. At the end you should see something like :

minishift-starting

3) Stop Minishift

That releases memory/cpu resources allocated to Minishift by stopping it : 
minishift stop
It allows you to restart it fast later.

4) Delete Minishift

A weird issue with Minishift, the need to start from scratch or simply you don’t need it any longer : delete files associated to the Minishift instance/cluster : minishift delete --force


4) Problems to start up Minishift ?

Q : I have a broad error but I don’t see the cause. 
A : Increase the logging verbosity by adding  arguments in the minishift command :
 --show-libmachine-logs -v5

Q : I feel that I fixed what it was wrong or missing but the minishift startup still fails.
A : delete startup files and restart Minishift from scratch.
This command will help :
minishift delete --force

5) Opening Minishift console

Either use the URL provided in the logs or use the console option that is minishift console :

minishift-logging


Install ISTIO, next step !

Ce contenu a été publié dans Non classé. Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *