diff --git a/Makefile b/Makefile index 48cd0b371cb8..df71d96995aa 100644 --- a/Makefile +++ b/Makefile @@ -356,12 +356,12 @@ test-pkg/%: ## Trigger packaging test .PHONY: all all: cross drivers e2e-cross cross-tars exotic retro out/gvisor-addon ## Build all different minikube components +# After https://github.com/kubernetes/minikube/issues/19959 is fixed kvm2-arm64 can be added back .PHONY: drivers drivers: ## Build Hyperkit and KVM2 drivers drivers: docker-machine-driver-hyperkit \ docker-machine-driver-kvm2 \ out/docker-machine-driver-kvm2-amd64 \ - out/docker-machine-driver-kvm2-arm64 .PHONY: docker-machine-driver-hyperkit @@ -557,7 +557,7 @@ debs: out/minikube_$(DEB_VERSION)-$(DEB_REVISION)_amd64.deb \ out/minikube_$(DEB_VERSION)-$(DEB_REVISION)_arm64.deb \ out/docker-machine-driver-kvm2_$(DEB_VERSION).deb \ out/docker-machine-driver-kvm2_$(DEB_VERSION)-$(DEB_REVISION)_amd64.deb \ - out/docker-machine-driver-kvm2_$(DEB_VERSION)-$(DEB_REVISION)_arm64.deb + # out/docker-machine-driver-kvm2_$(DEB_VERSION)-$(DEB_REVISION)_arm64.deb .PHONY: deb_version deb_version: @@ -842,6 +842,7 @@ out/docker-machine-driver-kvm2-x86_64: out/docker-machine-driver-kvm2-amd64 $(if $(quiet),@echo " CP $@") $(Q)cp $< $@ +# https://github.com/kubernetes/minikube/issues/19959 out/docker-machine-driver-kvm2-aarch64: out/docker-machine-driver-kvm2-arm64 $(if $(quiet),@echo " CP $@") $(Q)cp $< $@ @@ -899,24 +900,25 @@ kvm_in_docker: install-kvm-driver: out/docker-machine-driver-kvm2 ## Install KVM Driver mkdir -p $(GOBIN) cp out/docker-machine-driver-kvm2 $(GOBIN)/docker-machine-driver-kvm2 - + out/docker-machine-driver-kvm2-arm64: -ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) - docker image inspect -f '{{.Id}} {{.RepoTags}}' $(KVM_BUILD_IMAGE_ARM64) || $(MAKE) kvm-image-arm64 - $(call DOCKER,$(KVM_BUILD_IMAGE_ARM64),/usr/bin/make $@ COMMIT=$(COMMIT)) -else - $(if $(quiet),@echo " GO $@") - $(Q)GOARCH=arm64 \ - go build \ - -buildvcs=false \ - -installsuffix "static" \ - -ldflags="$(KVM2_LDFLAGS)" \ - -tags "libvirt_without_lxc" \ - -o $@ \ - k8s.io/minikube/cmd/drivers/kvm -endif - chmod +X $@ + echo "not used till https://github.com/kubernetes/minikube/issues/19959" +# ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) +# docker image inspect -f '{{.Id}} {{.RepoTags}}' $(KVM_BUILD_IMAGE_ARM64) || $(MAKE) kvm-image-arm64 +# $(call DOCKER,$(KVM_BUILD_IMAGE_ARM64),/usr/bin/make $@ COMMIT=$(COMMIT)) +# else +# $(if $(quiet),@echo " GO $@") +# $(Q)GOARCH=arm64 \ +# go build \ +# -buildvcs=false \ +# -installsuffix "static" \ +# -ldflags="$(KVM2_LDFLAGS)" \ +# -tags "libvirt_without_lxc" \ +# -o $@ \ +# k8s.io/minikube/cmd/drivers/kvm +# endif +# chmod +X $@ out/docker-machine-driver-kvm2-%: ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y) diff --git a/hack/jenkins/minikube_cross_build_and_upload.sh b/hack/jenkins/minikube_cross_build_and_upload.sh index d41719cfa843..9a5e521362f8 100755 --- a/hack/jenkins/minikube_cross_build_and_upload.sh +++ b/hack/jenkins/minikube_cross_build_and_upload.sh @@ -49,7 +49,6 @@ make -j 16 \ out/minikube_${DEB_VER}_arm64.deb \ out/docker-machine-driver-kvm2_$(make deb_version_base).deb \ out/docker-machine-driver-kvm2_${DEB_VER}_amd64.deb \ - out/docker-machine-driver-kvm2_${DEB_VER}_arm64.deb \ && failed=$? || failed=$? BUILT_VERSION=$("out/minikube-$(go env GOOS)-$(go env GOARCH)" version) diff --git a/hack/jenkins/release_build_and_upload.sh b/hack/jenkins/release_build_and_upload.sh index 1d78ab744c8d..e0a18a439b15 100755 --- a/hack/jenkins/release_build_and_upload.sh +++ b/hack/jenkins/release_build_and_upload.sh @@ -61,10 +61,10 @@ env BUILD_IN_DOCKER=y \ "out/minikube_${DEB_VERSION}-${DEB_REVISION}_armhf.deb" \ "out/minikube_${DEB_VERSION}-${DEB_REVISION}_ppc64el.deb" \ "out/minikube_${DEB_VERSION}-${DEB_REVISION}_s390x.deb" \ - "out/docker-machine-driver-kvm2_${DEB_VERSION}-${DEB_REVISION}_amd64.deb" \ - "out/docker-machine-driver-kvm2_${DEB_VERSION}-${DEB_REVISION}_arm64.deb" + "out/docker-machine-driver-kvm2_${DEB_VERSION}-${DEB_REVISION}_amd64.deb" + # "out/docker-machine-driver-kvm2_${DEB_VERSION}-${DEB_REVISION}_arm64.deb" -env BUILD_IN_DOCKER=y +env BUILD_IN_DOCKER=y \ make \ "out/minikube-${RPM_VERSION}-${RPM_REVISION}.x86_64.rpm" \ "out/minikube-${RPM_VERSION}-${RPM_REVISION}.aarch64.rpm" \ diff --git a/pkg/minikube/registry/drvs/kvm2/kvm2.go b/pkg/minikube/registry/drvs/kvm2/kvm2.go index 31e03c176740..492d5319c602 100644 --- a/pkg/minikube/registry/drvs/kvm2/kvm2.go +++ b/pkg/minikube/registry/drvs/kvm2/kvm2.go @@ -25,6 +25,7 @@ import ( "os/exec" "os/user" "path/filepath" + "runtime" "strings" "time" @@ -165,6 +166,18 @@ func status() registry.State { Doc: docURL, } } + + if runtime.GOARCH == "arm64" { + return registry.State{ + Installed: true, + Running: true, + Error: fmt.Errorf("KVM is not supported on arm64 due to a gcc build error, contributions are welcome"), + Fix: "follow the github issue for possible fix", + Doc: "https://github.com/kubernetes/minikube/issues/19959", + } + + } + if err != nil { return registry.State{ Installed: true,