Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmohr/kubevirt-vagrant-demo
https://github.com/rmohr/kubevirt-vagrant-demo
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rmohr/kubevirt-vagrant-demo
- Owner: rmohr
- Created: 2017-03-23T10:15:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T10:08:23.000Z (over 7 years ago)
- Last Synced: 2024-10-19T19:23:20.640Z (30 days ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubevirt Demo
This demo will set up two vagrant VMs. One is a kubernetes master with
kubernetes and kubevirt deployed, the other one is a kubernetes node. This
setup allows you to do live migrations of VMs.## Getting it up and running
### Fedora
```bash
# Install vagrant and libvirt
sudo dnf install vagrant vagrant-libvirt virt-viewer libvirt-client
sudo systemctl restart virtlogd # Work around rpm packaging bug
sudo systemctl restart libvirtd# Check out the repo
git clone [email protected]:rmohr/kubevirt-vagrant-demo.git
cd kubevirt-vagrant-demo# start the environment
# it will take some time until all pods are ready
vagrant up# fetch the kubernetes connection details from the master VM
cluster/kubectl.sh --init
```## Playing with VMs
Now you can create a VM and wait until it is running:
```bash
cluster/kubectl.sh create -f cluster/vm.yaml
watch cluster/kubectl.sh get vms -o=custom-columns=NAME:metadata.name,PHASE:status.phase,NODE:status.nodeName
```When the VM is running, the VM can be migrated:
```bash
cluster/kubectl.sh create -f cluster/migration.yaml
watch cluster/kubectl.sh get vms -o=custom-columns=NAME:metadata.name,PHASE:status.phase,NODE:status.nodeName
```There is also direct access to libvirt inside the VM to verify that the VM really moved:
```bash
vagrant ssh master -c 'sudo virsh list'
vagrant ssh node0 -c 'sudo virsh list'
```Finally, a SPICE connection can be opened to the VMs:
```bash
cluster/kubectl.sh spice testvm
```