Skip to content

vagrant reload does not work correctly with the plugin #140

@kanokanor

Description

@kanokanor

Running to an issue that while trying to use vagrant reload SSHFS plugin is not unmounting automatically before and prevents load it correctly. Sometimes it works, sometimes not

PS D:\Kano\OneDrive\Work\VSCode\Vagrant\providers\Hyper-V\profiles\alma-sandbox-1> vagrant reload --no-provision
==> default: Attempting graceful shutdown of VM...
    default: Configuring the VM...
    default: Setting VM Integration Services
==> default: guest_service_interface is enabled
==> default: CustomVMSRV is enabled
    default: Setting VM Enhanced session transport type to HvSocket
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 172.18.33.40
==> default: Waiting for machine to boot. This may take a few minutes...
C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/kernel_v2/config/vm.rb:307:in `synced_folder': can't add a new key into hash during iteration (RuntimeError)
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:74:in `block (2 levels) in loop_and_fix_unfix'
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:57:in `each'
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:57:in `block in loop_and_fix_unfix'
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:53:in `each'
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:53:in `loop_and_fix_unfix'
        from C:/Users/Kano/.vagrant.d/gems/3.1.4/gems/vagrant-sshfs-1.3.7/lib/vagrant-sshfs/action_hostpath_fixup.rb:99:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:247:in `action_raw'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:216:in `block in action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/environment.rb:618:in `lock'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:202:in `call'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:202:in `action'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/hyperv/provider.rb:68:in `state'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:544:in `state'
        from C:/Program Files/Vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/wait_for_communicator.rb:29:in `block in call'
Finished
PS D:\Kano\OneDrive\Work\VSCode\Vagrant\providers\Hyper-V\profiles\alma-sandbox-1> vagrant reload --no-provision
==> default: Attempting graceful shutdown of VM...
    default: Configuring the VM...
    default: Setting VM Integration Services
==> default: guest_service_interface is enabled
==> default: CustomVMSRV is enabled
    default: Setting VM Enhanced session transport type to HvSocket
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 172.18.33.40
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 172.18.33.40:22
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Setting hostname...
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: D:/Kano/OneDrive/Work/VSCode/Vagrant/shared => /vagrant_shared
==> default: Checking Mount..
==> default: Folder Successfully Mounted!
==> default: Machine not provisioned because `--no-provision` is specified.

In this case I had to rerun it only 1 times, but it is very random when it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions