Use Bitnami stacks with headless VirtualBox

NOTE: The steps below require the VMDK version of the Bitnami virtual machine.

Bitnami stacks can also be used with VirtualBox running in headless mode. To do this, follow the steps below on your VirtualBox host:

  • Convert the VMDK file for the Bitnami stack into a VirtualBox Disk Image (VDI) file:

    $ VBoxManage clonehd --format VDI bitnami-APP-VERSION.vmdk myserver.vdi
  • Create and register a new virtual machine.

    $ VBoxManage createvm --name "My Server" --ostype "Ubuntu_64" --register

    It is important to choose the correct operating system type when doing this. For a complete list of available operating system types, use the command below:

    $ VBoxManage list ostypes
  • Add a storage device and attach the VDI file created earlier to it.

    $ VBoxManage storagectl "My Server" --name "SATA Controller" --add sata --controller IntelAHCI
    $ VBoxManage storageattach "My Server" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium myserver.vdi
  • Define other characteristics of the virtual machine, such as the boot device, available RAM and network interfaces. The commands below are illustrative only and will need to be modified for your specific hardware devices. For more information on how to configure your virtual machine with VBoxManage, please refer to the VirtualBox manual.

    $ VBoxManage modifyvm "My Server" --ioapic on
    $ VBoxManage modifyvm "My Server" --boot1 disk --boot3 none --boot4 none
    $ VBoxManage modifyvm "My Server" --memory 512 --vram 64
    $ VBoxManage modifyvm "My Server" --nic1  bridged --bridgeadapter1 "11b/g Wireless Adapter"
  • Start the virtual machine in headless mode:

    $ VBoxHeadless --startvm "My Server"

The virtual machine will be accessible using RDP. You can use any RDP viewer to connect and work with the virtual machine. For more information on available RDP viewers for your host platform and how to connect, refer to the VirtualBox manual.

TIP: When connecting to your headless VirtualBox machine with an RDP client, remember to use the IP address of the host system and not the VirtualBox machine.

Last modification September 5, 2018