How to setup vagrant-sshfs for work properly in Win10 with Hyper-V?












0















I am trying to setup Vagrant and Hyper-V and it is almost done but folder sharing is failing because I refuse to use SMB and instead I want to use vagrant-sshfs. It is know that in Windows system requires to have an sftp-server which is usually provided by OpenSSH and for that reason I have followed this instructions to install OpenSSH in Windows 10.



This is how my Vagrantfile looks like:



# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network :forwarded_port, host: 8080, guest: 80
config.vm.network "private_network", ip: "192.168.50.4"
config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", , sshfs_opts_append: "-o cache=no"

config.vm.provider :hyperv do |vb|
vb.memory = "2048"
vb.vmname = "centos7"
end
end


When I ran the command vagrant up I got the following:



λ vagrant up
Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Verifying Hyper-V is accessible...
default: Configuring the VM...
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
default: Timeout: 120 seconds
default: IP: 192.168.0.103
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 192.168.0.103:22
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: E:/Development/applications => /var/www/html
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Checking Mount..
Mounting SSHFS shared folder via slave SSHFS mount failed. Please
look at the below STDERR output from the processes that were run.

SSH command:

Warning: Permanently added '192.168.0.103' (ECDSA) to the list of known hosts.
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option


SFTP command:


Can any help me to setup this properly? Why I am missing here?










share|improve this question





























    0















    I am trying to setup Vagrant and Hyper-V and it is almost done but folder sharing is failing because I refuse to use SMB and instead I want to use vagrant-sshfs. It is know that in Windows system requires to have an sftp-server which is usually provided by OpenSSH and for that reason I have followed this instructions to install OpenSSH in Windows 10.



    This is how my Vagrantfile looks like:



    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    Vagrant.configure("2") do |config|
    config.vm.box = "centos/7"
    config.vm.network :forwarded_port, host: 8080, guest: 80
    config.vm.network "private_network", ip: "192.168.50.4"
    config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", , sshfs_opts_append: "-o cache=no"

    config.vm.provider :hyperv do |vb|
    vb.memory = "2048"
    vb.vmname = "centos7"
    end
    end


    When I ran the command vagrant up I got the following:



    λ vagrant up
    Bringing machine 'default' up with 'hyperv' provider...
    ==> default: Verifying Hyper-V is enabled...
    ==> default: Verifying Hyper-V is accessible...
    default: Configuring the VM...
    ==> default: Starting the machine...
    ==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 192.168.0.103
    ==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.0.103:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    ==> default: Machine booted and ready!
    ==> default: Mounting SSHFS shared folder...
    ==> default: Mounting folder via SSHFS: E:/Development/applications => /var/www/html
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    ==> default: Checking Mount..
    Mounting SSHFS shared folder via slave SSHFS mount failed. Please
    look at the below STDERR output from the processes that were run.

    SSH command:

    Warning: Permanently added '192.168.0.103' (ECDSA) to the list of known hosts.
    fuse: mountpoint is not empty
    fuse: if you are sure this is safe, use the 'nonempty' mount option


    SFTP command:


    Can any help me to setup this properly? Why I am missing here?










    share|improve this question



























      0












      0








      0


      1






      I am trying to setup Vagrant and Hyper-V and it is almost done but folder sharing is failing because I refuse to use SMB and instead I want to use vagrant-sshfs. It is know that in Windows system requires to have an sftp-server which is usually provided by OpenSSH and for that reason I have followed this instructions to install OpenSSH in Windows 10.



      This is how my Vagrantfile looks like:



      # -*- mode: ruby -*-
      # vi: set ft=ruby :

      Vagrant.configure("2") do |config|
      config.vm.box = "centos/7"
      config.vm.network :forwarded_port, host: 8080, guest: 80
      config.vm.network "private_network", ip: "192.168.50.4"
      config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", , sshfs_opts_append: "-o cache=no"

      config.vm.provider :hyperv do |vb|
      vb.memory = "2048"
      vb.vmname = "centos7"
      end
      end


      When I ran the command vagrant up I got the following:



      λ vagrant up
      Bringing machine 'default' up with 'hyperv' provider...
      ==> default: Verifying Hyper-V is enabled...
      ==> default: Verifying Hyper-V is accessible...
      default: Configuring the VM...
      ==> default: Starting the machine...
      ==> default: Waiting for the machine to report its IP address...
      default: Timeout: 120 seconds
      default: IP: 192.168.0.103
      ==> default: Waiting for machine to boot. This may take a few minutes...
      default: SSH address: 192.168.0.103:22
      default: SSH username: vagrant
      default: SSH auth method: private key
      ==> default: Machine booted and ready!
      ==> default: Mounting SSHFS shared folder...
      ==> default: Mounting folder via SSHFS: E:/Development/applications => /var/www/html
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      Mounting SSHFS shared folder via slave SSHFS mount failed. Please
      look at the below STDERR output from the processes that were run.

      SSH command:

      Warning: Permanently added '192.168.0.103' (ECDSA) to the list of known hosts.
      fuse: mountpoint is not empty
      fuse: if you are sure this is safe, use the 'nonempty' mount option


      SFTP command:


      Can any help me to setup this properly? Why I am missing here?










      share|improve this question
















      I am trying to setup Vagrant and Hyper-V and it is almost done but folder sharing is failing because I refuse to use SMB and instead I want to use vagrant-sshfs. It is know that in Windows system requires to have an sftp-server which is usually provided by OpenSSH and for that reason I have followed this instructions to install OpenSSH in Windows 10.



      This is how my Vagrantfile looks like:



      # -*- mode: ruby -*-
      # vi: set ft=ruby :

      Vagrant.configure("2") do |config|
      config.vm.box = "centos/7"
      config.vm.network :forwarded_port, host: 8080, guest: 80
      config.vm.network "private_network", ip: "192.168.50.4"
      config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", , sshfs_opts_append: "-o cache=no"

      config.vm.provider :hyperv do |vb|
      vb.memory = "2048"
      vb.vmname = "centos7"
      end
      end


      When I ran the command vagrant up I got the following:



      λ vagrant up
      Bringing machine 'default' up with 'hyperv' provider...
      ==> default: Verifying Hyper-V is enabled...
      ==> default: Verifying Hyper-V is accessible...
      default: Configuring the VM...
      ==> default: Starting the machine...
      ==> default: Waiting for the machine to report its IP address...
      default: Timeout: 120 seconds
      default: IP: 192.168.0.103
      ==> default: Waiting for machine to boot. This may take a few minutes...
      default: SSH address: 192.168.0.103:22
      default: SSH username: vagrant
      default: SSH auth method: private key
      ==> default: Machine booted and ready!
      ==> default: Mounting SSHFS shared folder...
      ==> default: Mounting folder via SSHFS: E:/Development/applications => /var/www/html
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      ==> default: Checking Mount..
      Mounting SSHFS shared folder via slave SSHFS mount failed. Please
      look at the below STDERR output from the processes that were run.

      SSH command:

      Warning: Permanently added '192.168.0.103' (ECDSA) to the list of known hosts.
      fuse: mountpoint is not empty
      fuse: if you are sure this is safe, use the 'nonempty' mount option


      SFTP command:


      Can any help me to setup this properly? Why I am missing here?







      windows-10 hyper-v openssh sftp vagrant






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 1 '18 at 1:18







      ReynierPM

















      asked Jul 1 '18 at 1:03









      ReynierPMReynierPM

      1901215




      1901215






















          1 Answer
          1






          active

          oldest

          votes


















          0














          While I am unable to check it on Win10 right now, I had a similar problem with Ubuntu 18.4 using VirtualBox on a MacOS host. The error message seems to be related to SSHFS anyway.



          Adding the 'nonempty' option to sshfs_opts_append worked for me:



          config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", sshfs_opts_append: "-o nonempty -o cache=no"


          While trying your configuration there seemed to be a superfluous comma – I had to remove it.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1335620%2fhow-to-setup-vagrant-sshfs-for-work-properly-in-win10-with-hyper-v%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            While I am unable to check it on Win10 right now, I had a similar problem with Ubuntu 18.4 using VirtualBox on a MacOS host. The error message seems to be related to SSHFS anyway.



            Adding the 'nonempty' option to sshfs_opts_append worked for me:



            config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", sshfs_opts_append: "-o nonempty -o cache=no"


            While trying your configuration there seemed to be a superfluous comma – I had to remove it.






            share|improve this answer




























              0














              While I am unable to check it on Win10 right now, I had a similar problem with Ubuntu 18.4 using VirtualBox on a MacOS host. The error message seems to be related to SSHFS anyway.



              Adding the 'nonempty' option to sshfs_opts_append worked for me:



              config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", sshfs_opts_append: "-o nonempty -o cache=no"


              While trying your configuration there seemed to be a superfluous comma – I had to remove it.






              share|improve this answer


























                0












                0








                0







                While I am unable to check it on Win10 right now, I had a similar problem with Ubuntu 18.4 using VirtualBox on a MacOS host. The error message seems to be related to SSHFS anyway.



                Adding the 'nonempty' option to sshfs_opts_append worked for me:



                config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", sshfs_opts_append: "-o nonempty -o cache=no"


                While trying your configuration there seemed to be a superfluous comma – I had to remove it.






                share|improve this answer













                While I am unable to check it on Win10 right now, I had a similar problem with Ubuntu 18.4 using VirtualBox on a MacOS host. The error message seems to be related to SSHFS anyway.



                Adding the 'nonempty' option to sshfs_opts_append worked for me:



                config.vm.synced_folder "../../applications", "/var/www", type: "sshfs", sshfs_opts_append: "-o nonempty -o cache=no"


                While trying your configuration there seemed to be a superfluous comma – I had to remove it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 12 at 14:54









                MolotoffMolotoff

                22827




                22827






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1335620%2fhow-to-setup-vagrant-sshfs-for-work-properly-in-win10-with-hyper-v%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix