*nohtml*

local/bin/vbox-vmdk

   1 #!/bin/bash
   2 
   3 [[ ! $@ ]] &&
   4 for i in /dev/sd?; do
   5     echo "* $i"
   6     vboxmanage internalcommands listpartitions -rawdisk $i | sed 's/^/  /'
   7     echo
   8 done 2>&-
   9 
  10 for i in "$@"; do
  11     vboxmanage internalcommands createrawvmdk -rawdisk $i -filename ${i##*/}.vmdk
  12 done