Wrote most of the code to attach raw disks to a VM. Delete VM under more circumstances. Increase logging of CLI success. Clean up raw disk VMDKs on exit.
Run all VirtualBox commands as sudo. Attach raw disk as 'hdd', not 'dvddrive', which makes it actually attach.