zepgram / magento2-fast-vm

Optimal vagrant developer box for Magento2. Folders synced by nfs/rsync. This box includes Magento developer utilities.
MIT License
110 stars 35 forks source link

Vagrant access denied: launch error after windows update #56

Closed Vikwip closed 4 years ago

Vikwip commented 4 years ago

Hi zepgram,

I can't run any more my Magento 2 virtual machine on the command line under Windows Powershell since a big Windows update.

I always get the following error:

> vagrant up
==> All dependencies are satisfied
C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:158:in 'rescue in execute': Zugriff verweigert (5) (Vagrant::Util::Subprocess::LaunchError)
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:151:in `execute'

from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:22:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:115:in `execute_cmd'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:84:in `windows_admin?'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/providers/hyperv/provider.rb:20:in `usable?'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:361:in `block in default_provider'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:49:in `block in each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:347:in `default_provider'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:943:in `guess_provider'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:955:in `find_configured_plugins'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:983:in `process_configured_plugins'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:178:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `<main>'

Here is my setup:

Windows 10 Pro
Vagrant 2.2.7
Virtual Box 6.0.16

I also tried to launch run vagrant on Powershell administrator and Git bash. It has run but I still got the same error at the script:

==> zepgram: rsync-back and rsync auto triggered...
==> zepgram: Duration: ~10min. Install is done when rsync-auto will start watching.
    zepgram: Running local: Inline script
    zepgram: vagrant rsync-back zepgram | vagrant rsync-auto --rsync-chown zepgram
    zepgram: C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:158:in `rescue in execute': Zugriff verweigert (5) (Vagrant::Util::Subprocess::LaunchError)
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:151:in `execute'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:22:in `execute'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:174:in `version'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:195:in `validate_install!'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:96:in `execute_cmd'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:84:in `windows_admin?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/providers/hyperv/provider.rb:20:in `usable?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:361:in `block in default_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:49:in `block in each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:347:in `default_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:943:in `guess_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:955:in `find_configured_plugins'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:983:in `process_configured_plugins'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:178:in `initialize'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `new'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `<main>'
    zepgram:
    zepgram: C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:158:in `rescue in execute': Zugriff verweigert (5) (Vagrant::Util::Subprocess::LaunchError)
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:151:in `execute'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:22:in `execute'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:174:in `version'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:195:in `validate_install!'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:96:in `execute_cmd'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:84:in `windows_admin?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/providers/hyperv/provider.rb:20:in `usable?'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:361:in `block in default_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:49:in `block in each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:347:in `default_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:943:in `guess_provider'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:955:in `find_configured_plugins'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:983:in `process_configured_plugins'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:178:in `initialize'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `new'
    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `<main>'
    zepgram:
==> zepgram: Trigger run failed
==> zepgram: A script exited with an unacceptable exit code 1.
A script exited with an unacceptable exit code 1.

Could you please help me solve this error?
Thanks!

zepgram commented 4 years ago

Hi, can you try to uninstall/reinstall all plugin ?

vagrant plugin expunge --reinstall
Vikwip commented 4 years ago

Okay, I ran the command but still got the same error

zepgram commented 4 years ago

I could not reproduce it with same context w10/virtualbox6/vagrant2.2.7 (not cool).

It could be related to a security program, blocking a vagrant process: https://github.com/hashicorp/vagrant/issues/10981

Vikwip commented 4 years ago

Hi, Unfortunately, I don't have the rights to disable my anti-virus because it's a company computer. I've also updated my vagrant and virtual box versions to the latest (1.1.6 + 6.0.18).

[0m==> Checking dependencies...[0m
[0m==> All dependencies are satisfied
[0m==> Checking dependencies...
[0m==> All dependencies are satisfied
Bringing machine 'zepgram' up with 'virtualbox' provider...
==> zepgram: Checking if box 'geerlingguy/debian9' version '1.1.5' is up to date...
==> zepgram: A newer version of the box 'geerlingguy/debian9' is available and already
==> zepgram: installed, but your Vagrant machine is running against
==> zepgram: version '1.1.5'. To update to version '1.1.6',
==> zepgram: destroy and recreate your machine.

And I still get the same error at the end of the script:

==> zepgram: >>> Do not close this terminal: open new one for ssh login
==> zepgram: ---------------------------------------------------------

==> zepgram: rsync-back and rsync auto triggered...

==> zepgram: Duration: ~10min. Install is done when rsync-auto will start watching.
    zepgram: Running local: Inline script
    zepgram: vagrant rsync-back zepgram | vagrant rsync-auto --rsync-chown zepgram
    zepgram: C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:158:in `rescue in execute': Zugriff verweigert (5) (Vagrant::Util:
:Subprocess::LaunchError)

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:151:in `execute'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:22:in `execute'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:174:in `version'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:195:in `validate_install!'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:96:in `execute_cmd'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:84:in `windows_admin?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/providers/hyperv/provider.rb:20:in `usable?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:361:in `block in default_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:49:in `block in each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:347:in `default_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:943:in `guess_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:955:in `find_configured_plugins'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:983:in `process_configured_plugins'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:178:in `initialize'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `new'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `<main>'

    zepgram: 
    zepgram: C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:158:in `rescue in execute': Zugriff verweigert (5) (Vagrant::Util:
:Subprocess::LaunchError)

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:151:in `execute'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/subprocess.rb:22:in `execute'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:174:in `version'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:195:in `validate_install!'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/powershell.rb:96:in `execute_cmd'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/platform.rb:84:in `windows_admin?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/providers/hyperv/provider.rb:20:in `usable?'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:361:in `block in default_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:49:in `block in each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/registry.rb:48:in `each'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:347:in `default_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:943:in `guess_provider'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:955:in `find_configured_plugins'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:983:in `process_configured_plugins'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:178:in `initialize'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `new'

    zepgram:    from C:/HashiCorp/Vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:145:in `<main>'

    zepgram: 
vagrant : ==> zepgram: Trigger run failed
In Zeile:1 Zeichen:1
+ vagrant up
+ ~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (==> zepgram: Trigger run failed:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

==> zepgram: A script exited with an unacceptable exit code 1.
A script exiterd with an unacceptable exit code 1.
zepgram commented 4 years ago

Rsync back may be responsible, because it's executing a command to import back files from guest to your host machine, you can remove the command vagrant rsync-back #{hostName} | here: https://github.com/zepgram/magento2-fast-vm/blob/master/dependency.rb#L108 to disable it.

Vikwip commented 4 years ago

Okay now I commented out that line and I don't have the error messages any more on vagrant up. But how to do if I want to import back my files to my host machine?

zepgram commented 4 years ago

It should work with scp: https://stackoverflow.com/questions/23339856/get-files-from-guest-to-host-in-vagrant

Le jeu. 12 mars 2020 à 16:04, Viktor notifications@github.com a écrit :

Okay now I commented out that line and I don't have the error messages any more on vagrant up. But how to do if I want to import back my files to my host machine?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zepgram/magento2-fast-vm/issues/56#issuecomment-598238199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4BLLT5FOWJXFVMABUMCPLRHD2WBANCNFSM4LFCDNXA .

zepgram commented 4 years ago

Hi @Vikwip Are you good, or do you need help ?

Vikwip commented 4 years ago

Hello @zepgram,

Sorry for the late response, I haven't tried it with scp yet. I'll let you know as soon as I can if it works 😉

I also wanted to point out that since this update, I’m obliged to launch vagrant with powershell in administrator mode. Is this normal?

Regards

zepgram commented 4 years ago

Nop, personally last time I tried it worked without admin access. But Windows prompt me an ask authorization for vagrant execution, so maybe the popup asking you the rights permission is not working properly on your side.