Giter Site home page Giter Site logo

Comments (5)

techsk8 avatar techsk8 commented on June 25, 2024 1

Thank you indeed 👍🏽

This block of code indeed did the trick. That's much appreciated for taking the time to look into it 😄 Keep up the good work! 💯

 config.vm.provider :libvirt do |lv, override|  
    override.vm.allowed_synced_folder_types = [:libvirt, :nfs]
    override.vm.synced_folder ".", "/vagrant", nfs_version: 4, nfs_udp: false
  end

from packer-kali_linux.

techsk8 avatar techsk8 commented on June 25, 2024

After finding this on the Arch Wiki I've solved this problem which I've also had with some other boxes. But the problem still persists around this Kali box. This is the other error which I get now:

THe same output as above ^^^^^^
....
.....
==> kali: Exporting NFS shared folders...
==> kali: Preparing to edit /etc/exports. Administrator privileges will be required...
==> kali: Mounting NFS shared folders...
==> kali: Pruning invalid NFS exports. Administrator privileges will be required...
==> kali: Removing domain...
==> kali: Deleting the machine folder
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.121.1:/home/me/Learning-Linux/vagrant-boxes/kali /vagrant

Stdout from the command:



Stderr from the command:

mount.nfs: an incorrect mount option was specified

VM must be created before running this command. Run `vagrant up` first.

from packer-kali_linux.

elreydetoda avatar elreydetoda commented on June 25, 2024

Hello @alincocio, sorry for not responding sooner normally the GitHub mobile app notifies me if there was an issue on one of my repos and it didn't 🤔. Sorry about that!

So, I actually have run into this issue on a few different machines before ( at least it looks familiar ). I think it is a version miss match between a vagrant default (using v3 of nfs for shared folders) and your OS. The vagrant box should support v4 out of the box (from a client (inside the VM) perspective), but its a matter of using the right version when connecting to the "server" (i.e. your host machine that is running the VM).

If you don't mind me asking, what distro are you running? ( Fedora, Ubuntu, arch, etc...)

If it is the issue that I am thinking of, then you might have to fiddle around with some options inside of your Vagrantfile. I wish I could change this on the "server" side, but then that might break compatibility for other distros that don't have a more updated nfs setup.

This should be an example of what you could add to your Vagrantfile to (hopefully) fix the issue:

  config.vm.provider :libvirt do |lv, override|  
    override.vm.allowed_synced_folder_types = [:libvirt, :nfs]
    override.vm.synced_folder ".", "/vagrant", nfs_version: 4, nfs_udp: false
  end

Here is an example of me using it when I actually do development for this repo.

Let me know if this helps at all or what other errors you have 🙂

from packer-kali_linux.

elreydetoda avatar elreydetoda commented on June 25, 2024

another thing I do for debugging is (when I am having an issue inside the vagrant box on libvirt (libvirt specifically, because it destroys the box if it fails)) run vagrant up with the --no-destroy-on-error flag. Then it won't remove the box from my machine, and I can hop in to run different commands to further diagnose the issue.

One such command you could run to help diagnose is the command that vagrant is outputting that it had an error with.

mount -o vers=3,udp 192.168.121.1:/home/me/Learning-Linux/vagrant-boxes/kali /vagrant

Then once you can get it to mount properly you can just modify the Vagrantfile to adapt to using the same stuff (i.e. nfs version 4, etc... ).

from packer-kali_linux.

elreydetoda avatar elreydetoda commented on June 25, 2024

Thank you indeed 👍🏽

This block of code indeed did the trick.

That's awesome @alincocio ! I am glad it is working now 😁

That's much appreciated for taking the time to look into it 😄

Anytime 😊

Keep up the good work! 💯

Thank you for using my vagrant box 🙂! You are the first person (besides me 🙃) to file an issue that isn't a co-worker, so thank you for reaching out!

I'm glad to know someone else beside my co-workers use it and enjoy it 😅😁

from packer-kali_linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.