aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-09-12 00:19:18 +0200
committerKarel Kočí <cynerd@email.cz>2018-09-12 00:19:18 +0200
commita8bfe6abb693150e9ee01ea6e8d672fc074d1f1c (patch)
treec5e6cc5166c56ad45a396d9af6d4063ad755d9d5 /virt
parent4e4d389127254c7404bc71a308129966bd9a8b07 (diff)
downloadmulticonfig-a8bfe6abb693150e9ee01ea6e8d672fc074d1f1c.tar.gz
multiconfig-a8bfe6abb693150e9ee01ea6e8d672fc074d1f1c.tar.bz2
multiconfig-a8bfe6abb693150e9ee01ea6e8d672fc074d1f1c.zip
New multiconfig design
Diffstat (limited to 'virt')
-rwxr-xr-xvirt/virt-monitor2
-rwxr-xr-xvirt/virt-serial8
-rwxr-xr-xvirt/virt.init51
3 files changed, 0 insertions, 61 deletions
diff --git a/virt/virt-monitor b/virt/virt-monitor
deleted file mode 100755
index cd6e173..0000000
--- a/virt/virt-monitor
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-socat - UNIX-CONNECT:/run/virt/$1/serial.sock
diff --git a/virt/virt-serial b/virt/virt-serial
deleted file mode 100755
index 487b97b..0000000
--- a/virt/virt-serial
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# TODO check with root permission that virtual doesn't running
-
-. /etc/conf.d/virt.$1
-
-sudo qemu-system-x86_64 -runas qemu $ARGS -nographic
-#sudo qemu-system-x86_64 -runas qemu $ARGS -curses
diff --git a/virt/virt.init b/virt/virt.init
deleted file mode 100755
index 6ccbd9e..0000000
--- a/virt/virt.init
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/sbin/openrc-run
-# vim: ft=sh
-VM_NAME="${RC_SVCNAME#virt.}"
-
-depend() {
- need networking
- after iptables ip6tables
- use logger
-}
-
-pid_file="/run/virt/$VM_NAME/pid"
-
-status() {
- if [ -f "$pid_file" ]; then
- if kill -0 "$(cat "$pid_file")" >/dev/null 2>&1; then
- einfo "Virtual $VM_NAME is running"
- else
- eerror "Virtual $VM_NAME isn't running but some garbage was left"
- fi
- else
- ewarn "Virtual $VM_NAME isn't running"
- fi
-}
-
-start() {
- if [ "$RC_SVCNAME" = 'virt' ]; then
- eerror 'You are not supposed to run this runscript directly. Instead, you should create a symlink for the VM you want to run.'
- return 1
- fi
-
- mkdir -p /run/virt/$VM_NAME
- chown :qemu /run/virt/$VM_NAME
- chmod 775 /run/virt/$VM_NAME
-
- qemu-system-x86_64 $ARGS -daemonize -runas qemu \
- -pidfile "$pid_file" -D /var/log/virt.$VM_NAME.log \
- -monitor unix:/run/virt/$VM_NAME/monitor.sock,server,nowait \
- -serial unix:/run/virt/$VM_NAME/serial.sock,server,nowait
-}
-
-stop() {
- if [ -f "$pid_file" ] && kill -0 $(cat "$pid_file") >/dev/null 2>&1; then
- PID=$(cat "$pid_file")
- kill $PID
- # TODO if there are problems we should implement also timeout
- while kill -0 $PID >/dev/null 2>&1; do sleep 1; done
- else
- ewarn "Virtual $VM_NAME is not running"
- fi
-}
-