Hey Guys, When I'm trying to install kubeadm using Vagrant file(<https://github . . .

Rukender Singh:
Hey Guys,

When I’m trying to install kubeadm using Vagrant file(https://github.com/kodekloudhub/certified-kubernetes-administrator-course). I m facing issue while spinning up the ubuntu instance in VirtualBox.
I have Macbook M1 Pro machine not sure if the Vagrant file is not compatible with M1.
Need help on how to resolve the issue.

Rukender Singh:
Here is the error message:

==&gt; kubemaster: Waiting for machine to boot. This may take a few minutes...
    kubemaster: SSH address: 127.0.0.1:2222
    kubemaster: SSH username: vagrant
    kubemaster: SSH auth method: private key
    kubemaster: Warning: Connection reset. Retrying...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

Mohamed Ayman:
Hello @Rukender Singh
The apple M1 chip does not support Virtualbox and there seem to be no plans to add support.

Rukender Singh:
@Mohamed Ayman VirtualBox has release a M1 version, I have installed the VirtualBox on my machine. But when I’m running Vagarant file to launch the Master and Worker node, its not working

Norman Abramovitz:
I tried as well but I was not successful yet either, you do need a different image. so you need to use.a different image.

unnivkn:
Hi @Rukender Singh please check these links: https://betterprogramming.pub/managing-virtual-machines-under-vagrant-on-a-mac-m1-aebc650bc12c
https://www.unixarena.com/2022/09/virtual-machine-on-apple-mac-chip-m1-m2-fusion-vagrant.html/
https://gist.github.com/fatso83/49980bbf065022d36c3a42369479a8df

Rukender Singh:
Let me try

Matteo:
hi! I’m trying virtualbox beta but unsuccessfully. has anyone tried those article above? are they worth it? :slightly_smiling_face: I"m trying to setup https://github.com/kodekloudhub/certified-kubernetes-administrator-course

Norman Abramovitz:
I did not have any luck making it work.

Matteo:
I made it :smile:

Matteo:
I’ll push on github as soon as I’ve completed it

Matteo:
almost:


sudo kubeadm init --pod-network-cidr 10.244.0.0/16 --apiserver-advertise-address=192.168.56.2

Matteo:

	[ERROR ImagePull]: failed to pull image <http://registry.k8s.io/kube-apiserver:v1.26.0|registry.k8s.io/kube-apiserver:v1.26.0>: output: E0111 00:46:02.232722    9615 remote_image.go:242] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"<http://registry.k8s.io/kube-apiserver:v1.26.0\|registry.k8s.io/kube-apiserver:v1.26.0\>": failed to extract layer sha256:1bb147288dff59157a2b3bf0b96553f60872c2059517165c5a8413b6778f8eaa: failed to convert whiteout file \"usr/local/.wh..wh..opq\": operation not supported: unknown" image="<http://registry.k8s.io/kube-apiserver:v1.26.0|registry.k8s.io/kube-apiserver:v1.26.0>"
time="2023-01-11T00:46:02Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"<http://registry.k8s.io/kube-apiserver:v1.26.0\|registry.k8s.io/kube-apiserver:v1.26.0\>": failed to extract layer sha256:1bb147288dff59157a2b3bf0b96553f60872c2059517165c5a8413b6778f8eaa: failed to convert whiteout file \"usr/local/.wh..wh..opq\": operation not supported: unknown"
, error: exit status 1

Matteo:
and I’ve fond why: I’m using vagrant with the docker plugin (neither vmware nor virtualbox used to work in my case on mac m1)
but you can’t use this with docker’s filesystem:

https://github.com/containerd/containerd/issues/6273

Matteo:
> Basically, nfs/overlayfs/probably other filesystems cannot support contained runtime as they don’t support some attributes required for containerd to operate.

Matteo:
if anybody figures this out - or the authors can give us a hand - it would be appreciated

Matteo:
alright, maybe I succeeded with qemu. more news coming up after trying setting kubeadmin :wink:

Matteo:
and. now I’m stuck with this: https://serverfault.com/questions/1120017/how-to-setup-two-qemu-machines-on-the-same-virtual-network-to-communicate

Matteo:
aaalright, I think now I really got it :slightly_smiling_face:
tomorrow I’m gonna try to kubeadm the three nodes and I’ll post the solution . stay tuned!

Matteo:
made it!
Screenshot 2023-01-13 at 15.31.46.png