Skip to content

Instantly share code, notes, and snippets.

View fabiand's full-sized avatar

Fabian Deutsch fabiand

View GitHub Profile

Definition

$ cat vm.yaml

kind: VirtualMachine
metadata:
  name: barbar
spec:
  state: down
@fabiand
fabiand / kube-vm-network.sh
Last active October 5, 2021 05:38
POC to attach a VM to a CNI NIC using libvirt
#!/bin/sh
# POC to connect a libvirt VM to a Pod NIC created by CNI
# Resources:
# - rancher-vm networking https://github.com/rancher/vm/blob/master/docs/networking.md
# - qemu-ifup https://gist.github.com/Wayt/26d25002d00d7cb4348499a145456999
# - cni https://github.com/containernetworking/cni/blob/master/scripts/exec-plugins.sh
# yum install -y macchanger
@fabiand
fabiand / qemu-pod.yaml
Last active November 17, 2017 12:20
Connecting qemu to the pod's network
apiVersioin: v1
kind: Pod
metadata:
name: qemu
spec:
securityContext:
runAsUser: 0
volumes:
- name: host-dev
hostPath:
@fabiand
fabiand / 02.png
Last active January 19, 2018 11:51
02.png
[fabiand@tee Downloads]$ k logs v2v-4d9b8
+ echo /v2v-dst ova http://192.168.42.1:8000/my.ova ''
+ DSTD=/v2v-dst
/v2v-dst ova http://192.168.42.1:8000/my.ova
+ SRCTYPE=ova
+ SRC=http://192.168.42.1:8000/my.ova
+ SRCURI=
++++ readlink -f /v2v.d/bin/job
+++ dirname /v2v.d/bin/job
++ readlink -f /v2v.d/bin/..
@fabiand
fabiand / README.md
Last active April 3, 2018 12:31
DP API Options

Assumption:

  • We want to support a range of devices
  • We acknowledge that certain devices are exposed using different kernel APIs (paths, netlink, …)
  • We acknowledge that a logical/physical device can consist of multiple kernel level objects (paths, netlinks, …)
  • We acknowledge that device plugins could require informations about the pod in order to provide the right resource.

Goal:

  • Keep the declarative approach
  • iow: DP creates, kubelet allocates
  • iow: Prevent side-kubelet
## Another shot at the problem scope
Devices to support
- GPUs
- FPGAs
- Network cards
- Random Number Generators
@fabiand
fabiand / pod.yaml
Last active July 3, 2018 10:57
vlan/bridge DP
Pod VM VM VM
| | |
| | |
| +-----+ |
---------+-+--------------+--------------
| | |
br0 br1 br2
| | |
DP vlan0 vlan1 vlan2

A VM is defined by three aspects

  • Size
  • Guest
  • Workload

Overview

Components

  1. (1) trusted storage connector pod
  2. (Many) VM pods connection to storage using shared directory

Flow