Skip to content
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

p9 synced folder is readonly when it shouldn't be #1791

Open
matutter opened this issue Nov 29, 2023 · 0 comments
Open

p9 synced folder is readonly when it shouldn't be #1791

matutter opened this issue Nov 29, 2023 · 0 comments

Comments

@matutter
Copy link

Describe the bug

I have a p9 synced_folder that should be writable from the guest however it is readonly.

To Reproduce

  1. Install the latest provider.
gem fetch vagrant-libvirt --version 0.12.2
vagrant plugin install vagrant-libvirt-0.12.2.gem
  1. vagrant up --no-provision
  2. vagrant ssh
  3. cd releases
  4. touch asd.txt (fails - read only file system)

Use this vagrant file:

Expected behavior
The folder /home/vagrant/releases should be writable inside the guest.

Screenshots

Versions (please complete the following information)::

  • Libvirt version: 8.0.0
  • Vagrant version [output of vagrant version]: 2.2.19
  • Vagrant flavour [Upstream or Distro]: Distro 2.2.19+dfsg-1ubuntu1
  • Vagrant plugins versions (including vagrant-libvirt) [output of vagrant plugin list]:
vagrant-libvirt (0.12.2, global)
  - Version Constraint: 0.12.2

Debug Log

Command: VAGRANT_LOG=debug vagrant up --no-provision --provider=libvirt >vagrant.log 2>&1

vagrant.log

A Vagrantfile to reproduce the issue:

# Using NFS requires elevated privileges on the host machine, p9 may have
# permission issues when attempting to write from the guest to the host.
use_nfs = false

Vagrant.configure("2") do |config|
    config.vm.box = "generic/ubuntu2004"
    config.vm.hostname = "ubuntu"

    config.vm.provider :libvirt do |domain|
        domain.uri = 'qemu+unix:///system'
        domain.driver = 'kvm'
        domain.cpus = 4
        domain.memory = 8192
        domain.graphics_type = "none"
    end

    if use_nfs
        config.vm.synced_folder "./releases", "/home/vagrant/releases",
            type: "nfs",
            nfs_udp: false,
            nfs_version: 4
    else
        config.vm.synced_folder "./releases", "/home/vagrant/releases",
            type: "9p",
            disabled: false,
            accessmode: "mapped",
            readonly: false,
            access: "1000",
            mount: true
    end

    config.vm.provision "shell",
        path: "bootstrap.sh",
        privileged: false,
        keep_color: false

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant