Compare commits

..

No commits in common. "1268015dee81388155f9a4a6abc7a527835f9456" and "893c2fc42e86280668933274f20bb05e448310df" have entirely different histories.

5 changed files with 2 additions and 37 deletions

View file

@ -93,7 +93,7 @@ public_watch() {
# List running virtual machines
public_active() {
echo "Running machines:"
exec ls -t "$sockets"
exec ls "$sockets"
}
# List available virtual machines entrypoints

View file

@ -1,16 +1,3 @@
#!/bin/sh -e
# Invoked on termination if the last command failed
error() { >&2 echo "$(basename "$0"): failed"; }
# Trap errors
trap error EXIT
# Assert that the QEMUSH_NAME variable is not null
[ -n "$QEMUSH_NAME" ]
# Release the trap
trap - EXIT
# Print the actual string
printf %s/%s.qcow2\\n ~/disks "$QEMUSH_NAME"

View file

@ -1,16 +1,3 @@
#!/bin/sh -e
# Invoked on termination if the last command failed
error() { >&2 echo "$(basename "$0"): failed"; }
# Trap errors
trap error EXIT
# Assert that the QEMUSH_NAME variable is not null
[ -n "$QEMUSH_NAME" ]
# Release the trap
trap - EXIT
# Print the actual string
printf %s/%s ~/sockets "$QEMUSH_NAME"

View file

@ -1,16 +1,8 @@
#!/usr/bin/env python3
# Retrieve the name of the monitor socket
from subprocess import check_output
from subprocess import CalledProcessError
try:
socket = 'unix:%s,server,nowait' % (check_output(["sockpath"], text=True))
except CalledProcessError as e:
exit(e.returncode)
from os import environ
# Set number of vCPUs to use to the environment variable QEMUSH_NPROC or
# half of total vCPUs installed if it fails
from os import environ
try:
nproc = environ['QEMUSH_NPROC']
except KeyError:
@ -31,7 +23,6 @@ from sys import argv
command = [
'qemu-system-x86_64',
'-enable-kvm', '-daemonize',
'-monitor', socket,
'-M', 'q35',
'-cpu', 'host', '-smp', nproc,
'-m', ram,