distribute VM-images with aria2 instead of ctorrent
This commit is contained in:
parent
e30a7032a5
commit
40962fd9de
23 changed files with 444 additions and 434 deletions
29
roles/lmn_vm/files/vm-link-images
Executable file
29
roles/lmn_vm/files/vm-link-images
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/bash
|
||||
# link VM in User-Dir in /tmp or /var/vm
|
||||
|
||||
set -eu
|
||||
|
||||
source /etc/lmn/vm.conf
|
||||
|
||||
# change to image-directory
|
||||
cd "${VM_SYSDIR}"
|
||||
|
||||
while getopts ':p' OPTION; do
|
||||
case "$OPTION" in
|
||||
p)
|
||||
VM_DIR="${VM_DIR_PERSISTENT}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift "$((OPTIND -1))"
|
||||
|
||||
# link system-VM-Images to User VM Directory
|
||||
for i in *.qcow2; do
|
||||
[[ -f "${VM_DIR}/${i}" ]] || ln "${i}" "${VM_DIR}/${i}"
|
||||
done
|
||||
|
||||
# link system-VM-Machine-Definitions to User VM Directory
|
||||
for i in *.xml; do
|
||||
[[ -f "${VM_DIR}/${i}" ]] || ln "${i}" "${VM_DIR}/${i}"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue