Skip to content

Instantly share code, notes, and snippets.

@remulocosta
Created January 11, 2020 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remulocosta/545a072ec7d6850cf6b8b3ad82b2e61f to your computer and use it in GitHub Desktop.
Save remulocosta/545a072ec7d6850cf6b8b3ad82b2e61f to your computer and use it in GitHub Desktop.
#HD All Partitions
VBoxManage internalcommands createrawvmdk -filename "<path file name>.vmdk" -rawdisk /dev/disk
#HD Indicated Partitions
VBoxManage internalcommands createrawvmdk -filename "<path file name>.vmdk" -rawdisk /dev/disk2 -partitions 1,2,3,4
#Permissions to file and device
#file
chmod 777 "path file name.vmdk"
#device
chmod 777 /dev/diskX
#partition device
chmod 777 /dev/diskXsX
#resize virtualHD: create new vhd end clone old to new
VBoxManage clonehd "./old-hd.vhd" "./new-hd.vdi" --existing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment