Skip to content

Instantly share code, notes, and snippets.

@WanpengQian
Created March 28, 2016 07:17
Show Gist options
  • Save WanpengQian/c60a7f14850cb2fd2562 to your computer and use it in GitHub Desktop.
Save WanpengQian/c60a7f14850cb2fd2562 to your computer and use it in GitHub Desktop.
VBoxManage createvm --name gateway --ostype Debian --register
VBoxManage modifyvm gateway --memory 256 --ioapic on --cpus 1 --chipset ich9 --nic1 bridged --nictype1 82540EM --bridgeadapter1 em1
VBoxManage storagectl gateway --name "SATA Controller" --add sata --controller IntelAhci --portcount 4
VBoxManage createhd --filename gateway.vdi --size 40960
VBoxManage storageattach "gateway" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium gateway.vdi
VBoxManage storagectl gateway --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach gateway --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/qianwanpeng/debian-8.3.0-i386-CD-1.iso
VBoxManage modifyvm gateway --vrdeport 5900
VBoxHeadless --startvm gateway
VBoxManage modifyvm gateway --boot1 disk
VBoxHeadless --startvm gateway
VBoxManage controlvm gateway acpipowerbutton
# this is required for networking (replaces loading remaining modules manually)
vboxnet_enable="YES"
# start VirtualBox
vboxheadless_enable="YES"
# VMs to start (whitespace-separated list):
vboxheadless_machines="gateway"
# definition for VM with acronym "gateway":
vboxheadless_gateway_name="gateway"
vboxheadless_gateway_user="carsten"
vboxheadless_gateway_flags=""
vboxheadless_gateway_stop="acpipowerbutton"
service vboxheadless start gateway
service vboxheadless stop gateway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment