https://github.com/jirutka/qemu-openrc
OpenRC init script for QEMU/KVM (for Gentoo and Alpine Linux)
https://github.com/jirutka/qemu-openrc
alpine-linux initscript kvm linux openrc qemu qemu-kvm
Last synced: 8 months ago
JSON representation
OpenRC init script for QEMU/KVM (for Gentoo and Alpine Linux)
- Host: GitHub
- URL: https://github.com/jirutka/qemu-openrc
- Owner: jirutka
- License: mit
- Created: 2016-05-22T13:03:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T21:02:06.000Z (over 1 year ago)
- Last Synced: 2025-06-08T17:33:09.120Z (12 months ago)
- Topics: alpine-linux, initscript, kvm, linux, openrc, qemu, qemu-kvm
- Language: Shell
- Homepage:
- Size: 46.9 KB
- Stars: 41
- Watchers: 6
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= OpenRC runscript for QEMU
This is (opinionated) OpenRC runscript for QEMU virtual machines.
____
You don’t need https://libvirt.org[libvirt] and its https://libvirt.org/formatdomain.html[awful XML configs] to use QEMU/KVM!
____
== Requirements
* https://wiki.gentoo.org/wiki/OpenRC[OpenRC]
* Bash or Busybox’s ash (should work also with other POSIX shells)
* http://www.dest-unreach.org/socat[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 https://pkgs.alpinelinux.org/package/edge/community/x86_64/qemu-openrc[qemu-openrc]:
apk add qemu-openrc
=== Manually
. Install socat:
+
[source, sh]
----
emerge -av net-misc/socat # on Gentoo
apk add socat # on Alpine
----
. Clone this repository and jump in:
+
git clone https://github.com/jirutka/qemu-openrc.git
cd qemu-openrc
. 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
. Symlink runscript `qemu` for your new VM named `jarvis`:
+
cd /etc/init.d
ln -s qemu qemu.jarvis
. Configure your new VM:
+
cd /etc/conf.d
cp qemu qemu.jarvis
vim qemu.jarvis
. Start your new VM:
+
rc-service qemu.jarvis start
== License
This project is licensed under http://opensource.org/licenses/MIT/[MIT License].