Skip to content

Instantly share code, notes, and snippets.

NEMU build

Configure script: configure.sh

git clone https://github.com/intel/nemu
cd nemu
git checkout -b topic/virt-x86 origin/topic/virt-x86
mkdir build-x86-64
cd build-x86-64
@mcastelino
mcastelino / build.sh
Created May 31, 2018 21:23 — forked from jcvenegas/build.sh
build static qemu for kata
#git status
#On branch stable-2.11
#Your branch is up-to-date with 'origin/stable-2.11'.
#nothing to commit, working directory clean
./configure --disable-bluez --disable-brlapi --disable-docs --disable-curses --disable-gtk --disable-opengl --disable-sdl --disable-spice --disable-vte --disable-vnc --disable-vnc-jpeg --disable-vnc-png --disable-vnc-sasl --disable-fdt --disable-glusterfs --disable-libiscsi --disable-libnfs --disable-bzip2 --disable-lzo --disable-snappy --disable-seccomp --disable-tpm --disable-slirp --disable-libusb --disable-usb-redir --disable-tcg --disable-uuid --disable-debug-tcg --disable-qom-cast-debug --disable-tcg-interpreter --disable-tcmalloc --disable-curl --disable-rdma --disable-tools --disable-xen --disable-linux-aio --enable-kvm --enable-vhost-net --enable-virtfs --enable-attr --enable-cap-ng --target-list=x86_64-softmmu --extra-cflags=" -O3 -fno-semantic-interposition -falign-functions=32 -D_FORTIFY_SOURCE=2 -fPIE" --extra-ldflags=" -z noexecstack -z relro -z now" --static --
@mcastelino
mcastelino / README-vsock-nfs.md
Created April 25, 2018 16:55 — forked from grahamwhaley/README-vsock-nfs.md
Setting up vsock/nfs

How to set up vsock/nfs and QEMU

Wed 25 Apr 16:15:47 BST 2018

Setting up the experimental vsock/nfs between a host Linux machine and a KVM/QEMU client is not quite trivial - let's write it down...

Overview

over in kata containers, we use 9pfs to mount host side filesystems into the QEMU/KVM Virtual Machine.

@mcastelino
mcastelino / debugging-cc-agent.md
Created April 23, 2018 23:16 — forked from devimc/debugging-kata-agent.md
Debugging cc-agent

Create a functional Clear Container image using osbuilder

sudo -E IMG_SIZE=520M EXTRA_PKGS="dbus-bin dbus-autostart util-linux-bin p11-kit-bin bash shadow ca-certs dist-pam-configs xz-bin tar-bin grep-bin sed-bin pigz-bin iproute2-bin procps-ng-bin psstop-bin htop-bin curl nano make-bin" make rootfs
sudo -E IMG_SIZE=520M make image

Start a new VM

Containerd runtimes

A runtime in containerd does not stand at the runc level, but at the platform one. There are separate Linux and Windows runtimes, and they register as plugins:

const (
	runtimeName    = "linux"
	configFilename = "config.json"

virtio is a kernel virtual bus. From drivers/virtio/virtio.c:

static struct bus_type virtio_bus = {
	.name  = "virtio",
	.match = virtio_dev_match,
	.dev_groups = virtio_dev_groups,
	.uevent = virtio_uevent,
	.probe = virtio_dev_probe,
	.remove = virtio_dev_remove,
@mcastelino
mcastelino / installing-openwhisk-on-ubuntu.md
Created January 5, 2018 02:07 — forked from epiphone/installing-openwhisk-on-ubuntu.md
Installing OpenWhisk on Ubuntu Server 16.04

Configuring the OpenWhisk server

This guide contains instructions on manually setting up Openwhisk and CouchDB on a fresh Ubuntu 16.04 server.

The guide is based on the OpenWhisk Ansible README, which at the time of writing is missing some key steps and gotchas - hence this new guide.

1. Dependencies

sudo apt-get update

Basic VPP Setup for vhost-user interfaces and VMs

There are many examples of using VPP with tap interfaces/namespaces. After reviewing these, and details at https://wiki.fd.io/view/VPP/Tutorial_Routing_and_Switching, we came up with the following setup for testing inter-VM connectivity using VPP's vhost-user.

First time setup

Grab VPP packages, per directions from FD.io at https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages

$ sudo rm /etc/apt/sources.list.d/99fd.io.list
$ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.ubuntu.xenial.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
@mcastelino
mcastelino / mirror-port.sh
Created October 27, 2017 00:34 — forked from lonelymtn/mirror-port.sh
Mirror traffic between two interfaces using Linux's traffic controll subsystem (tc)
#!/usr/bin/env bash
# Time-stamp: <2014-07-31 13:31:43 (ryanc)>
#
# Description: Mirror traffic between two interfaces using Linux's
# traffic control subsystem (tc)
trap cleanup EXIT
CLEANUP=1
SRC_IFACE=$1