Migrate existing Mac installation to VirtualBox

It's completely legal if the host is also a Mac.

Use a disk cloning software (AFAIK CarbonCopyCloner/Superduper or anything else like that, not my area). It should be able to export to ISO. This command will apparently turn it into a virtualbox hard drive.

VBoxManage convertfromraw /path/to/output/disk-image.iso /path/to/output/disk-image.vdi

Source