1 #!/bin/bash
   2 
   3 [[ $# == 0 ]] &&
   4 for i in /dev/sd[a-z]; do
   5     echo $i
   6     vboxmanage internalcommands listpartitions \
   7     -rawdisk $i
   8     echo
   9 done
  10 
  11 for i in "$@"; do
  12     vboxmanage internalcommands createrawvmdk \
  13     -rawdisk $i -filename ${i##*/}.vmdk
  14 done
[raw]