Hi everybody,
I'm getting quite out of ideas.
I use Windows 7 as host, VirtualBox 5.1,30, Vagrant 2.0.1 and try to get a debian 8 (jessie64) running.
And I've got the problem that the synced folders never update. When the provision is done, the files are up-to-date, but when changing the files while vagrant is up nothing happens.
However when I run vagrant rsync-auto it's working, but just for changes made by the host. If the vm is writing some logfiles or so they get immidiately deleted and chown changes (tmp/log folder set to www-data) are reverted to vagrant as well.
I didn't find any working solutions in the web, so I hope you can help me here.
What I did so far:
Installed VirtualBox
Installed Vagrant
Updated PowerShell to version 5
Created this VagrantFile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/jessie64"
config.vm.synced_folder ".", "/vagrant", type: "rsync"
config.vm.synced_folder "../d300-admin", "/var/www/d300-admin", type: "rsync"
config.vm.network :private_network, ip: "192.168.56.101"
config.vm.provision "shell", inline: <<-SHELL
DBPASSWD=root
apt-get update
apt-get install -y apache2
apt-get install -y php5
apt-get install -y php5-mysql
apt-get install -y php5-xdebug
debconf-set-selections <<< "mysql-server mysql-server/root_password password $DBPASSWD"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $DBPASSWD"
apt-get install -y mysql-server
debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"
debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password $DBPASSWD"
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password $DBPASSWD"
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $DBPASSWD"
debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect none"
apt-get -y install mysql-server phpmyadmin
sudo cp /vagrant/vhosts/* /etc/apache2/sites-enabled
service apache2 restart
SHELL
end
I also installed cygwin (although I'm not sure what to do with this) and tried some Apache with EnableSendFile off and so on (reverted it as I guess this isn't the issue). All in all the installation is working, beside the sync problem.
Here's the vagrant up log - has it something to do with the missing guest auditions?
PS D:\workspace\vagrant> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'debian/jessie64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
==> default: Rsyncing folder: /cygdrive/d/workspace/vagrant/ => /vagrant
==> default: Rsyncing folder: /cygdrive/d/workspace/d300-admin/ => /var/www/d300-admin
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
Thx in advance!
Christian
P.S. I tried debian 7 before as well - same behaviour