[download]

local/bin/vbox-disk

   1 #!/bin/bash
   2 
   3 [[ ! $@ ]] && lsblk -npo name,label,model | column -t
   4 
   5 for i in "$@"; do
   6     d=/dev/${i##*/} n=$(lsblk -no model $d)
   7     vboxmanage internalcommands createrawvmdk -rawdisk $d -filename "$n".vmdk
   8 done