(re)create torrent file before upload
This commit is contained in:
parent
b412535de3
commit
fb1283a546
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@ upload_image() {
|
||||||
echo "copy private VM-Maschine-Definition XML to system-dir"
|
echo "copy private VM-Maschine-Definition XML to system-dir"
|
||||||
cp "${VM_DIR}/${VM_NAME}.xml" "/var/lib/libvirt/images/${VM_NAME}.xml"
|
cp "${VM_DIR}/${VM_NAME}.xml" "/var/lib/libvirt/images/${VM_NAME}.xml"
|
||||||
fi
|
fi
|
||||||
[[ -f "/var/lib/libvirt/images/${VMNAME}.qcow2.torrent" ]] && rsync -av --password-file=/etc/rsync.secret \
|
# (re-) create torrent file
|
||||||
|
/usr/local/bin/vmimage-torrent create "${VM_NAME}.qcow2"
|
||||||
|
# Upload Torrent, qcow2 and machine-definition-XML
|
||||||
|
[[ -f "/var/lib/libvirt/images/${VM_NAME}.qcow2.torrent" ]] && rsync -av --password-file=/etc/rsync.secret \
|
||||||
"/var/lib/libvirt/images/${VM_NAME}.qcow2" rsync://vmuser@server:/vmimages-upload/
|
"/var/lib/libvirt/images/${VM_NAME}.qcow2" rsync://vmuser@server:/vmimages-upload/
|
||||||
rsync -av --password-file=/etc/rsync.secret "/var/lib/libvirt/images/${VM_NAME}.qcow2" \
|
rsync -av --password-file=/etc/rsync.secret "/var/lib/libvirt/images/${VM_NAME}.qcow2" \
|
||||||
rsync://vmuser@server:/vmimages-upload/
|
rsync://vmuser@server:/vmimages-upload/
|
||||||
|
|
Loading…
Add table
Reference in a new issue