Need help: Filesync doesn't work with Windows 7 as host

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help: Filesync doesn't work with Windows 7 as host

Christian Lorenz
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 address: 127.0.0.1:2222
    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:
==> default: Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports

Thx in advance!
Christian

P.S. I tried debian 7 before as well - same behaviour

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9bdb1772-a1cd-412e-86db-b5925ea9bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Need help: Filesync doesn't work with Windows 7 as host

Alvaro Miranda Aguilera
hello

if you are using rsync or the box you use defaults to rsync then that follow 2 rules

- copy is host to VM
- once at provisioning

then if you do changes, you can either rsync manually or try something like rsync auto.

if this is happening, is all good.

what is not working that you think should be working?

Alvaro.


On Tue, Nov 28, 2017 at 5:39 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
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 address: 127.0.0.1:2222
    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:
==> default: Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports

Thx in advance!
Christian

P.S. I tried debian 7 before as well - same behaviour

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9bdb1772-a1cd-412e-86db-b5925ea9bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyhx60NU1sQuoxxWBmW5e%2BFQTSahVcU-D-hguxACL00JA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Need help: Filesync doesn't work with Windows 7 as host

Christian Lorenz
Well it‘s the first time I have to setup a vagrant machine on my own (I‘m a freelancer working for different companies). But the times where I just had to use an already working one, I never had problems with my Mac, that when I made changes in a file and save it, the folders didn’t sync - just by vagrant up and let it go. 

Now they don’t do it - or just after a provision (and you don’t want to provision each time you changed some code and try to test it). And also you got the changes on files altered by the vm on host. This doesn’t happen here...

But what do you mean with: copy is host to vm?

Am 28.11.2017 um 18:21 schrieb Alvaro Miranda Aguilera <[hidden email]>:

hello

if you are using rsync or the box you use defaults to rsync then that follow 2 rules

- copy is host to VM
- once at provisioning

then if you do changes, you can either rsync manually or try something like rsync auto.

if this is happening, is all good.

what is not working that you think should be working?

Alvaro.


On Tue, Nov 28, 2017 at 5:39 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
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 address: 127.0.0.1:2222
    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:
==> default: Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports

Thx in advance!
Christian

P.S. I tried debian 7 before as well - same behaviour

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9bdb1772-a1cd-412e-86db-b5925ea9bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/7rZf9A0hBA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyhx60NU1sQuoxxWBmW5e%2BFQTSahVcU-D-hguxACL00JA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/A237DA72-CADF-4C9C-A14D-DD4C690B8DF5%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Need help: Filesync doesn't work with Windows 7 as host

Alvaro Miranda Aguilera
by default if you are using virtualbox, vagrant will use virtualbox shared folder.

this will mount a folder from the host in the VM and the files are are placed there will be availabe in the host and the VM.

This works fine for most of the use cases.

the configuration you did share, uses rsync that means on vagrant up a folder will be copied FROM the host To the VM.

say your host is a mac machine and your vm is the debian it will copy a folder using rsync.

if you do changes to those files in the guest, they wont be copied back to the host

if you you do changes to those files in the host, they won't be updated in the guest

this is the out of the box experience with rsync.



can you test a different box?

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise64
vagrant up

that should set a VM with the default shared folder

if that is what you want, then you can check other boxes that use virtualbox fs instead of rsync.

Alvaro.

On Tue, Nov 28, 2017 at 6:51 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
Well it‘s the first time I have to setup a vagrant machine on my own (I‘m a freelancer working for different companies). But the times where I just had to use an already working one, I never had problems with my Mac, that when I made changes in a file and save it, the folders didn’t sync - just by vagrant up and let it go. 

Now they don’t do it - or just after a provision (and you don’t want to provision each time you changed some code and try to test it). And also you got the changes on files altered by the vm on host. This doesn’t happen here...

But what do you mean with: copy is host to vm?

Am 28.11.2017 um 18:21 schrieb Alvaro Miranda Aguilera <[hidden email]>:

hello

if you are using rsync or the box you use defaults to rsync then that follow 2 rules

- copy is host to VM
- once at provisioning

then if you do changes, you can either rsync manually or try something like rsync auto.

if this is happening, is all good.

what is not working that you think should be working?

Alvaro.


On Tue, Nov 28, 2017 at 5:39 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
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 address: 127.0.0.1:2222
    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:
==> default: Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports

Thx in advance!
Christian

P.S. I tried debian 7 before as well - same behaviour

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9bdb1772-a1cd-412e-86db-b5925ea9bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/7rZf9A0hBA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyhx60NU1sQuoxxWBmW5e%2BFQTSahVcU-D-hguxACL00JA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/A237DA72-CADF-4C9C-A14D-DD4C690B8DF5%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyRS2o19E41XWj50VLxWKpSgXTKYnGCWf1R1UKoDLqdYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Need help: Filesync doesn't work with Windows 7 as host

Christian Lorenz
Hi,
thx I solved it. I needed the contrib version of debian and removed the sync type - now it's working fine. 

2017-11-28 19:08 GMT+01:00 Alvaro Miranda Aguilera <[hidden email]>:
by default if you are using virtualbox, vagrant will use virtualbox shared folder.

this will mount a folder from the host in the VM and the files are are placed there will be availabe in the host and the VM.

This works fine for most of the use cases.

the configuration you did share, uses rsync that means on vagrant up a folder will be copied FROM the host To the VM.

say your host is a mac machine and your vm is the debian it will copy a folder using rsync.

if you do changes to those files in the guest, they wont be copied back to the host

if you you do changes to those files in the host, they won't be updated in the guest

this is the out of the box experience with rsync.



can you test a different box?

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise64
vagrant up

that should set a VM with the default shared folder

if that is what you want, then you can check other boxes that use virtualbox fs instead of rsync.

Alvaro.

On Tue, Nov 28, 2017 at 6:51 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
Well it‘s the first time I have to setup a vagrant machine on my own (I‘m a freelancer working for different companies). But the times where I just had to use an already working one, I never had problems with my Mac, that when I made changes in a file and save it, the folders didn’t sync - just by vagrant up and let it go. 

Now they don’t do it - or just after a provision (and you don’t want to provision each time you changed some code and try to test it). And also you got the changes on files altered by the vm on host. This doesn’t happen here...

But what do you mean with: copy is host to vm?

Am 28.11.2017 um 18:21 schrieb Alvaro Miranda Aguilera <[hidden email]>:

hello

if you are using rsync or the box you use defaults to rsync then that follow 2 rules

- copy is host to VM
- once at provisioning

then if you do changes, you can either rsync manually or try something like rsync auto.

if this is happening, is all good.

what is not working that you think should be working?

Alvaro.


On Tue, Nov 28, 2017 at 5:39 PM, 'Christian Lorenz' via Vagrant <[hidden email]> wrote:
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 address: 127.0.0.1:2222
    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:
==> default: Vanilla Debian box. See https://atlas.hashicorp.com/debian/ for help and bug reports

Thx in advance!
Christian

P.S. I tried debian 7 before as well - same behaviour

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/9bdb1772-a1cd-412e-86db-b5925ea9bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/7rZf9A0hBA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyhx60NU1sQuoxxWBmW5e%2BFQTSahVcU-D-hguxACL00JA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/A237DA72-CADF-4C9C-A14D-DD4C690B8DF5%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/7rZf9A0hBA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyRS2o19E41XWj50VLxWKpSgXTKYnGCWf1R1UKoDLqdYQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CALjKV9FL%2BCB8YYTDxnW9U0A1Awpt0zh2ZKKBRc5mJejBnOAGLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.