Skip to content

Instantly share code, notes, and snippets.

mcastelino /
Created Dec 13, 2021 — forked from smoser/
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.


Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
mcastelino / .gitignore
Created May 21, 2021 — forked from smoser/.gitignore
cloud-init ubuntu nocloud example with network config
View .gitignore
mcastelino /
Created Jul 10, 2019 — forked from krsna1729/
tracing network stack for MACVLAN IPVLAN


ip netns del net1
ip netns add net1
ip link add macvlan1 link enp130s0f0 type macvlan mode bridge
ip link set macvlan1 netns net1 up
ip netns exec net1 ip a add dev macvlan1
ip netns exec net1 ping -c1
mcastelino /
Created Jun 27, 2019 — forked from sboeuf/
How to test VFIO with virtio-net-pci device

Prepare the host

Get the image clear-XXXXX-kvm.img

unxz clear-30080-kvm.img.xz

Add intel_iommu=on to the kernel boot parameters

mkdir mount_dir
mcastelino /
Created Apr 12, 2019 — forked from egernst/
containerd + kubernetes, and making clr-examples do what i want on Bionic

Quick guide for getting Kata+containerd (using v2 shim) up and running super quick on bionic

Installation of Kube stuff on bionic:

Use the following sh:

sudo bash -c "cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial-unstable main

In the not-dockershim and not-CRIO normal socket path case, we are handled by the cri stats provider:

The 'magic' happens in the listPodStats function

Looping over each managed container, kubelet calculates the container statics at, then calculate a running total of the pod usage at, and then eventually return the results.

Potential issue

Initial potential issue I noticed was that we will run into is at the top of addPodCPUMemoryStats function. The

mcastelino /
Created Dec 21, 2018 — forked from jcvenegas/
Kata Containers Release
mcastelino /
Created Oct 11, 2018 — forked from egernst/
Passing graphics card to a Clear Container

Passing a graphics card to a Clear Container

Host system setup:

The directions below are specific to an Ubuntu 16.04 host system equipped with a GeForce GTX 550 Ti graphics card. While the process should be the same, YMMV.

  1. Make sure your system supports IOMMU groups

todo -- get directions from SRIOV page


Physical Setup:

| workstation  [enp5s0f0] -- internet
|                  |          ---------------
|              [enp5s0f1] -- |    switch    |
--------------------         |              |
               [lab-nuc-1] --|              |
 [lab-nuc-2] --|--------------|