Skip to content

Instantly share code, notes, and snippets.

Create private networks with libvirt

I assume that you have a running debian wheezy host with libvirt and qemu/kvm installed. You need two guest VMs for this. The first guest will get the IP 192.168.100.2 and the second will get 192.168.100.100. All following commands must be run with sudo or under root.

Internal Network

We create a new network named internal with libvirt and use it with the IP

@mbodo
mbodo / cloud-init.sh
Created November 7, 2021 13:32 — forked from ebal/cloud-init.sh
Cloud-init example using a Generic Cloud CentOS-7 on a libvirtd qmu/kvm lab
#!/bin/sh
if [ "$EUID" -ne 0 ]; then
echo -e "\nPlease run as root\neg. sudo $0 \n"
exit
fi
GITHUB_USERNAME="ebal"
cd `mktemp -d`
@mbodo
mbodo / Linux - journalctl cheatsheet.md
Last active May 22, 2021 02:44
journalctl cheatsheet

Linux - journalctl cheatsheet

journalctl

Display logs with tail:

sudo journalctl -f

Sources:

@mbodo
mbodo / CURL - cheatsheet.md
Last active March 16, 2021 21:14 — forked from Kartones/CURL-cheatsheet.md
CURL Cheatsheet

CURL - cheatsheet

  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
@mbodo
mbodo / remote_crc.md
Created November 28, 2020 21:04 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

@mbodo
mbodo / Linux - Commands cheatsheet.md
Last active July 13, 2020 19:27
Linux - Commands cheatsheet

Linux - Commands cheatsheet.md

usermod

Remove all secondary groups for user

  • RHEL 7
usermod -G "" user
@mbodo
mbodo / k8s.md
Last active July 11, 2020 08:40
k8s.md

Kubernetes (K8s)

Installation Minikube KVM (WIP)

Installation of Minikube in KVM Centos7 VM image with --vm-driver=none

Installation KVM image

Create Centos 7 KVM Image

@mbodo
mbodo / tmux split-window subcommand.md
Created June 20, 2020 07:21 — forked from sdondley/tmux split-window subcommand.md
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, unless your needs are simple, it's difficult to take advantage of all tmux can offer you without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the