minikube/kubectl, not running locally in Win10-pro-64-bit-laptop - windows

GitHub issue link :
https://github.com/kubernetes/minikube/issues/1994
Docker on Windows installed already, docker is running fine and the containers are running fine.
Docker stopped and made running as well , for running K8s setup. Both scenarios, same status- minikube did not start.
I installed Google Cloud SDK and then started minikube/kubectl for setting K8S, FYI.
Hyper-V was running all along these setup, in my laptop.
Trying to run K8S locally on my laptop using {kubernetes.io/docs/getting-started-guides/minikube/} and observed the issues below.
Started kubectl cluster-info.
C:>kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443
and then exited after sometime.
minikube version command was run.
Output is as follows :
C:>minikube-windows-amd64 version
minikube version: v0.21.0
minikube start command was run.
Output is as follows :
C:>minikube-windows-amd64 start
Starting local Kubernetes v1.7.0 cluster...
Starting VM...
E0921 18:52:12.921824 10592 start.go:129] Error starting host: Error starting stopped host: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:01.552591 Power up failed (vrc=VERR_VMX_NO_VMX, rc=E_FAIL (0X80004005)).
Retrying.
E0921 18:52:12.924743 10592 start.go:135] Error starting host: Error starting stopped host: Unable to start the VM: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm minikube --type headless failed:
VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:01.552591 Power up failed (vrc=VERR_VMX_NO_VMX, rc=E_FAIL (0X80004005))
I then ran kubectl cluster-info dump. Output is as follows :
C:>kubectl cluster-info dump
Unable to connect to the server: dial tcp 192.168.99.100:8443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Then, I ran status of minikube. Output is as follows :
C:>minikube-windows-amd64 status
minikube: Saved
localkube:
kubectl:

Minikube on Windows uses VirtualBox per default and fails to create your virtual machine because Hyper-V disables VT-x access for other hypervisors. You need to either configure minikube to use Hyper-V or disable Hyper-V and run minikube start again.

Related

minikube start time out

i want to run a minikube VM. with following code
minikube start --vm-driver hyperv --hyperv-virtual-switch "minikube_switch" --logtostderr -v7
It keeps running but when i try to ask the minikube status it says this :
E0502 10:12:57.507689 7704 status.go:297] failed to get driver ip: getting IP: IP not found
E0502 10:12:57.509688 7704 status.go:207] status error: getting IP: IP not found
minikube
type: Control Plane
host: Error
kubelet: Nonexistent
apiserver: Nonexistent
kubeconfig: Nonexistent
Can anyone help me with this problem?

Minikube start issue on AWS EC2 ubuntu bionic

I have got AWS EC2 instance started.
Logged onto the instance using Putty client.
Below all commands I tried on EC2 instance which is Ubuntu 18.04.
Configuration details of EC2 are as follows
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
I have installed docker and virtualbox
~$ docker --version
Docker version 19.03.8, build afacb8b7f0
$ dpkg -l | grep 'virtualbox'
ii virtualbox-5.2 5.2.30-130521~Ubuntu~bionic amd64 Oracle VM VirtualBox
$ lscpu | grep Virtualization
Virtualization type: full
I tried to start minikube.
$ minikube start
* minikube 1.9.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.9.2
* To disable this notice, run: 'minikube config set WantUpdateNotification false'
! minikube v1.9.0 on Ubuntu 18.04
* Using the virtualbox driver based on existing profile
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
! StartHost failed, but will try again: creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
* StartHost failed again: creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
- Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
*
E0408 16:46:12.812503 5285 style.go:173] unable to parse "X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible\n": template: X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
:1: malformed character constant: 'minikube delete' - returning raw string.
X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
* Error: [VBOX_VTX_DISABLED] creating host: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
* Suggestion: Virtualization support is disabled on your computer. If you are running minikube within a VM, try '--driver=none'. Otherwise, consult your systems BIOS manual for how to enable virtualization.
* Related issues:
- https://github.com/kubernetes/minikube/issues/3900
- https://github.com/kubernetes/minikube/issues/4730
Based on error message, I also tried below command:
$ minikube start --no-vtx-check
* minikube v1.9.0 on Ubuntu 18.04
* Automatically selected the virtualbox driver
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
! StartHost failed, but will try again: creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.455234 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
* Deleting "minikube" in virtualbox ...
* Creating virtualbox VM (CPUs=2, Memory=1993MB, Disk=20000MB) ...
* StartHost failed again: creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.270050 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
- Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging
*
E0408 16:52:12.324862 5411 style.go:173] unable to parse "X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible\n": template: X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
:1: malformed character constant: 'minikube delete' - returning raw string.
X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible
* Error: [VBOX_VERR_VMX_NO_VMX] creating host: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed:
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Details: 00:00:00.270050 Power up failed (vrc=VERR_VMX_NO_VMX, rc=NS_ERROR_FAILURE (0X80004005))
* Suggestion: Your host does not support virtualization. If you are running minikube within a VM, try '--driver=none'. Otherwise, enable virtualization in your BIOS
* Related issues:
- https://github.com/kubernetes/minikube/issues/1994
- https://github.com/kubernetes/minikube/issues/5326
I went to all those jira specified in error log but of no use. Most of those doesn't talk about issue within Amazon EC2 ubuntu 18.04 .
Questions:
how do I enable VT-X/AMD-v in BIOS in logged in EC2 instance which is ubuntu 18.04? Is there any command I can try? note: I don't have access to go to AWS EC2 instance GUI.
is AWS EC2 Ubuntu 18 instance compatible with virtualbox 5 or 6 to start minikube ?
Questions: how do I enable VT-X/AMD-v in BIOS in logged in EC2 instance which is ubuntu 18.04? Is there any command I can try? note: I don't have access to go to AWS EC2 instance GUI.
You don't, EC2 is a virtual server and You have no access to the BIOS.
To use Minikube on EC2 you need to start it without vm driver so just execute $ minikube start --vm-driver=none. This is described here if you insist on using Minikube.
Instead of installing Minikube I would recommend using kubeadm and setting single control-plane cluster with kubeadm.

No Ip Address Connecting Docker Toolbox - Mac OX High Sierra

I want to download the Docker Toolbox on my 2017 Macbook Pro with High Sierra. I went to the Docker Toolbox website and downloaded it. I then ran the docker quick install terminal from the installer and then it started running and getting docker and the vm machine on my Macbook Pro. I then notices that it was throwing an error and not giving me an ip address to access the webpage. There was an error with connecting to a vm:
Starting "default"...
(default) Check network to re-create if needed...
(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regenerating TLS certificates
Waiting for SSH to be available...
Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded
Error checking TLS connection: Host is not running
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
Error getting IP address: Host is not running
docker is configured to use the default machine with IP
For help getting started, check out the docs at https://docs.docker.com
I tried to run
docker run hello-world
to test it and got another error.
omars-mbp:~ omarjandali$ docker run -d hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
Does anyone know what is going on or what I need to do to get docker to run on my Macbook Pro 2017.

Docker-machine cannot connect to default machine (Windows)

I have problem with using docker-machine after windows update on my Windows 8.1 Enterprise.
I'm using Docker Toolbox 1.12.5. I can run docker with no problem, but after windows update docker-machine cannot connect to default machine.
I can see in VirtualBox that default machine is running, but when I tried to run
docker-machine env default
it gave me "Error checking TLS connection: Host is not running".
When I run
docker-machine ls
I get:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
I found some suggestions to restart default machine so I ran
docker-machine restart default
but it always gives me following error:
Restarting "default"...
Starting "default"...
(default) Check network to re-create if needed...
Error setting up host only network on machine start: C:\Program Files\Oracle\Vir
tualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM --nic
promisc2 deny --hostonlyadapter2 VirtualBox Host-Only Ethernet Adapter --cableco
nnected2 on failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended in
fo not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at lin
e 507 of file VBoxManageModifyVM.cpp
I tried solutions suggested on :
https://www.bountysource.com/issues/29373416-vboxmanage-exe-error-context-lockmachine-a-session-locktype_write-at-line-493-of-file-vboxmanagemodifyvm-cpp
and https://github.com/docker/toolbox/issues/360 without success.
I would really appreciate any suggestions.
Can you try restarting your system and then check?
Docker has released Community and Enterprise edition for docker. I would recommend you to upgrade to community edition and recreate your default machine using below command. They claim to have fixed some bugs in these editions.
docker-machine create --driver virtualbox default
you can add more parameters to above command if you want.

connected host has failed to respond when I run `docker run hello-world` in docker

The lastest version of docker(version 0.6) has been installed in my laptop (windows 10 LTSB) through the installation package docker toolbox. It seems to be installed correctly cause I see the logo of docker when I started the docker quickstart terminal. While when I run docker run hello-world, it returns
$ docker run hello-world
D:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect: Post https://192.168.99.100:2376/v1.24/containers/create: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..
See 'D:\Program Files\Docker Toolbox\docker.exe run --help'.
By the way, I open the vpn through cisco anyconnect. However, when I disconnect the vpn and run the hello world, it seems to just froze at
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pulling fs layer
What happened? Can you find what's wrong with the docker or vpn?
You should first create a default machine (or start if already created):
docker-machine create default
Then get the environment commands for your new VM:
docker-machine env
And then connect your shell to the new machine:
eval "$(docker-machine env default)"
After then docker run hello-world is expected to work fine. I tested on Windows 10Pro with Docker-Toolbox

Resources