IT notes

vbox headless

To list your vms: $ VBoxManage list vms To run one in headless mode: $ VBoxManage startvm freebsd-server --type headless To shutdown: $ VBoxManage controlvm freebsd-server acpipowerbutton To get the IPv4: $ VBoxManage guestproperty enumerate freebsd-server | awk '/IP/' for this to work you will need the vboxguest tools pkg install virtualbox-ose-additions


Convert from RAW to VDI When creating custom “RAW” images using mkimg they can be use in VirtualBox by converting them to “VDI” format, example: $ VBoxManage convertfromraw ec2.raw ec2.vdi --format VDI Converting from raw image file="ec2.raw" to file="ec2.vdi"... Creating dynamic image with size 3221292544 bytes (3073MB)... Once the image is in “VDI” format it can be resized using: $ VBoxManage modifyhd ec2.vdi --resize 8192 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% The above command will resize the image to 8GB.


When trying to install Virtualbox in OS X El capitan you may notice it hangs at Verifying “VirtualBox.pkg”. You can by pass the warning trying to install via command line with: $ sudo installer -package /Volumes/VirtualBox/VirtualBox.pkg -target /