Skip to content

Instantly share code, notes, and snippets.

@mikesmullin
Created January 12, 2014 18:28
Show Gist options
  • Save mikesmullin/8388448 to your computer and use it in GitHub Desktop.
Save mikesmullin/8388448 to your computer and use it in GitHub Desktop.
virtualbox vboxmanage commands equivalent to vagrant (or even better, borg)
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" help import
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list natnets
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showvminfo "sfs01"
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list dhcpservers
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork stop -t NatNetwork
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork start -t NatNetwork
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" dhcpserver add --netname xm_slc_routed --ip 172.16.2.1 --netmask 255.255.0.0 --lowerip 172.16.2.4 --upperip 172.16.2.254 --enable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" dhcpserver modify --netname xm_slc_routed --ip 172.16.0.1 --netmask 255.255.0.0 --lowerip 172.16.0.4 --upperip 172.16.0.254 --enable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" dhcpserver remove --netname xm_slc
# create natnetwork
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork add -t xm_slc -n "172.16/16" -e -h on
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" setextradata global "NAT/xm-slc/SourceIp4" 172.16.0.1
# nic type: unassigned
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "sfs01" --nic1 null --cableconnected1 off
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "sfs01" --nic2 null --cableconnected2 off
# nic type: natnetwork
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "sfs01" --nic2 natnetwork --nat-network2 xm_slc --cableconnected2 on
# nat port forward
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork modify -t xm_slc -p "ssh:tcp:[]:22:[172.16.0.69]:22"
# regular port forward
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "sfs01" --natpf2 ",tcp,,22,,22202"
# delete natnetwork
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork remove -t xm_slc
@mikesmullin
Copy link
Author

@mikesmullin
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment