When I run
vagrant up using VirtualBox as a provider, it creates a logfile called
ubuntu-xenial-16.04-cloudimg-console.log in the project root. This causes difficulty with PHPStorm, as it doesn't have an option to exclude individual files from search, only folders.
I would like to have this logfile created in the
_log directory instead, but I cannot find how to configure its location; there doesn't seem to be anything in the Vagrantfile documentation, and I can't find an option in the VirtualBox GUI.
I've also tried symlinking the file to /dev/null, but VirtualBox refuses to even start if the link is there. I can't simply delete the file while the VM is up, as it holds a lock on it.
A simplified version of the
Vagrantfile is below:
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" config.disksize.size = "10GB" config.vm.network "forwarded_port", guest: 80, host: 80, host_ip: "127.0.0.1" config.vm.network "forwarded_port", guest: 3306, host: 3306, host_ip: "127.0.0.1" config.vm.synced_folder ".", "/var/www/html" config.vm.provider "virtualbox" do |vb| vb.gui = false vb.memory = "2048" end config.vm.provision "shell", inline: <<-SHELL # redacted SHELL end
How can I change the log location? Or, if that's possible, how can I prevent it from being generated in the first place?