-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Box image cannot used under windows #58
Comments
I have the same issue. The line that defines the shared folder needs to be taken out of the Vagrantfile that comes with the base box |
@mmergenthaler I don't have access to a Windows host, but I've tested your proposed change on OS X, and it doesn't look good: both My suggestion for Windows users would be to either install rsync via Cygwin or MSYS, or to explicitly disable the default sync directory by adding the following line to their Vagrantfile:
|
@lpancescu I've forgot, that i had installed the vagrant plugin "vagrant-vbguest" before. This plugin automatically installs the host's VirtualBox Guest Additions on the guest system. But if you provide a base box for VirtualBox (see https://atlas.hashicorp.com/centos/boxes/7):
i think you have to provide your base box with Virtualbox Guest Additions installed like described under https://www.vagrantup.com/docs/virtualbox/boxes.html and https://www.vagrantup.com/docs/providers/basic_usage.html. Or you can add a information for windows users to your box description, that the installation of the Virtualbox Guest Additions is required (e.g. simply by installing the plugin "vagrant-vbguest"). |
I also have the vbguest plugin installed so, I don't suffer from the not available error. That plugin is almost necessary for lots of VMs when the host is Windows, if you do not want to manually install the vb guest drivers. Chris
|
@mmergenthaler I had already updated the release notes for v1607, to mention the rsync issue for Windows users (the second item in "Known issues"). The Guest Additions are not part of the Vagrant images because there is no VirtualBox package in CentOS, and we cannot use any third-party repositories. We know this is a problem for VirtualBox users and are (still) looking for a suitable solution. |
Thanks, this is already an improvement. In addition, I would suggest not to specify the type to "rsync", because Vagrant will use the best synced folder option as described under https://www.vagrantup.com/docs/synced-folders/basic_usage.html at option "type":
So, if no synced folder type is specified when using VirtualBox as provider under windows, then only a warning message
is shown, but the vagrant box will start and you can login via ssh. But if the type is specified to "rsync", under windows the vagrant box will fail to start with message
|
@mmergenthaler Sorry for taking that long to answer, it's been a busy week. If we stop specifying the sync type in the default Vagrantfile, the existing setups of all our users which do have rsync installed on the host (i.e. Linux, BSD, and even Windows with Cygwin or MSYS) would completely stop synchronizing any files between the host and the box. Besides, that warning is not as harmless as it seems: it only appears after Vagrant's timeout (5 minutes by default), and the process will exit with an error code of 1; this may not matter when you call Vagrant from the command line, but it does matter in a shell script or Makefile. From my perspective, this would not be an acceptable solution. If you don't need sync, my advice remains to disable syncing explicitly in your Vagrantfile. |
@lpancescu - If I was using Windows as my development environment and I wanted to upload files to a Virtual Machine I would use one of the many |
@jdeathe I think vagrant-sshfs might also work for Windows users, with the advantage of a simpler workflow when creating a new file. It seems to require Cygwin, though. |
There is no need to create a default synced folder "/vagrant" as explained in pull request #34, because vagrant will do that automatically. As from https://www.vagrantup.com/docs/synced-folders/:
In addition, the box image cannot be used under windows because you set the synced folder type to "rsync" which is not available under windows.
You can simply test it on a existing vagrant vm, if you comment the following line in the box image Vagrantfile, which you can find at "C:\Users[USERNAME].vagrant.d\boxes\centos-VAGRANTSLASH-7\1607.01\virtualbox\Vagrantfile":
Change
After the vagrant vm is up again, just login to the vm via ssh and execute "df":
The text was updated successfully, but these errors were encountered: