minishift-addons icon indicating copy to clipboard operation
minishift-addons copied to clipboard

Add KubeVirt add-on

Open fabiand opened this issue 7 years ago • 12 comments

KubeVirt is a project to run Virtual Machines on Kubernetes and OpenShift.

KubeVirt can already be deployed on minikube, and a next step is to also get it running on OpenShift. it should then be provided as an add-on to minishift to make sure that it can be easily tested.

Things to be fixed

  • [x] Ability to run kubevirt on "arbitrary" clusters kubevirt/kubevirt#265
  • [x] Add macvtap kmod to the isos kubernetes/minikube#1845
  • [ ] Add kvm modules
  • [ ] Modify docker machine driver to do CPU passthrough
  • [ ] code to deploy KubeVirt

fabiand avatar Aug 29 '17 07:08 fabiand

I think more is needed on our side to make this work. For instance we would need to add an additional package/kernel module to the CentOS ISO, and likely also to B2D? Ref: https://github.com/kubernetes/minikube/issues/1845

gbraad avatar Aug 29 '17 14:08 gbraad

oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-privileged
oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-controller
oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-infra
export VERSION=v0.7.0-alpha.2
oc apply -f https://github.com/kubevirt/kubevirt/releases/download/${VERSION}/kubevirt.yaml

Is this still needed? https://github.com/kubevirt/kubevirt/pull/732

gbraad avatar Jun 26 '18 03:06 gbraad

Not if you run the commands manually.

fabiand avatar Jun 27 '18 00:06 fabiand

Using this KubeVirt seems to deploy correctly, but using this manifest to test it, I always get:

nodes are available: 1 Insufficient devices.kubevirt.io/kvm, 1 Insufficient devices.kubevirt.io/tun

I'm using CentOS image for minishift, kvm and tun modules are loaded and my host has kvm_intel with nested virtualization enabled. Any ideas about what else could be missing?

tripledes avatar Jul 12 '18 00:07 tripledes

@fabiand ^^ ? what makes the decision if a node is supported/available? as it seems the scheduling decides this node is actually not usable... ?

gbraad avatar Jul 12 '18 02:07 gbraad

Version v0.7.0-alpha.2 works (thanks @karmab), seems related to https://github.com/kubevirt/kubevirt/issues/1196.

tripledes avatar Jul 12 '18 08:07 tripledes

Can this be added as the default option in the addon and documentation?

On Thu, Jul 12, 2018 at 4:22 PM, Sergi Jimenez [email protected] wrote:

Version v0.7.0-alpha.2 works (thanks @karmab https://github.com/karmab), seems related to kubevirt/kubevirt#1196 https://github.com/kubevirt/kubevirt/issues/1196.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/minishift/minishift-addons/issues/28#issuecomment-404431102, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAHZl29WlG7EWvqSGaDUgu4i0StCMT_ks5uFwdMgaJpZM4PFgrq .

--

Gerard Braad | http://gbraad.nl [ Doing Open Source Matters ]

gbraad avatar Jul 12 '18 08:07 gbraad

@gbraad you mean setting KUBEVIRT_VERSION to v0.7.0-alpha.2 by default and a note to the readme?

tripledes avatar Jul 12 '18 08:07 tripledes

yep...

Tested to work with vXX.XXX. While other versions could work, they might fail on OpenShift v3.10 due to issue: XXXX.

until this is resolved.

gbraad avatar Jul 12 '18 08:07 gbraad

@gbraad sure thing!

@fabiand how does that sound?

tripledes avatar Jul 12 '18 08:07 tripledes

Sounds good to me!

+1

And yes, there are some ripples/issues after we merged the DP work, and we should solve them until 0.8.0.

In the meantime this workaround might work: $ oc create configmap -n kube-system kubevirt-config --from-literal debug.useEmulation=true

But in my testing there was still an issue with tun devices ... So alpha2 sounds good.

fabiand avatar Jul 12 '18 17:07 fabiand

@gbraad @fabiand just sent #141 which includes a features file, so far didn't need to add any go code for the scenarios. Later on, I could also try to check the API to verify if it's properly running but so far I feel this is good enough for now. Let me know if you think otherwise.

tripledes avatar Jul 13 '18 15:07 tripledes