Here are some tips for virtual box.
Minimize VirtualBox’s VM Space
Defrag
Linux guest machine:
1 | $ sudo dd if=/dev/zero of=/EMPTY bs=1M |
Windows guest os (using Sysinternals Suite):
1 | sdelete –z c: % or other drive % |
Compress Disk
for VDI file:
1 | $ VBoxManage modifyhd xxx.vdi --compact |
but for Vmware’s VMDK file:
1 | $ VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi |
or
1 | vmware-vdiskmanager -k disk.vmdk |
Install MacOS Virtual Machine
See Here to get the complete process of operation.
Download the ISO image of macOS first.
Contact me if you want ISO of macOS High Sierra.
Create a Machine
Create a new macOS virtual machine, which is supported in VirtualBox by default.
Bigger video memory, more processor cores and larger storage are needed.
After the Creation
After creating virtual disk, run VBoxManage commands before booting macOS virtual machine
High Sierra:
1 | # 'macOS' is your vm's name |
Mojave:
1 | $ VBoxManage modifyvm macOS --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff |
Resolution Configuration
When booting up, you will find the resolution not fitting.
Configure resolution:
1 | $ VBoxManage setextradata macOS CustomVideoMode1 1366x768x32 |
More in Fix VirtualBox macOS High Sierra Screen Resolution (1920×1080 – 4K – 5K) and How to Fix macOS Sierra Screen Resolution on VirtualBox?
Others
In Mac OS some root
users are still limited to do some operations. Reboot to enter recovery
mode (command + r) and:
1 | $ csrutil disable # `csrutil enable` to recovery |
to let users edit some key files.