From f63e03481c65cf596edc465d622e759595b192c9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Jun 2021 22:50:19 +0200 Subject: [PATCH] kubevirt: add vm2 + notes --- kubevirt/README.md | 38 ++++++++++++++++++++++++++++++++++ kubevirt/vm2-networking.yaml | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 kubevirt/README.md create mode 100644 kubevirt/vm2-networking.yaml diff --git a/kubevirt/README.md b/kubevirt/README.md new file mode 100644 index 0000000..e0e1d89 --- /dev/null +++ b/kubevirt/README.md @@ -0,0 +1,38 @@ +## Host tunings + +To fix + +``` +"component":"virt-handler","level":"error","msg":"Error starting tun +device plugin","pos":"device_controller.go:73","reason":"failed to add +the device root path to the watcher: no such file or +directory","timestamp":"2021-06-07T20:15:48.557412Z" +``` + +use + +``` +modprobe tun +``` + +To fix + +``` + Warning FailedScheduling 67s (x2 over 69s) default-scheduler 0/4 + nodes are available: 1 node(s) had taint + {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 3 + Insufficient devices.kubevirt.io/vhost-net. + +``` + +``` +modprobe vhost_net +``` + +## Failing to create tap devices + +``` +failed to configure vmi network: Critical network error: error +creating tap device named tap0; failed to create tap device tap0: exit +status 1 +``` diff --git a/kubevirt/vm2-networking.yaml b/kubevirt/vm2-networking.yaml new file mode 100644 index 0000000..b57d48c --- /dev/null +++ b/kubevirt/vm2-networking.yaml @@ -0,0 +1,40 @@ +apiVersion: kubevirt.io/v1alpha3 +kind: VirtualMachineInstance +metadata: + name: testvmi-nocloud +spec: + terminationGracePeriodSeconds: 30 + domain: + resources: + requests: + memory: 1024M + devices: + disks: + - name: containerdisk + disk: + bus: virtio + - name: emptydisk + disk: + bus: virtio + - disk: + bus: virtio + name: cloudinitdisk + interfaces: + - name: default + masquerade: {} + networks: + - name: default + pod: {} + volumes: + - name: containerdisk + containerDisk: + image: kubevirt/fedora-cloud-container-disk-demo:latest + - name: emptydisk + emptyDisk: + capacity: "2Gi" + - name: cloudinitdisk + cloudInitNoCloud: + userData: |- + #cloud-config + password: fedora + chpasswd: { expire: False }