aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.md8
-rw-r--r--TODO.md14
-rwxr-xr-xkvmx32
-rwxr-xr-xshare/provision/debian/desktop-basic5
-rwxr-xr-xshare/provision/debian/web-full2
5 files changed, 47 insertions, 14 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 2560e6c..a95f824 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,13 @@
# ChangeLog
+## 0.4.1 - 2024-12-17
+
+* Fixes the case when the virtual machine guest is registered under a
+ different name, other than the name of the project folder on
+ `__kvmx_initialize`.
+
+* Fixes VM name and folder logic handling on `kvmx_init`.
+
## 0.4.0 - 2024-11-22
* Adds `kvmx sshdir` action, which SSH's to the guest and changes to a given
diff --git a/TODO.md b/TODO.md
index 06674f4..d6950ec 100644
--- a/TODO.md
+++ b/TODO.md
@@ -11,6 +11,11 @@
## Usability
+* [ ] Add a `cryptdisks` action to handle unlocking of encrypted volumes used
+ by a guest VM. The specific unlocking procedure should be configurable,
+ and the action must test whether the volume is available and not already
+ unlocked.
+
* [ ] Hard pause VM (--hard): besides pausing the process, also try to pause it
in the QEMU monitor.
@@ -39,6 +44,15 @@
* [ ] Support for per-guest `known_hosts` for SSH logins.
+* [ ] Support for storing guest VMs in (remote) repositories, with supporing
+ actions such as `repo`, `push`, `pull` etc.
+
+* [ ] Commands to run when the machine comes back from sleep.
+ But how to detect that the host (like a laptop) came out from
+ a sleep state? Maybe track the time lapses and run a command
+ if the interval is too high? Both the interval and the command
+ could be configurable.
+
## Virtualization
* [ ] Config option to [disable
diff --git a/kvmx b/kvmx
index fee8c3e..01c9a0b 100755
--- a/kvmx
+++ b/kvmx
@@ -19,7 +19,7 @@
#
# Basic parameters
-VERSION="0.4.0"
+VERSION="0.4.1"
BASENAME="`basename $0`"
DIRNAME="`dirname $0`"
ACTION="$1"
@@ -106,7 +106,20 @@ function __kvmx_initialize {
# Check if second argument is a VM name or option
if [ -z "$2" ]; then
- VM="$(basename `pwd`)"
+ CANDIDATE_DEST="`pwd`/kvmxfile"
+ CANDIDATE_SRC="`find $GLOBAL_USER_CONFIG_FOLDER -lname $CANDIDATE_DEST | head -1`"
+
+ if [ ! -z "$CANDIDATE_SRC" ]; then
+ CANDIDATE_SRC="`basename $CANDIDATE_SRC`"
+ fi
+
+ # This covers the case when the VM is configured with a different name then the folder name
+ if [ ! -z "$CANDIDATE_SRC" ] ; then
+ VM="$CANDIDATE_SRC"
+ else
+ VM="$(basename `pwd`)"
+ fi
+
SHIFTARGS="1"
elif [ -e 'kvmxfile' ] && [ ! -e "$GLOBAL_USER_CONFIG_FOLDER/$2" ] && [ "$2" != "$(basename `pwd`)" ]; then
VM="$(basename `pwd`)"
@@ -1245,6 +1258,7 @@ function kvmx_poweroff {
fi
echo "Rsyncing from guest: $poweroff_rsync_from_guest ($id)..."
+ mkdir -p $poweroff_rsync_from_guest_dest
kvmx_rsync_from $poweroff_rsync_from_guest_orig $poweroff_rsync_from_guest_dest
unset poweroff_rsync_from_guest_orig
@@ -1536,17 +1550,11 @@ function kvmx_upgrade {
# Initializes a new guest
function kvmx_init {
- FOLDER="$1"
-
- if [ -z "$FOLDER" ]; then
- if [ -z "$VM" ]; then
- VM="$(basename `pwd`)"
- FOLDER="$(dirname `pwd`)/$VM"
- else
- FOLDER="$(pwd)/$VM"
- fi
+ if [ -z "$1" ]; then
+ VM="$(basename `pwd`)"
+ FOLDER="$(dirname `pwd`)/$VM"
else
- VM="$FOLDER"
+ VM="$1"
if [ ! -z "$2" ]; then
FOLDER="$2"
diff --git a/share/provision/debian/desktop-basic b/share/provision/debian/desktop-basic
index 2eeaf5d..2c5ea6d 100755
--- a/share/provision/debian/desktop-basic
+++ b/share/provision/debian/desktop-basic
@@ -46,7 +46,10 @@ apps/metadot/metadot deps-bundle desktop-basic
# Additional packages
echo "Installing additional desktop-basic packages..."
-$APT_INSTALL xpra lightdm firejail xsel tigervnc-viewer alsa-utils pulseaudio
+$APT_INSTALL lightdm firejail xsel alsa-utils pulseaudio
+
+# For host-guest interfacing
+$APT_INSTALL xpra tigervnc-viewer
# Tor Browser launcher
# Deprecated in favor of https://git.fluxo.info/utils-tor
diff --git a/share/provision/debian/web-full b/share/provision/debian/web-full
index 040d862..cb8f3c2 100755
--- a/share/provision/debian/web-full
+++ b/share/provision/debian/web-full
@@ -30,7 +30,7 @@ APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
$DIRNAME/web-basic $HOSTNAME $DOMAIN $MIRROR
# Office Suite
-$APT_INSTALL libreoffice libreoffice-gtk3 gimp inkscape mat
+$APT_INSTALL libreoffice libreoffice-gtk3 gimp inkscape mat2
# Luakit using stowpkg
#if [ ! -x "$HOME/apps/stowpkg/tree/`uname -m`/bin/luakit" ]; then