Vagrant sync文件夹不存在';我不能在windows 10上工作
我正在尝试将文件夹从windows 10主机同步到ubuntu来宾,但出现以下错误:Vagrant sync文件夹不存在';我不能在windows 10上工作,vagrant,vagrantfile,vagrant-windows,Vagrant,Vagrantfile,Vagrant Windows,我正在尝试将文件夹从windows 10主机同步到ubuntu来宾,但出现以下错误: $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'ubuntu/trusty64' is up to date... ==> default: Clearing any previously set forwarded ports... ==&g
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' 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: Forwarding ports...
default: 8080 (guest) => 8080 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> 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: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.0
==> default: Mounting shared folders...
default: /vagrant => C:/sync_workspace
default: /sync_workspace => C:/sync_workspace
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,nolock,vers=3 core /sync_workspace
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant`,nolock,vers=3 core /sync_workspace
The error output from the last command was:
stdin: is not a tty
unknown mount option `nolock'
valid options:
rw mount read write (default)
ro mount read only
uid =<arg> default file owner user id
gid =<arg> default file owner group id
ttl =<arg> time to live for dentry
iocharset =<arg> i/o charset (default utf8)
convertcp =<arg> convert share name from given charset to utf8
dmode =<arg> mode of all directories
fmode =<arg> mode of all regular files
umask =<arg> umask of directories and regular files
dmask =<arg> umask of directories
fmask =<arg> umask of regular files
主持人:Windows 10
嘉宾:Ubuntu
流浪汉:1.8.1
VirtualBox:版本5.0.20 r106931
有什么帮助吗?安装并让它在来宾系统上安装主机的VirtualBox来宾添加,在您的情况下,它将更新您的来宾添加还可以尝试在您的来宾操作系统中获取更新。是否可以在vagrant中启用调试选项,例如
vagrant up--debug
?我猜问题在于windows文件夹名称中的空格。但需要用调试日志来证明这一点。如何在windows中运行apt-get
?简单。在Windows上使用Ubuntu,又称Bash。你是什么意思?虚拟机?哇是可能的,所以我猜你的答案遗漏了很多信息;)
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.synced_folder "C:/Users/rafa/Documents/personal docs", "/vagrant_data/sync_workspace"
end