All Projects → Kdecherf → birsh

Kdecherf / birsh

Licence: ISC License
virsh replacement in bash

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to birsh

Runtime
OCI (Open Containers Initiative) compatible runtime using Virtual Machines
Stars: ✭ 588 (+4100%)
Mutual labels:  virtual-machine, kvm
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (+7421.43%)
Mutual labels:  virtual-machine, kvm
Cc Oci Runtime
OCI (Open Containers Initiative) compatible runtime for Intel® Architecture
Stars: ✭ 418 (+2885.71%)
Mutual labels:  virtual-machine, kvm
virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (+342.86%)
Mutual labels:  virtual-machine, kvm
Runtime
Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
Stars: ✭ 2,103 (+14921.43%)
Mutual labels:  virtual-machine, kvm
Macos Simple Kvm
Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
Stars: ✭ 11,732 (+83700%)
Mutual labels:  virtual-machine, kvm
Kvmtop
A monitoring tool for black box virtual machines from KVM hypervisor level
Stars: ✭ 51 (+264.29%)
Mutual labels:  virtual-machine, kvm
evcloud
EVCloud是一个基于ceph和libvirt的轻量级云主机管理平台,实用稳定,维护简易
Stars: ✭ 44 (+214.29%)
Mutual labels:  virtual-machine, kvm
Kvm Vmi
KVM-based Virtual Machine Introspection
Stars: ✭ 153 (+992.86%)
Mutual labels:  virtual-machine, kvm
Qemu Images
A collection of disk images and virtual machines that can be used by the QEMU emulator
Stars: ✭ 145 (+935.71%)
Mutual labels:  virtual-machine, kvm
Linux Unattended Installation
This project provides all you need to create an unattended installation of a minimal setup of Linux.
Stars: ✭ 215 (+1435.71%)
Mutual labels:  virtual-machine, kvm
wiser
🐎 Extremely minimal vmm for linux written in C. Hopefully someday will spin linux-vm for you.
Stars: ✭ 249 (+1678.57%)
Mutual labels:  virtual-machine, kvm
vm-automation
VirtualBox automation using Python
Stars: ✭ 1 (-92.86%)
Mutual labels:  virtual-machine
vrnetlab
Run virtual routers with docker
Stars: ✭ 879 (+6178.57%)
Mutual labels:  kvm
RVM
Rcore Virtual Machine
Stars: ✭ 59 (+321.43%)
Mutual labels:  virtual-machine
8BitComputer
A simple 8 bit computer emulator in C++.
Stars: ✭ 18 (+28.57%)
Mutual labels:  virtual-machine
packer-kvm
Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 7, CentOS 8, CentOS 8 Stream, Alma Linux, Rocky Linux, Bionic (Ubuntu 1804), Focal (Ubuntu 2004), Debian 11 (stable), Kali Linux, Fedora 33 and Fedora 34.
Stars: ✭ 99 (+607.14%)
Mutual labels:  kvm
md server
Standalone EC2 metadata server to simplify the user of vendor cloud images with standalone kvm/libvirt
Stars: ✭ 36 (+157.14%)
Mutual labels:  kvm
LEDs-single-gpu-passthrough
Single GPU passthrough guide 单显卡直通教程资源
Stars: ✭ 87 (+521.43%)
Mutual labels:  kvm
kcs
Scripting in C with JIT(x64)/VM.
Stars: ✭ 25 (+78.57%)
Mutual labels:  virtual-machine

birsh

birsh is a replacement to libvirt but in bash and without XML files (and with many less features, I admit) :)

I created this bash script to be able to quickly start virtual machines with KVM or systemd-nspawn (more or less container mode) on my laptop without playing with ton of XML files or an awful GUI tool.

The second mode is useful if you want to boot only one virtual machine without network needs (here the network is shared with the host) like quick test of a patch, build or software. The first mode can be used as many times as you want.

This tool lacks features at this time like graphical screen, removable media boot, disk management and the code is not necessarily beautiful but it works for me :) (and you can contribute)

Installation

Just make install

Configuration

The main configuration file is /etc/birsh/settings and let you set the following items:

  • IMAGESFOLDER: folder containing all disks
  • MOUNTFOLDER: folder where to mount disks (for nspawn)
  • TMPFOLDER: folder to put monitor sockets and temporary files (for start)
  • BRIDGE: network device name for the bridge (for start)
  • BRIDGEUP: optional setting to specify commands to execute after the bridge is up (eg. DHCP server)
  • GATEWAY: network address of the host
  • NETWORK: network to use for virtual machines (used for NAT)

The tool will automatically set NAT using iptables and create a /24 private network.

Requirements

You must have these tools installed on your host: brctl, ip, iptables, qemu-nbd, kpartx, socat, screen, systemd-nspawn (optional).

screen is used to give you an access to the serial console of a KVM virtual machine. You should set console=ttyS0 on the virtual machine's kernel boot argument to be able to use this feature.

qemu-nbd and kpartx are used for the nspawn mode.

Usage

birsh command [options]

Commands

birsh start name -m size [-g] [-s num] [-cdrom filename]
Start a new virtual machine using qemu-kvm. Return the QEMU monitor socket.

  • name (mandatory): name of the disk to boot on
  • -m size (mandatory): set size MB of memory to the virtual machine
  • -g: enable graphical output
  • -s num: set num CPUs to the virtual machine
  • -cdrom filename: add filename (must be in IMAGESFOLDER/media) as a media and boot on it

birsh nspawn name
Start a new container using systemd-nspawn. Return a chrooted shell.

  • name (mandatory): name of the disk to boot on

birsh serial name
Attach a screen to the serial console of a virtual machine (only for qemu-kvm)

  • name (mandatory): name of the disk to attach console on

birsh list [base]
List all available qcow2 disk files in IMAGESFOLDER. Files in subfolders are excluded.

  • base: list all images in IMAGESFOLDER/base

Examples

I consider you have some bootable disks in your IMAGESFOLDER, for example ubuntu.qcow2, exherbo.qcow2 and php.qcow2.

Boot the php virtual machine using qemu-kvm with 512 MB of memory:

birsh start php -m 512

Note: this command will output a prompt to the QEMU monitor socket. Typing quit in this monitor or powering off the virtual machine will release the socket and destroy the machine.

Attach to the php serial console (after birsh start php):

birsh serial php

Spawn a container for the disk exherbo:

birsh nspawn exherbo

Note: this command will mount the disk exherbo.qcow2 in MOUNTFOLDER/exherbo and boot it.

License

This tool is released under the ISC license. See the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].