Created
February 10, 2018 04:30
-
-
Save pkutzner/bb81550da8f83862d28f6e2d4a758de1 to your computer and use it in GitHub Desktop.
Attach ISO image to VirtualBox headless guest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -lt 2 ]]; then | |
echo "Usage $0 'VM_NAME' /path/to/image.iso" | |
exit 1 | |
fi | |
VMNAME="$1" | |
ISOIMAGE="$2" | |
sudo -u vbox vboxmanage storageattach "$VMNAME" --storagectl "IDE" --port 1 --device 0 --type dvddrive --medium "$ISOIMAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment