Go to file
Aisha Tammy 6928925968
allow shutdown via guest agent socket
This allows shutdown events to be sent
via qemu guest agent, which works for
BSD agents which don't handle ACPI events

Tested with OpenBSD 7.0.

Signed-off-by: Aisha Tammy <floss@bsd.ac>
2022-01-24 13:50:37 +00:00
.editorconfig Add boilerplate 2016-05-20 00:43:35 +02:00
LICENSE License: Bump year 2021-02-17 21:00:50 +01:00
Makefile Replace install script with makefile 2020-12-07 18:20:08 +01:00
README.adoc Readme: Fix link to Alpine package 2020-12-07 18:20:08 +01:00
qemu-binfmt.initd Add riscv32 magic to qemu-binfmt 2021-03-11 01:39:44 -07:00
qemu.confd Allow to change network device (netX_device) 2016-09-12 00:04:50 +02:00
qemu.initd allow shutdown via guest agent socket 2022-01-24 13:50:37 +00:00
qemush Release version 0.10.0 2021-02-17 21:04:41 +01:00


OpenRC runscript for QEMU

This is (opinionated) OpenRC runscript for QEMU virtual machines.

You dont need libvirt and its awful XML configs to use QEMU/KVM!


  • OpenRC

  • Bash or Busyboxs ash (should work also with other POSIX shells)

  • socat

  • Linux kernel with virtio drivers



Alpine Linux

Install package qemu-openrc:

apk add qemu-openrc


  1. Install socat:

    emerge -av net-misc/socat  # on Gentoo
    apk add socat  # on Alpine
  2. Clone this repository and jump in:

    git clone https://github.com/jirutka/qemu-openrc.git
    cd qemu-openrc
  3. Install runscript, example config and qemush utility:

    make install

    You may use standard GNU variables such as DESTDIR, prefix, bindir… to specify the target directories.

How to configure a new VM

  1. Symlink runscript qemu for your new VM named jarvis:

    cd /etc/init.d
    ln -s qemu qemu.jarvis
  2. Configure your new VM:

    cd /etc/conf.d
    cp qemu qemu.jarvis
    vim qemu.jarvis
  3. Start your new VM:

    rc-service qemu.jarvis start


This project is licensed under MIT License.