Last active
October 18, 2019 02:00
-
-
Save prehensilecode/236be151935fc57c94538b5f51e98664 to your computer and use it in GitHub Desktop.
VirtualBox commandline cheat sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start a guest in headless mode | |
vboxmanage startvm guestvmname --type headless | |
# add a nic (number 2) to guest, setting it to be on the host-only network, and make it a virtio device | |
vboxmanage modifyvm guestvmname --nic2 hostonly --nictype2 virtio --hostonlyadapter2 vboxnet0 | |
# remove nic number 2 | |
vboxmanage modifyvm guestvmname --nic2 none | |
# turn on host i/o cache - needed for the virtual disk on ext4 on older kernels | |
vboxmanage storagectl guestvmname --name SATA --hostiocache on | |
# enable dhcp server on the host-only network | |
vboxmanage dhcpserver add --ifname vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.11 --upperip 192.168.56.200 --enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment