All Projects → kubevirt → Demo

kubevirt / Demo

Licence: apache-2.0
Easy to use KubeVirt demo based on minikube.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Demo

virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (-29.55%)
Mutual labels:  virtualization, qemu, libvirt
Node Libvirt
libvirt bindings for google v8 javascript engine (nodejs addon)
Stars: ✭ 162 (+84.09%)
Mutual labels:  virtualization, qemu, libvirt
python-negotiator
Scriptable KVM/QEMU guest agent implemented in Python
Stars: ✭ 40 (-54.55%)
Mutual labels:  virtualization, qemu
Multipass
Multipass orchestrates virtual Ubuntu instances
Stars: ✭ 3,978 (+4420.45%)
Mutual labels:  qemu, libvirt
Learn Kvm
Qemu KVM(Kernel Virtual Machine)学习笔记
Stars: ✭ 305 (+246.59%)
Mutual labels:  virtualization, qemu
vmdashboard
web-based open source virtualization management interface for QEMU and KVM virtual machines
Stars: ✭ 66 (-25%)
Mutual labels:  qemu, libvirt
blog
retrohunblog
Stars: ✭ 46 (-47.73%)
Mutual labels:  virtualization, qemu
Project-Mendacius
A GUI based virtualisation tool for running Linux on macOS Big Sur (x86 or arm64)
Stars: ✭ 107 (+21.59%)
Mutual labels:  virtualization, qemu
Virtlet
Kubernetes CRI implementation for running VM workloads
Stars: ✭ 620 (+604.55%)
Mutual labels:  virtualization, libvirt
Kvm Guest Drivers Windows
Windows paravirtualized
Stars: ✭ 892 (+913.64%)
Mutual labels:  virtualization, qemu
Sheepdog
Distributed Storage System for QEMU
Stars: ✭ 896 (+918.18%)
Mutual labels:  virtualization, qemu
Tools
Combination of different utilities, have fun!
Stars: ✭ 166 (+88.64%)
Mutual labels:  virtualization, qemu
Kubevirt
Kubernetes Virtualization API and runtime in order to define and manage virtual machines.
Stars: ✭ 2,916 (+3213.64%)
Mutual labels:  virtualization, libvirt
node-qemu-server
Free GUI / Frontend / Management tool for simple setup, configure and control virtual machines (qemu / kvm) within your HTML5 Webbrowser. Virtualization with Node.js / Currently under complete rewrite.
Stars: ✭ 41 (-53.41%)
Mutual labels:  virtualization, qemu
Runtime
Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
Stars: ✭ 2,103 (+2289.77%)
Mutual labels:  virtualization, qemu
Virtlyst
Web interface to manage virtual machines with libvirt
Stars: ✭ 167 (+89.77%)
Mutual labels:  virtualization, libvirt
Appvm
Nix-based app VMs
Stars: ✭ 146 (+65.91%)
Mutual labels:  virtualization, libvirt
Nemu
Modern Hypervisor for the Cloud
Stars: ✭ 887 (+907.95%)
Mutual labels:  virtualization, qemu
Tks
Enable enthusiasts and administrators alike to easily provision highly available and production-ready Kubernetes clusters on Proxmox VE.
Stars: ✭ 319 (+262.5%)
Mutual labels:  virtualization, qemu
Terraform Provider Libvirt
Terraform provider to provision infrastructure with Linux's KVM using libvirt
Stars: ✭ 894 (+915.91%)
Mutual labels:  virtualization, libvirt

Build Status

KubeVirt Demo

This demo will guide you through setting up KubeVirt on

Quickstart

Deploy KubeVirt

This demo assumes that minikube or minishift is configured and running as described below and that kubectl available on your system. If not, then please take a look at the guide below.

The first step is to start minikube:

$ minikube config set vm-driver kvm2
$ minikube start --memory 4096
😄  minikube v1.0.1 on linux (amd64)
💿  Downloading Minikube ISO ...
 142.88 MB / 142.88 MB [============================================] 100.00% 0s
🤹  Downloading Kubernetes v1.14.1 images in the background ...
🔥  Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
📶  "minikube" IP address is 192.168.39.47
🐳  Configuring Docker as the container runtime ...
🐳  Version of container runtime is 18.06.3-ce
⌛  Waiting for image downloads to complete ...
✨  Preparing Kubernetes environment ...
💾  Downloading kubelet v1.14.1
💾  Downloading kubeadm v1.14.1
🚜  Pulling images required by Kubernetes v1.14.1 ...
🚀  Launching Kubernetes v1.14.1 using kubeadm ...
⌛  Waiting for pods: apiserver proxy etcd scheduler controller dns
🔑  Configuring cluster permissions ...
🤔  Verifying component health .....
💗  kubectl is now configured to use "minikube"
🏄  Done! Thank you for using minikube!

Before we can deploy KubeVirt we create a small config, to adjust KubeVirt to your environment. Specifically enabling software emulation for your VMs in case that no hardware virtualization support is present.

$ kubectl create namespace kubevirt

# Either nesting as described [below](#setting-up-minikube) will be used, or we configure emulation if
# no nesting is available:
$ minikube ssh -- test -e /dev/kvm \
  || kubectl create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true

Now you are finally ready to deploy KubeVirt using our operator (comparable to an installer):

$ kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/v0.34.2/kubevirt-operator.yaml
…
deployment.apps/virt-operator created

$ kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/v0.34.2/kubevirt-cr.yaml
kubevirt.kubevirt.io/kubevirt created

The initial deployment can take a long time, because a number of pods have to be pulled from the internet. We'll watch the operator status to determine when the deployment is completed:

$ kubectl wait --timeout=180s --for=condition=Available -n kubevirt kv/kubevirt
kubevirt.kubevirt.io/kubevirt condition met

Congratulations, KubeVirt was successfully deployed.

Install virtctl

An additional binary is provided to get quick access to the serial and graphical ports of a VM, and handle start/stop operations. The tool is called virtctl and can be retrieved from the release page of KubeVirt:

$ curl -L -o virtctl https://github.com/kubevirt/kubevirt/releases/download/v0.34.2/virtctl-v0.34.2-linux-amd64
$ chmod +x virtctl

Installing with krew

If you installed krew, you can install virtctl as a kubectl plugin:

$ kubectl krew install virt

Starting and stopping a VirtualMachine

Once you deployed KubeVirt you are ready to launch a VM:

if virtctl is installed via krew, please use kubectl virt ... instead of ./virtctl ...

# Creating a virtual machine
$ kubectl apply -f https://raw.githubusercontent.com/kubevirt/demo/master/manifests/vm.yaml

# After deployment you can manage VMs using the usual verbs:
$ kubectl describe vm testvm

# To start a VM you can use, this will create a VM instance (VMI)
$ ./virtctl start testvm

# The interested reader can now optionally inspect the instance
$ kubectl describe vmi testvm

# To shut the VM down again:
$ ./virtctl stop testvm

# To delete
$ kubectl delete vm testvm
# To create your own
$ kubectl apply -f $YOUR_VM_SPEC

Accessing VMs (serial console & VNC)

if virtctl is installed via krew, please use kubectl virt ... instead of ./virtctl ...

# Connect to the serial console
$ ./virtctl console testvm

# Connect to the graphical display
# This requires remote-viewer from the virt-viewer package and a graphical desktop from where you run virtctl
$ ./virtctl vnc testvm

Next steps

User Guide

Now that KubeVirt is up an running, you can take a look at the user guide to understand how you can create and manage your own virtual machines.

Appendix

Setting up Minikube

  1. (Optional) Minikube has support for nested virtualization, it can be enabled as described here.

  2. If not installed, install minikube as described here:

    1. Install the kvm2 driver
    2. Download the minikube binary
  3. Launch minikube with the desired memory

$ minikube start --vm-driver kvm2 --memory 4096
  1. Install kubectl via a package manager or download it

Setting up kind

  1. If not installed, install kind as described here

  2. Launch kind

$ tee cluster.yaml <<EOC
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: worker
- role: worker
EOC

$ kind create cluster --config cluster.yaml

Running on CRC

CRC is just another Kubernetes distribution, and you can also use kubectl to interact with such a cluster. However, the oc tool is part of OKD and provides additional commands for managing your cluster.

  1. Get the crc tool

  2. Follow the steps at https://github.com/code-ready/crc/releases to get and install CRC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].