A few months ago, we wrote up directions for setting up a headless VirtualBox in Ubuntu 10.04. Of course, we use VBox all the time and a few weeks ago setup a fresh install of BackTrack 4. Since a lot of folks have read our previous HOWTO, I thought we’d just just give a quick copy of the command we wrote. Refer to the previous article for more explanation.
- VBoxManage createvm –name BT4 –ostype Ubuntu –register
- VBoxManage modifyvm BT4 –memory 2048 –acpi on –boot1 dvd –nic1 bridged –usb on –usbehci on –vrdp on –vrdpport 3399 –clipboard bidirectional –pae on –hwvirtex on –hwvirtexexcl on –vtxvpid on –nestedpaging on –largepages on
- VBoxManage modifyvm BT4 –bridgeadapter1 eth0
- VBoxManage storagectl BT4 –name “IDE Controller” –add ide
- VBoxManage createvdi -filename “/opt/vbox/HardDisks/BT4.vdi” -size 20000 -register
- VBoxManage storageattach BT4 –storagectl “IDE Controller” –port 0 –device 0 –type hdd –medium /opt/vbox/HardDisks/BT4.vdi
- VBoxManage storageattach BT4 –storagectl “IDE Controller” –port 1 –device 0 –type dvddrive –medium /home/teull/Downloads/bt4-final.iso
- VBoxHeadless -startvm BT4 -p 3390 &
Then connect, run first option, from # prompt type startx and then run the installer. After complete, shutdown OS, then eject DVD:
- VBoxManage storageattach BT4 –storagectl “IDE Controller” –port 1 –device 0 –type dvddrive –medium none
Start VM again:
- VBoxHeadless -startvm BT4 -p 3390 &
And it’s now happy penTesting time!

