(OBSOLETE) Package and Run Virtual Machines as Docker Containers
(OBSOLETE) Package and Run Virtual Machines as Docker Containers
Package and run KVM images as Kubernetes pods, run at scale.
RancherVM allows you to create VMs that run inside of Kubernetes pods, called VM Pods. A VM pod looks and feels like a regular pod. Inside of each VM pod, however, is a container running a virtual machine instance. You can package any QEMU/KVM image as a Docker image, distribute it using any Docker registry such as DockerHub, and run it on RancherVM.
RancherVM extends the Kubernetes API with Custom Resource Definitions, or CRDs. Users define a VirtualMachine CRD specification detailing what base image, how much compute resources and what keypairs are authorized to open an SSH session. A Kubernetes controller creates VM pods as necessary to achieve the desired specification and reflects this in the VirtualMachine CRD status.
RancherVM comes with a Web UI for managing public keys, compute nodes, virtual machines and accessing the VNC console from a web browser.
qemu-kvm or libvirt. On Ubuntu 16.04, you can make sure KVM is enabled
by checking that both devices /dev/kvm and /dev/net/tun exist.Booting from harddisk... Once you have Kubernetes and KVM both setup, and correctly setup the nic names, you can deploy the system:
kubectl create -f deploy/ranchervm.yamlWhen you see all pods are ready and running as follows, you've deployed RancherVM successfully. Single-node Kubernetes clusters are expected to run fewer pods.
$ kubectl -n ranchervm-system get pods
NAME READY STATUS RESTARTS AGE
backend-5f5dd7878-5p6rm 1/1 Running 0 1h
frontend-5b5d47c669-cnlwn 1/1 Running 0 1h
ip-controller-648cdf6854-gkvxj 2/2 Running 0 1h
vm-controller-7c5fdbb68d-d8qq8 1/1 Running 0 1hRancherVM is ready to use. To access the UI, discover the endpoint as following.
$ kubectl -n ranchervm-system get svc/frontend
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
frontend LoadBalancer 10.43.55.38 100.200.200.123 80:31520/TCP 42mIf the Kubernetes Cluster supports creating LoadBalancer services, access RancherVM UI using the EXTERNAL-IP (100.200.200.123 in the case above) on port 80. Otherwise, access RancherVM UI using : (port is 31520 in the case above), where node_ip is the public IP address of any node in the Kubernetes cluster.
Access the UI for most of RancherVM functionalities.
You can find instructions on how to build images, including Windows images, in the RancherVM Images document.
The details of how RancherVM configures network for the VM Pod is documented in RancherVM Networking.
To build a Docker image, run IMAGE=yes hack/build.sh.
To only build the binary for your local OS & ARCH, run hack/build.sh.
No open issues yet, or sync has not completed.