VBoxManage is a great tool, but it’s really too powerful to have such a weakly organized
Plus, recent VirtualBox versions have a subtly different syntax for common operations, and you may find several ways to perform a basic task depending on the version the post you find is talking about.
So, in order to mount a CD or DVD image while your VM is running (headless or not it doesn’t really matter… obviously if it is headless you have no choice) you have to type the following:
VBoxManage storageattach "your VM name" --storagectl 'Controller IDE' --port 1 --device 0 --type dvddrive --medium /path/to/your/iso/image.iso
Remember to escape your VM name in case it has whitespaces! Of course you may use uuids instead of names and you may attach hdds, fdds and specify whatever option you want. Just type
by itself to see the specific help with all the info you need.