Reputation: 12900
I need to create virtual machine with some installed packages. This virtual machine shoud provide GUI. I tried to do it like described there.
But achieve strange result. I see plain console window in virtualbox application when it opens.
My vagragantfile is simple:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure("2") do |config|
# Use a basic trusty desktop image from git://github.com/zyga/vagrant-destop-images.git
config.vm.box = "trusty-desktop-i386"
# TODO: offer premade images for download
config.vm.box_url = ""
# Tweak VirtualBox configuration for GUI applications
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 1024]
vb.customize ["modifyvm", :id, "--vram", 64]
vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
end
# Automatically use local apt-cacher-ng if available
if File.exists? "/etc/apt-cacher-ng"
# If apt-cacher-ng is installed on this machine then just use it.
require 'socket'
guessed_address = Socket.ip_address_list.detect{|intf| !intf.ipv4_loopback?}
if guessed_address
config.vm.provision :shell, :inline => "echo 'Acquire::http { Proxy \"http://#{guessed_address.ip_address}:3142\"; };' > /etc/apt/apt.conf.d/00proxy"
end
end
# Update to have the latest packages, remove if you don't need that
config.vm.provision :shell, :inline => "apt-get update"
config.vm.provision :shell, :inline => "DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade --yes"
# Ready :-)
end
Can somebody provide a working example of using vagrant with UI?
Upvotes: 5
Views: 6247