SMB - Synced Folders - Vagrant Documentation
SMBSynced folder type: smb Vagrant can use SMB as a mechanism to create a bi-directional synced folder between the host machine and the Vagrant machine. SMB is built-in to Windows machines and provides a higher performance alternative to some other mechanisms such as VirtualBox shared folders. Windows only! SMB is currently only supported when the host machine is Windows. The guest machine can be Windows or Linux. PrerequisitesTo use the SMB synced folder type,the machine running Vagrant must be a Windows machine. In addition to this,the command prompt executing Vagrant must have administrative privileges. Vagrant requires these privileges in order to create new network folder shares. The destination machine must be able to mount SMB filesystems. On Linux the package to do this is usually called smbfs or cifs. Vagrant knows how to automatically install this for some operating systems. OptionsThe SMB synced folder type has a variety of options it accepts:
ExampleThe following is an example of using SMB to sync a folder: Vagrant.configure("2") do |config| config.vm.synced_folder ".","/vagrant",type: "smb" end LimitationsBecause SMB is a relatively new synced folder type in Vagrant,it still has some rough edges. Hopefully,future versions of Vagrant will address these. The primary limitation of SMB synced folders at the moment is that they are never pruned or cleaned up. Once the folder share is defined,Vagrant never removes it. To clean up SMB synced folder shares,periodically run net share in a command prompt,find the shares you don't want,then run net share? NAME /delete for each,where NAME is the name of the share.
原文: https://docs.vagrantup.com/v2/synced-folders/nfs.html (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |