Skip to content

Instantly share code, notes, and snippets.

@pestophagous
Created February 19, 2020 20:55
Show Gist options
  • Save pestophagous/8f7809f1895f280533c6cb0a6d0f1684 to your computer and use it in GitHub Desktop.
Save pestophagous/8f7809f1895f280533c6cb0a6d0f1684 to your computer and use it in GitHub Desktop.
quick linux gui vm environment, ubuntu 16 or 18
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# For reference, please see the online documentation at
# https://docs.vagrantup.com.
# search at https://vagrantcloud.com/search.
config.vm.box = "kelly219design/ubuntu-18.04-gui-desktop-base"
# for xenial:
#config.vm.box = "kelly219design/ubuntu-xenial-16.04-gui-desktop-base"
# Need bigger disk like so. Otherwise installing desktop is a strain.
config.disksize.size = "30GB" # vagrant plugin install vagrant-disksize
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.memory = 8*1024
vb.cpus = "4"
vb.customize [
# https://superuser.com/questions/1354068/how-can-i-relocate-or-disable-the-virtualbox-logfile-when-starting-a-vm-from-vag
"modifyvm", :id, "--uartmode1", "file",
File.join(Dir.pwd, "ubuntu-gui-console.log")
]
# better to just do these things using the virtualbox gui
#vb.customize ['modifyvm', :id, '--clipboard', 'bidirectional']
end
## Add this back if you have a playbook you wish to run:
#config.vm.provision :ansible do |ansible|
# ansible.playbook = "playbook.yml"
# ansible.extra_vars = { ansible_python_interpreter:"/usr/bin/python3" }
# ansible.verbose = "vvv"
#end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment