You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Aisha Tammy 6928925968
allow shutdown via guest agent socket
4 months ago
.editorconfig Add boilerplate 6 years ago
LICENSE License: Bump year 1 year ago
Makefile Replace install script with makefile 1 year ago
README.adoc Readme: Fix link to Alpine package 1 year ago
qemu-binfmt.initd Add riscv32 magic to qemu-binfmt 1 year ago
qemu.confd Allow to change network device (netX_device) 6 years ago
qemu.initd allow shutdown via guest agent socket 4 months ago
qemush Release version 0.10.0 1 year ago

README.adoc

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

You don’t need libvirt and its awful XML configs to use QEMU/KVM!

Requirements

  • OpenRC

  • Bash or Busybox’s ash (should work also with other POSIX shells)

  • socat

  • Linux kernel with virtio drivers

    CONFIG_HW_RANDOM_VIRTIO=y
    CONFIG_SCSI_VIRTIO=y
    CONFIG_VIRTIO=y
    CONFIG_VIRTIO_BALLOON=y
    CONFIG_VIRTIO_NET=y
    CONFIG_VIRTIO_PCI=y

Installation

Alpine Linux

Install package qemu-openrc:

apk add qemu-openrc

Manually

  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

License

This project is licensed under MIT License.