sudo VBoxManage internalcommands createrawvmdk -filename /path/to/d.vmdk -rawdisk /dev/nvme0n1 -partitions 5 -relative |
But, non-root user will be blocked as VERR_ACCESS_DENIED, resolve it like link below,
sudo usermod -a -G disk $USER |
we must reboot to make it into effect.
Well, we need to know it is very unsafe.
refer to:
https://superuser.com/questions/451573/use-virtualbox-to-boot-a-physical-drive-partition
ILMostro_7 at https://unix.stackexchange.com/questions/284704/verr-access-denied-when-trying-to-add-a-raw-disk-to-virtual-box