From f75a5470b85b2302aee2527bfd87cf061faf1726 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 31 Dec 2017 00:56:24 -0200 Subject: Warn the user to do manual config change if datadir is set ad rename/clone actions --- TODO.md | 1 - kvmx | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 4096bfc..f1e107d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,6 @@ # TODO * A `kvmxctl`, `kvmx-host` or `kvmx-supervisor` to control VMs from all users in the system. -* How to handle `$datadir` when VM is cloned or moved? Maybe just warn the user to do manual config change. * Fix isolinux support: * http://www.syslinux.org/wiki/index.php?title=Development/Testing * http://linux-kernel-driver.blogspot.com.br/2009/06/linux-kernel-development-using.html diff --git a/kvmx b/kvmx index 6ef4992..b132f56 100755 --- a/kvmx +++ b/kvmx @@ -1024,6 +1024,10 @@ function kvmx_clone { mv $FOLDER/ssh/$VM.key $FOLDER/ssh/$DEST.key mv $FOLDER/ssh/$VM.key.pub $FOLDER/ssh/$DEST.key.pub fi + + if [ "$DATADIR" != "$STORAGE" ]; then + echo "$BASENAME: please copy datadir $DATADIR manually" + fi } # Alias to clone @@ -1474,6 +1478,10 @@ function kvmx_rename { mv $FOLDER/ssh/$VM.key $FOLDER/ssh/$DEST.key mv $FOLDER/ssh/$VM.key.pub $FOLDER/ssh/$DEST.key.pub fi + + if [ "$DATADIR" != "$STORAGE" ]; then + echo "$BASENAME: please move datadir $DATADIR manually" + fi } # Alias to rename -- cgit v1.2.3