Skip to content

Instantly share code, notes, and snippets.

@ahnbizcad
Last active June 11, 2017 19:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ahnbizcad/a62dfc0ea7c94e5b31286dc548210c1f to your computer and use it in GitHub Desktop.
VirtualBox spin up steps

Guide to set up a VM instance. Execute sequentially.

Obtain required programs

scope: WEB

Install VirtualBox

scope: host OS (assumes Windows 10)

  • click through install wizard with default settings Allow computer to be woken up by a magic packet so that if the host goes to sleep, then the guest won't permanently lose networking capability
  • device manager > network adapters > {select the network adapter the particular VM uses > right click > properties > only allow a magic packet to wake the computer: true (Due to bug in VirtualBox where VM loses network capability, this, in part, helps.)

scope: Virtualbox/create virtual machine

  • Name: {vm_name}
  • (doesn't matter. it will be overwritten by bootable image OS) Type: Linux
  • (doesn't matter. it will be overwritten by bootable image OS) Version: Ubuntu
  • (omakase) Memory Size quarter to half of host's
  • "Create a virutal hard disk now"

scope: Virtualbox/create virtual disk now

  • File location: {host_vm_instance_folder}
  • VDI
  • (omakase) Dynamically allocated
  • (omakase) File size: 32.00 GB (If the opportunity to select here was missed or if modifications are needed after VM listing is created, go to VirtualBox > VM instance > right click > settings > storage > controller SATA > Add hard disk > create new disk > Expert mode in folder: {host_vm_instance_folder} )

scope: Virtualbox/(VM instance listing)/(right-click)/settings

  • general > advanced > shared clipboard: bidirectional
  • general > advanced > drag'n'drop: bidirectional
  • general > advanced > snapshot folder: {host_vm_instance_folder}\Snapshots (create a shortcut in host machine to this folder)
  • system > processor > processors: (omakase) greater_of(n/2, 1)
  • (omakase) system > processor > execution cap: 95%
  • display > video memory: (max)
  • display > enable 2d video acceleration: on
  • storage: remove IDE controller. Use SATA controller for images
  • network > attached to: bridged
  • network > promiscuous mode: VMs only (Due to bug in VirtualBox where VM loses network capability, this, in part, helps.)

scope: Virtualbox

  • run VM

scope: VM instance

  • (omakase) select startup disk - select Linux OS image here (If the opportunity to select here was missed, specify in VirtualBox > VM listing > right click > settings > storage
    • (omakase) controller SATA add optical drive: downloaded OS image (xubuntu)
    • delete other controller if it is listed as having priority over the chosen controller )

scope: VM instance/Xubuntu setup wizard

  • English
  • click Install xUbuntu
  • install updates while downloading: true
  • erase disk and install xubuntu: true
  • install now
  • select timezone
  • pick root user name
  • pick VM linux computer name (if using for production, encrypt /home folder: true)
  • click restart
  • press enter to resume

install guest additions (enables features: seamless mode, shared folders, clipboard, etc.)

scope: VM instance

  • Devices > Insert Guest Additions CD Image
  • restart
  • open folder of gues additions image. one will be created on the desktop, or there will be a popup.
  • run the following file with sudo: sudo sh ./VBoxLinuxAdditions.run
  • restart by doing a full shut down and spin up. (should now be able to press right_ctrl + L for seamless mode. The mounted controller image will be VBoxGuestAdditions.iso)

set up shared folder (requires guest additions to have been installed)

scope: VirtualBox

  • VBox instance > shared folders > (click) add new folder icon
  • (omakase) select windows path: C:\Users{host_username}\VirtualBox VMs{vm_name}{linux_shared_folder_name} read only: false auto mount: true make permanent: true add your linux user to the vboxsf group vboxsf is the default group name
  • sudo usermod -a -G vboxsf {guest_linux_user}
  • shut down and restart guest the sf_{linux_shared_folder_name} will be visible under /media folder create symlink of the shared folder under the linux user home directory sudo ln -s /media/sf_{linux_shared_folder_name} $HOME/{symlinked_linux_shared_folder_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment