I have a Vagrant file like this
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.box_check_update = false
config.vm.provider "virtualbox" do |vb|
vb.memory = "8192"
vb.cpus = "2"
end
config.vm.provision "shell", path: "install.sh"
end
Th final script called is :
cp /conf/pgsql/pg_hba.conf /home/vagrant/pg_hba.conf
Arborescence is ok :
When i launch vagrant up --provision i can see that my file is not copied, the synced folder "/vagrant/conf" seems to be unavailable
I'm using last version of Vagrant, on Windows 10
"Hard" solution :
Uninstall Vagrant
Remove all folders ".vagrant.d" and "VirtualBox" in "C:\Users\MyUser"
Download latest version of Vagrant
vagrant up
vagrant plugin install vagrant-vbguest
vagrant reload
Done.
Related
I'm new to Vagrant
I've installed vagrant and vagrant box for ubuntu/xenial64 on my ubuntu machine. (Ubuntu box on Ubuntu host OS)
Inside the vagrant box, I installed openjdk-8, firefox, jenkins.
How do I access the firefox browser UI which is installed in the Vagrant box so that I can have access jenkins server.
After entering into box using vagrant ssh, When I type firefox in vagrant box, it is saying
Error: GDK_BACKEND does not match available displays
Same thing's happening when I try sudo firefox
Here is my vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network :private_network, ip: "192.168.68.8"
end
Vagrant starts VMs in headless mode per default. You can configure it to start with a display by adding this to your Vagrantfile:
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
Then restart the VM.
vagrant reload
When I execute command Vagrant up its opening hashicorp/precise32 box in command prompt mode even I had mentioned gui = true.
Can we able to access this box/machine in graphical mode/terminal and if yes then what do need to configure.
Vagrantfile -
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.omnibus.chef_version = :latest
config.vm.provision :chef_client do |chef|
chef.provisioning_path = "/etc/chef"
... ...
... ...
end
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
vb.cpus = 1
end
end
Thanks!
The base box that you're using is Ubuntu Server and does not have a desktop environment. So you'll need to install one...
Make sure you have the VirtualBox Extension Pack installed (download here). Then update your Chef provisioning to install the ubuntu-desktop metapackage and try a vagrant provision command (or vagrant up if your box isn't created yet). Provisioning is likely to take a while because Chef will be installing hundreds of packages. Alternatively you could install the xfce4 metapackage instead of ubuntu-desktop. XFCE is much smaller. You may need to vagrant halt and vagrant up in order to get the GUI to launch.
It's my first question I've asked here, but I've been a long time reader of Stack Overflow.
I use Vagrant with VirtualBox to handle the server configurations of the several projects I'm working on. I've used VirtualBox and Ubuntu Mate for the last few months without any problems. But I've changed my hard drive yesterday and I had to reinstall Ubuntu Mate 15.04.
I've installed the build-essential package, VirtualBox 5.0 from the x64 package found on VirtualBox's website and Vagrant from Vagrant's website. I've pulled my old VagrantFile from GIT and relaunched the machine. Vagrant pull the correct image, as expected, but once the VM is running in VirtualBox, Vagrant can't ssh into it.
I used VirtualBox's interface to get into the guest's shell, and found that I could not access any network. Even VirtualBox auto-update tool cannot connect to the internet. I get the message :
The network operation failed with the following error: Unknown reason
I've formated my computer several times using different versions/flavors of Ubuntu to no avail. I've also rolled back to previous versions of VirtualBox, but no luck either. I've manually installed a guest with VirtualBox and the network is not working either.
I've did several searches on Google and Stack Overflow for similar problems, but the closest matches were for Windows 10 issues. But neither the host or the guest is running Windows.
My computer/os configuration is the same as before yesterday, except for the drive change. I don't understand why it isn't working as before.
Here's my VagrantFile if it can help you :
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty32"
config.vm.network "private_network", ip: "192.168.33.15"
config.vm.network "public_network", ip: "10.1.1.207", bridge: "p4p1"
config.ssh.forward_agent = true
config.vm.synced_folder "src/", "/var/www/project",
owner: "www-data", group: "www-data"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.provision "shell", path: "bin/shellprovider.sh"
end
Any help or any hint would be greatly appreciated.
Regards,
Eric Lacasse
I am running vagrant on Ubuntu 14.04 and have problem with running windows box http://aka.ms/vagrant-xp-ie8 .
After sudo vagrant up, i constantly see
Waiting for machine to boot. This may take a few minutes...
I ran 'vagrant up --debug 2>log' , and it looks like
this
Vagrant.configure(2) do |config|
config.vm.box = "http://aka.ms/vagrant-xp-ie8"
config.winrm.username = 'IEuser'
config.winrm.password = 'Passw0rd!'
config.vm.communicator = "winrm"
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
end
Do you have idea how to fix this?
I've had similar issues when setting up Windows guest VMs. I was using the IE11/Win7 VM from http://modern.ie.
Installing the latest version of the VirtualBox guest additions resolved it for me under OSX. Under Windows, I also turned on hardware virtualization in my BIOS.
I am working on a CentOS 7 virtual server with Vagrant 1.6.5.
I have a shell "bootstrap.sh", where I want to make a symbolic link
for PhpMyAdmin like so:
sudo ln -s /usr/share/phpMyAdmin /usr/share/nginx/html
I noticed there were problems with symbolic links with Virtual Box.
I am using Virtual Box version 4.3.16. So I placed this in my Vagrantfile:
config.vm.box = "centos"
config.vm.provider "virtualbox" do |vb|
vb.name = "centos"
#Enable symbolic linking
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/centos", "1"]
end
After I hit "vagrant up" and when I check
"/usr/share/nginx/html" there are none symbolic links.
When I restart the virtual CentOS machine and do the same:
sudo ln -s /usr/share/phpMyAdmin /usr/share/nginx/html
I am able to make a symbolic link, but I want to do that when I typ
"vagrant up" offcourse. I also tried installing the vbguest plugin (without config) from:
https://github.com/dotless-de/vagrant-vbguest
How can I make it work when I typ "vagrant up"?