Skip to content

A virtualization API and runtime add-on for Kubernetes in order to define and manage virtual machines.

License

Notifications You must be signed in to change notification settings

guangxuli/kubevirt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KubeVirt

Hacking

Setup

First make sure you have govendor installed.

To install govendor in your $GOPATH/bin simply run

go get -u github.com/kardianos/govendor

If you don't have the $GOPATH/bin folder on your path, do

export PATH=$PATH:$GOPATH/bin

Building

To build the whole project, type

make

To build all docker images type

make docker

It is also possible to target only specific modules. For instance to build only the virt-launcher, type

make build WAHT=virt-launcher

Testing

Type

make test

to run all tests.

Vagrant

TODO, IMPROVE THAT FLOW:

Sets up a kuberentes cluster with a master and a node:

# export VAGRANT_USE_NFS=true # if you want to use nfs
vagrant up

Build and deploy kubevirt:

make all contrib
vagrant rsync # if you do not use NFS
vagrant ssh master -c "cd /vagrant && sudo hack/build-docker.sh"
vagrant ssh node -c "cd /vagrant && sudo hack/build-docker.sh"
vagrant ssh master -c "kubectl create -f /vagrant/contrib/manifest/virt-controller.yaml"
vagrant ssh master -c "kubectl create -f /vagrant/contrib/manifest/virt-controller-service.yaml"

Finally start a VM called testvm:

# this can be done from outside the VMs vecause of the virt-controller-service
curl -X POST -H "Content-Type: application/xml" http://192.168.200.2:8182/api/v1/domain/raw -d @cmd/virt-launcher/domain.xml  -v

About

A virtualization API and runtime add-on for Kubernetes in order to define and manage virtual machines.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.0%
  • Shell 5.7%
  • Makefile 0.3%