hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.28k stars 4.43k forks source link

Not able to share folder in different disk, in VirtualBox #13033

Open DMaxter opened 1 year ago

DMaxter commented 1 year ago

Debug output

Debug

Expected behavior

Create a shared folder

Actual behavior

Failing with error

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["sharedfolder", "add", "38bf1faf-2295-4a54-9057-b5b8c6b129ad", "--name", "vagrant", "--hostpath", "/media/Dados/IST/MEIC/2ºAno/Tese/crawler/vagrant"]

Stderr: VBoxManage: fatal error: RTR3Init: VERR_NO_TRANSLATION

Reproduction information

Vagrant version

Vagrant 2.3.4 (on 2.3.3 also occurs)

Host operating system

Arch Linux Linux zirconium 6.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000 x86_64 GNU/Linux

Guest operating system

Ubuntu 21.10 Image: https://app.vagrantup.com/generic/boxes/ubuntu2110

Steps to reproduce

  1. Put Vagrantfile in a different disk than the root filesystem
  2. Run vagrant up or vagrant reload

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.define :lb do |lb|
    lb.vm.box = "generic/ubuntu2110"

    lb.vm.hostname = "lb"

    lb.vm.provider :virtualbox do |vb|
      vb.name = "lb"
      vb.check_guest_additions = false
      vb.memory = 512
      vb.cpus = 1
    end
  end

  # Create shared folder
  config.vm.synced_folder ".", "/vagrant", :mount_options => ['dmode=774', 'fmode=775']
end

Additional Information

This used to work on previous versions, but I'm not sure which version broke it

chrisroberts commented 1 year ago

Hi there,

My first guess is that it's having a hard time handling the path /media/Dados/IST/MEIC/2ºAno/Tese/crawler/vagrant due to the º character. If you run vagrant up from a path without that character, does it still error?

DMaxter commented 1 year ago

Without that character it works

jljouannic commented 1 year ago

Same bug here with also a non-ASCII character in the path to the folder containing the Vagrantfile (an é char but I do not think it is important :smile:).

Vagrant version: 2.3.4 VirtualBox version: 7.0.6 Host operating system: Ubuntu 23.04