#181 Vagrant cannot create synced folder
Closed: Fixed 3 years ago Opened 3 years ago by jorti.

I just launch an unmodified fedora/25-atomic-host box and I get the error that it cannot create the /vagrant synced dir.

$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default:  -- Name:              mail-server_default
==> default:  -- Domain type:       kvm
==> default:  -- Cpus:              1
==> default:  -- Memory:            512M
==> default:  -- Management MAC:
==> default:  -- Loader:
==> default:  -- Base box:          fedora/25-atomic-host
==> default:  -- Storage pool:      default
==> default:  -- Image:
/var/lib/libvirt/images/mail-server_default.img (41G)
==> default:  -- Volume Cache:      default
==> default:  -- Kernel:
==> default:  -- Initrd:
==> default:  -- Graphics Type:     vnc
==> default:  -- Graphics Port:     5900
==> default:  -- Graphics IP:
==> default:  -- Graphics Password: Not defined
==> default:  -- Video Type:        cirrus
==> default:  -- Video VRAM:        9216
==> default:  -- Keymap:            en-us
==> default:  -- TPM Path:
==> default:  -- INPUT:             type=mouse, bus=ps2
==> default:  -- Command line :
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Configuring and enabling network interfaces...
==> default: Rsyncing folder: /home/juan/Vagrant/mail-server/ => /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir -p /vagrant

Stdout from the command:

Stderr from the command:

mkdir: cannot create directory ‘/vagrant’: Operation not permitted

This is an actual problem with the way the images are built right now. Can you workaround this issue by adding a line like this to your Vagrantfile:

config.vm.synced_folder "/tmp", "/vagrant", disabled: 'true'

This is an actual problem with the way the images are built right now.

What's the problem? It seems it cannot write to /
This is my current workaround:

  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.synced_folder ".", "/home/vagrant/provision", type: "rsync"

What's the problem? It seems it cannot write to /

That is right. With Atomic only some directories are writable. The problem is that the images used to get generated with the default sync to go to /home/vagrant/sync and that got lost recently. Will be working to fix that soon.

Metadata Update from @dustymabe:
- Issue tagged with: host

3 years ago

Metadata Update from @dustymabe:
- Issue assigned to dustymabe

3 years ago

Metadata Update from @dustymabe:
- Issue tagged with: vagrant

3 years ago

fixed now in f26: https://pagure.io/pungi-fedora/pull-request/232#

open PR for f25: https://pagure.io/pungi-fedora/pull-request/244

closing this issue since these changes will be coming to a future release near you!

Metadata Update from @dustymabe:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.