3 echo "Removing ISO image from \"$1\""
4 VBoxManage storageattach "$1" --storagectl IDE-Controller --port 1 --device 0 --type dvddrive --medium emptydrive
9 echo "usage: $0 NAME [ABSOLUTE-PATH-TO-INSTALL-ISO-IMAGE]"
16 echo Creating VM \"$NAME\" with ISO image \"$ISO\" ...
18 echo VBoxManage -q createvm --name "$NAME" --register
19 VBoxManage -q createvm --name "$NAME" --register
20 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi
22 echo VBoxManage -q modifyvm "$NAME" --memory 1024 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 net0
23 VBoxManage -q modifyvm "$NAME" --memory 1024 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 net0
24 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi
26 echo VBoxManage -q createhd --filename "/mnt/daten/Daten/vbox/$NAME.vdi" --size 20000
27 VBoxManage -q createhd --filename "/mnt/daten/Daten/vbox/$NAME.vdi" --size 20000
28 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi
30 echo VBoxManage -q storagectl "$NAME" --name "IDE-Controller" --add ide
31 VBoxManage -q storagectl "$NAME" --name "IDE-Controller" --add ide
32 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi
34 echo VBoxManage -q storageattach "$NAME" --storagectl "IDE-Controller" --port 0 --device 0 --type hdd --medium "/mnt/daten/Daten/vbox/$NAME.vdi"
35 VBoxManage -q storageattach "$NAME" --storagectl "IDE-Controller" --port 0 --device 0 --type hdd --medium "/mnt/daten/Daten/vbox/$NAME.vdi"
36 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi
38 echo VBoxManage -q storageattach "$NAME" --storagectl "IDE-Controller" --port 1 --device 0 --type dvddrive --medium "$ISO"
39 VBoxManage -q storageattach "$NAME" --storagectl "IDE-Controller" --port 1 --device 0 --type dvddrive --medium "$ISO"
40 if [ $? -ne 0 ] ; then echo "Error!" ; exit 1 ; fi