Ubuntu & Virtualbox

Ubuntu 16.04 (kernel 4.14), Virtualbox

I was trying to install Oracle VirtualBox either from their repo or from the Ubuntu repo but both failed to compile the Kernel Module.

I tried various guides before actually reading the error log whereupon I found the “libelf-dev” package was required (at least for installing virtualbox-5.2 from Oracle directly!).

Hardware MAC OSX

Oracle Virtual Box Mac OSX Physical Disk Attachment

1. Get the identity of the physical disk using
“diskutil list”
from the command line. Usually it’s named “System” if booting from an OSX Live USB drive

2. Unmount the physical disk from the system

3. From terminal create a holding VMDK file for Virtualbox to communicate with the physical disk through by:
“sudo VBoxManage internalcommands createrawvmdk -filename <<DIR/FILE.vmdk>> -rawdisk /dev/disk<<#>>”

4. Correct permissions on both the physical disk and the file you created, something like:
“sudo chmod 777 /dev/disk<<#>>”
“sudo chown <<group>>:<<user>> <<DIR/FILE.vmdk>>”
“sudo chmod 770 <<DIR/FILE.vmdk>>”

5. Launch Virtualbox, create a new DOS VM and attach a SATA Controller and then the new VMDKfile as a SATA disk

6. From Virtualbox “File>Virtual Media Manager”, modify the <<DIR/FILE.vmdk>> so that it’s set as a “writethrough” disk

7. Then attach the desired boot cd to the VM and ensure the boot order is correct

8. Start the VM!