C4_W2_Lab_2 - VirtualBox for Linux which option to select

I’m on Windows 10. Installed WSL2 and been able to run all labs so far. Henceforth want to follow Linux commands from bash terminal, as I gather Linux is the way to go for deployment using Python. Current problem:
VirtualBox - which version of VirtualBox for Linux I should get from Linux_Downloads – Oracle VM VirtualBox
and which Linux directory should it be located after installation?

1 Like

Hi Sanjoy! I think you should download VirtualBox for Windows Hosts. However, it turns out that you may run into issues running it and WSL2. See this thread. A few learners have reported not being able to run Virtualbox unless they do some workarounds. The note in the lab has been revised to warn learners about this.

With that, I advise that you just use docker as the VM runtime so you wouldn’t need to install Virtualbox. There is just an additional command and it is also shown in the README. Please try first with WSL2 but if it’s failing, I recommend using Powershell or Git Bash . The commands will look the same as when you’re using Linux (especially for Git Bash).

We’re working on upgrading this lab to be more seamless for Windows users (e.g. using kind instead of minikube) but in the meantime, I hope the troubleshooting sections in the README would be enough to workaround possible issues. Hope this helps!

Thank you Chris.

I have also downloaded kubectl using

curl -LO “https://dl.k8s.io/release/v1.22.0/bin/windows/amd64/kubectl.exe

and now it is at /home/user of the Linux directory system. It is now accessible from everywhere. cURL is at c:/windows/system32 and it is on system path. So can access both curl and kubectl from anywhere both in windows and Linux file systems.

Problem is with minikube. Downloaded windows version as per instruction using powershell into c:\minikube\minikube.exe. Also placed c:\minikube in system path.

But minikube is not working from bash terminal but works in cmd, powershell and git-bash (downloaded git for windows). Even though git-bash is Linux terminal, I don’t get access to Linux file system I get from running bash terminal, specifically hidden directories from Windows like bin|boot|dev|etc| home |init|lib|lib64|lost+found|media| mnt |opt|proc|root|run|sbin|snap|srv|sys| tmp |usr|var.

From cmd and powershell there is no access to Linux root directories anyway.

The problem with that is I did the tensorflow-serving/docker lab from bash terminal and all the files are at /tmp/tfserving directory of Linux file system. To work from windows, I will have to replicate all the steps of the earlier lab from one of cmd, powershell and git-bash. Not sure if it will all work or not.

So, I have 2 choices:

  • Should I rerun earlier labs from windows terminal and hope to run all subsequent Kubernetes labs from windows terminal? Or
  • Should I download minikube for Linux? It should work from bash terminal and along with curl and kubectl running in bash, I should be able to work on Kubernetes at local.

What is your advice?

Hi Chris,
Meanwhile I’ve downloaded minikube for Linux and managed to start kubernetes cluster at local with docker as VM as per last readme update:

minikube start --mount=True --mount-string=“var/tmp:/var/tmp” --vm-driver=docker

Biggest problem I’m facing now is machine has become very slow and unworkable. VM is taking away 2 GB ram and 2 CPU-s.
I’ve 8 GM RAM, 4 cores (Core i5) HP laptop. Not able to run any commands at bash terminal after VM starts. What is the laptop specs to run kubernetes efficiently at local?
For the moment I’m not pursuing this lab. I’ve run behind schedule for Week 2 graded lab submission by more than 10 days. Lost a lot of time on this. Need to catch up fast. Each month costs me USD 50 and next debit is due on October 21.
Look forward to a workable solution of this lab soon.

Hi Sanjoy! If you can try increasing Docker’s limits to 4GB, maybe it will run faster. If not, then maybe a native install under Windows is the better approach. I was able to run it on a Windows machine with the Docker > Preferences > Resources settings set to 4GB RAM and 4 cores (Note: Please just set the CPU cores to the midpoint in the Docker Settings. Do not max it out if it shows 4 cores is your max. It might make the machine unresponsive). In any case, you can indeed proceed with the next activity if this has delayed your progress significantly already. This lab is only meant to demonstrate how to use configuration files. If you did the Kubernetes exercise in the official site, then you will mostly see the same output but you will be using YAML files instead of explicitly typing the configurations in the CLI. You will be doing that in the assignment so this lab is meant to familiarize you with that practice. You can just scan through this README to see the expected outputs at each step so you will know what to expect. Here is also a supplementary video if you want to see YAMLs in action. Hope these help!

Thank you Chris.
I will try your fix for local running later. The video series looks useful. I will get back to it.
Thank you for your time and help