如何修复Windows中的“ Vagarant没有启动”错误

时间:2019-08-03 21:25:43

标签: vagrant

这是我在Windows中运行vagrant up时的日志:

There was a problem after restarting the server Launch logs

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/xenial64' version '20190530.3.0' is up to date...
==> default: A newer version of the box 'ubuntu/xenial64' for provider 'virtualbox' is
==> default: available! You currently have version '20190530.3.0'. The latest is version
==> default: '20190731.0.0'. Run `vagrant box update` to update.
C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/providers/virtualbox/driver/version_5_0.rb:593:in `split': invalid byte sequence in UTF-8 (ArgumentError)
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/providers/virtualbox/driver/version_5_0.rb:593:in `read_used_ports'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:12:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/env_set.rb:19:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Users/dp/.vagrant.d/gems/2.4.6/gems/vagrant-hostmanager-1.8.9/lib/vagrant-hostmanager/action/update_all.rb:24:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/warden.rb:50:in `call'
        from C:/Vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'

1 个答案:

答案 0 :(得分:0)

这是一个已知问题。请检查以下内容:   https://github.com/hashicorp/vagrant/issues/9549

如果您具有非拉丁字母的注册VM(在virtualbox中)的映像文件路径,则会出现此错误。 可能是您没有启动的映像,但仅存在于Virtualbox中。在Virtualbox内部,这些VM将完美运行。因此,此问题不是针对Virtualbox,而是针对Vagrant / Ruby。

所以当前的解决方法是:

检查Virtualbox中的所有图像 并更正所有具有非拉丁/奇怪符号的路径。您也可以选择删除此类图像。 如上所述,您可以使用以下方法检查属性:

VBoxManage list vms
VBoxManage showvminfo <vm-guid> --machinereadable