This is based on this blog post
Create two namespaces:
sudo ip netns add ns1
sudo ip netns add ns2
Create veth pair and set each side in each namespace:
dnf -y install git | |
dnf -y install rsync | |
dnf -y install make | |
dnf -y install docker | |
systemctl start docker | |
systemctl enable docker | |
git clone https://github.com/kubevirt/kubevirt.git | |
# you may need to run this before the build: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
# where eth0 should be replaced with whatever is on that machine | |
# do that if the containers fail to fetch the software they need when running "make" |
yum -y install git | |
yum -y install rsync | |
yum -y install make | |
yum -y install docker | |
systemctl start docker | |
systemctl enable docker | |
git clone https://github.com/kubevirt/kubevirt.git |
This is based on this blog post
Create two namespaces:
sudo ip netns add ns1
sudo ip netns add ns2
Create veth pair and set each side in each namespace:
// This file tries to create net namespace race condition | |
// in order to verify thread safety of setting a thread to a network namespace. | |
// | |
// To compile: g++ -Wall -O2 -o test_ns test_ns.cpp -lpthread | |
// | |
// before running, call the following bash command to create network namespaces 0-9: | |
// for i in {0..9} | |
// do | |
// ip netns add ns$i | |
// done |
make && make docker
Fllow instructions from here.
Some missing dependencies after running ./autogen.sh
. Note that in consequent runs ./configure
is sufficient.
sudo dnf install -y rpcgen
sudo dnf install -y gnutls-devel
sudo dnf install -y libnl3-devel
sudo dnf install -y libxml2-devel
sudo dnf install -y libtirpc-devel
sudo dnf install -y yajl-devel
apiVersion: kubevirt.io/v1alpha2 | |
kind: VirtualMachineInstance | |
metadata: | |
creationTimestamp: null | |
labels: | |
special: vmi-pxe-boot | |
name: vmi-pxe-boot | |
spec: | |
domain: | |
devices: |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: cirros | |
spec: | |
containers: | |
- name: cirros | |
image: cirros | |
resources: | |
limits: |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: cirros | |
spec: | |
template: | |
metadata: | |
labels: | |
app: cirros-sleep | |
spec: |