Skip to content
Snippets Groups Projects
Commit fbb4e595 authored by Alberto LIVIO BECCARIA's avatar Alberto LIVIO BECCARIA
Browse files

Aggiunto controllo sull'esistenza dell'immagine del disco anche in vm-start

parent f431e573
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,12 @@ vbox_attach_medium () {
local disk_img=$1
local port_num=$2
local disk_type=$3
# check if disk image exists, otherwise abort
if [[ ! -f "${disk_img}" ]]; then
echo
echo "${ERROR}Disk image ${BOLD}${disk_img}${NORMAL}${ERROR} does not exist on this computer. Abort. Bye!${NORMAL}"
exit 0
fi
echo "Attaching disk ${port_num}..."
VBoxManage modifyhd "${disk_img}" --type ${disk_type}
vboxmanage storageattach "${VM_NAME}" --storagectl "${STORAGE_CONTROLLER_NAME}" --port ${port_num} --device 0 --type hdd --medium "${disk_img}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment