store vmimages in /lmn/vm and mount media in /lmn/media
This commit is contained in:
parent
68239b56cb
commit
e64008c714
14 changed files with 150 additions and 94 deletions
|
@ -4,19 +4,16 @@
|
|||
set -eu
|
||||
|
||||
# change to image-directory
|
||||
cd /var/lib/libvirt/images
|
||||
cd /lmn/vm
|
||||
|
||||
VM_DIR="/tmp/${SUDO_UID}/vmimages"
|
||||
VM_DIR="/tmp/${SUDO_UID}/vm"
|
||||
|
||||
# link system-VM-Images to User VM Directory
|
||||
for i in *.qcow2; do
|
||||
[[ -f "${VM_DIR}/${i}" ]] || ln "${i}" "${VM_DIR}/${i}"
|
||||
done
|
||||
|
||||
# change to image-directory
|
||||
cd /var/lib/libvirt/images/xml
|
||||
|
||||
# link system-VM-Machine-Definitions to User VM Directory
|
||||
for i in *.xml; do
|
||||
[[ -f "${VM_DIR}/xml/${i}" ]] || ln "${i}" "${VM_DIR}/xml/${i}"
|
||||
[[ -f "${VM_DIR}/xml/${i}" ]] || ln "${i}" "${VM_DIR}/${i}"
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue