]> git.phdru.name Git - vbox-scripts.git/commitdiff
Add a script to clone a VM under a different name
authorOleg Broytman <phd@phdru.name>
Mon, 15 Jul 2019 18:10:51 +0000 (21:10 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 15 Jul 2019 18:10:51 +0000 (21:10 +0300)
clone [new file with mode: 0755]

diff --git a/clone b/clone
new file mode 100755 (executable)
index 0000000..d558241
--- /dev/null
+++ b/clone
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+if [ -z "$2" ]; then
+   echo "Usage: $0 from_vm to_vm" >&2
+   exit 1
+fi
+
+FROM_VM="$1"
+TO_VM="$2"
+
+exec VBoxManage clonevm "$FROM_VM" --name "$TO_VM" --register