标签: vagrant-windows

Vagrant错误:无法挂载VirtualBox共享文件夹(访客添加,vboxsf)

问题

我在Windows 10上安装了Vagrant,因此我可以在虚拟机中创建个人本地开发环境.我读到的关于Vagrant的一切都说我甚至可以通过NAT端口转发来启动多个系统并测试它们之间的通信.但首先,我只是希望在我与其余部分进行过多讨论之前创建一个开发环境虚拟机.

我按照SitePoint教程安装了VirtualBox,Vagrant,PuTTy和PuTTYGen:https://www.sitepoint.com/getting-started-vagrant-windows/ .接下来,我在C:驱动器上创建了一个vagrant项目文件夹vagrant init,删除了Vagrantfile,最后删除了vagrant init ubuntu/trusty64.然后我做了vagrant up,但过程失败并出现错误:

Vagrant无法挂载VirtualBox共享文件夹.这通常是因为文件系统"vboxsf"不可用.该文件系统通过VirtualBox Guest Additions和内核模块提供.请验证这些客人添加内容是否已在guest虚拟机中正确安装.这不是Vagrant中的错误,通常是由错误的Vagrant框引起的.对于上下文,尝试的命令是:

mount -t vboxsf -o uid = 1000,gid = 1000 vagrant/vagrant

该命令的错误输出是:

: 没有相应的文件和目录

这是我的Windows命令行的屏幕截图:

Vagrant/VirtualBox错误的屏幕截图

这是一个文本版本:

C:\vagrant\sitepoint-test-2017-02-05>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the box 'ubuntu/trusty64' is …
Run Code Online (Sandbox Code Playgroud)

windows virtualbox shared-directory vagrant vagrant-windows

33
推荐指数
5
解决办法
3万
查看次数

如何在Vagrant中自动选择桥接网络接口?

我应该在Vagrant文​​件中添加什么以防止询问(在vagrant up命令之后)

网络应该连接哪个接口?

Available bridged network interfaces:
1) Intel(R) 82579LM Gigabit Network Connection
2) VMware Virtual Ethernet Adapter for VMnet1
3) VMware Virtual Ethernet Adapter for VMnet8
Run Code Online (Sandbox Code Playgroud)

我想选择#1选项.当前我需要手动输入"1".请帮忙!

vagrant vagrantfile vagrant-windows

27
推荐指数
3
解决办法
2万
查看次数

使用Vagrant安装Composer

我在Windows PC上成功安装了Vagrant和一些盒子.我得说它工作得很棒,可以动态创建和销毁不同配置的VM.

我现在面临的唯一问题是我想安装作曲家.但作曲家要求你指向php.exe这样做.我不想在我的电脑上安装PHP,其他人使用Vagrant是没有意义的.我该如何解决这个问题?

我已经看过一些关于使用Puppet的文章,但是我无法理解它们.

提前致谢.

vagrant composer-php vagrant-windows

13
推荐指数
1
解决办法
2万
查看次数

Vagrant:缺少文件id_rsa

我正在使用带有宅基地的窗户,我正试图在命令行上输入流浪汉,但我收到此错误:

C:/www/Homestead/scripts/homestead.rb:106:in read': No such file or directory @ rb_sysopen - C:/Users/Niall/.ssh/id_rsa (Errno::ENOENT) from C:/www/Homestead/scripts/homestead.rb:106:inblock(2 level)in configure'from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/ vm_provisioner.rb:72:在call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm_provisioner.rb:72:inC的add_config'中:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm.rb:321:provision' from C:/www/Homestead/scripts/homestead.rb:103:in在configure 中的块中来自C:/ www/Homestead/scripts/homestead.rb:102:在each' from C:/www/Homestead/scripts/homestead.rb:102:in配置'来自C:/ www/Homestead/Vagrantfile:20:in block in <top (required)>' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:incall'来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/ lib/vagrant/config/v2/loader.rb:37:在load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:113:in块中(2级)加载'来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader .rb:107:each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb的加载块:104:each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in来自C:/ HashiCorp的加载/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/vagrantfile.rb:28:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in新的'来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/ vagrant/environment.rb:740:在vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:486:in主机'来自C:/ HashiCorp/Vagrant/embedded/gems/gems/vagra nt-1.8.1/lib/vagrant/environment.rb:208:block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in来自C的电话:/ HashiCorp/Vagrant/embedded/gems/gems /vagrant-1.8.1/lib/vagrant/ action/runner.rb:33 :run' from …

vagrant homestead vagrant-windows

13
推荐指数
1
解决办法
5218
查看次数

流浪警告:连接被拒绝.重试

测试默认示例

$ vagrant init hashicorp/precise32
$ vagrant up
Run Code Online (Sandbox Code Playgroud)

我的盒子:

我知道这是常见的错误,但在尝试了一切之后我仍然无法使其发挥作用 得到错误

VM显示: 在此输入图像描述

我可以成功登录: 在此输入图像描述

防火墙/防病毒已关闭.

未安装Hyper-V
在此输入图像描述

我尝试通过putty连接到127.0.0.1 2222 在此输入图像描述

编辑: 在此输入图像描述

在此输入图像描述

Vagrantfile(我删除了注释掉的行)

Vagrant.configure(2) do |config|
    config.vm.box = "hashicorp/precise32"
end
Run Code Online (Sandbox Code Playgroud)

这就是流浪汉ssh所做的......没什么.并且流浪汉的重新加载陷入了同样的问题. 在此输入图像描述

virtualbox vagrant vagrant-windows

12
推荐指数
1
解决办法
1万
查看次数

GPG 错误公钥不可用:NO_PUBKEY B53DC80D13EDEF05:使用 Vagrant 创建 VM 期间

我正在尝试使用 Vagrant 和相关安装 shell 脚本(如下所列)安装 K8s 集群 VM 节点。我尝试了类似问题中的一些建议,但它们对我的情况没有帮助。我在 Windows 11 上使用 virtualbox 版本 6.1.40。

为每个虚拟机准备通用软件包安装的 common.sh 脚本会导致以下错误。

controller24: W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
        controller24: E: The repository 'https://apt.kubernetes.io kubernetes-xenial InRelease' is not signed.
Run Code Online (Sandbox Code Playgroud)

common.sh 文件如下。

#!/bin/bash
#
# Common setup for all servers (Control Plane and Nodes)

set -euxo pipefail

# Variable Declaration

KUBERNETES_VERSION="1.24.10-00"

# DNS Setting
sudo mkdir /etc/systemd/resolved.conf.d/
cat <<EOF | …
Run Code Online (Sandbox Code Playgroud)

virtualbox vagrant vagrantfile vagrant-windows

12
推荐指数
2
解决办法
1万
查看次数

流浪错误"无法找到框'hashicorp/precise32'..."windows 10下载程序退出状态3221225781

我在Windows 10上收到此错误:

The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/hashicorp/precise32"]
Error:
Run Code Online (Sandbox Code Playgroud)

请注意,没有扩展的错误消息,这使得它与已发布的其他类似问题不同.它也有不同的解决方案.

vagrant-windows

11
推荐指数
1
解决办法
2137
查看次数

vagrant将无法启动虚拟机 - (Errno :: EADDRNOTAVAIL)

我真的遇到了这个问题.我在Windows机器上(具有管理员权限),我想开始设置我的工作环境与vagrant.

问题是我收到错误(下来),我找不到任何解决方案......我正在使用最新的虚拟盒和流浪汉版本.

错误代码:

 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `initialize': The requested address is not valid in its context. - connect(2) for "0.0.0.0" port 7755 (Errno::EADDRNOTAVAIL)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `block in is_port_open?'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in `block in timeout'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `block in catch'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in `catch'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in `timeout'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:19:in `is_port_open?'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:248:in `port_check'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:121:in `[]'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:121:in `block in handle'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:257:in `block in with_forwarded_ports'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:253:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:253:in `with_forwarded_ports'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:98:in `handle'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:42:in `block in …
Run Code Online (Sandbox Code Playgroud)

virtualbox vagrant vagrantfile vagrant-windows

11
推荐指数
1
解决办法
6285
查看次数

流浪汉 - Errno :: EADDRNOTAVAIL与流浪汉版本1.9.3

我一直在尝试安装Laravel Homestead,我一直在关注不同的教程,但总是当我达到我必须执行的程度时,我发现了vagrant up这个错误:

$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `initialize': La direcci?n solicitada no es v?lida en este contexto. - connect(2) for "0.0.0.0" port 8000 (Errno::EADDRNOTAVAIL)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `block in …
Run Code Online (Sandbox Code Playgroud)

vagrant laravel homestead vagrant-windows

11
推荐指数
2
解决办法
5036
查看次数

Windows上的Rsync - dup()输入/输出/错误失败

我正在使用Vagrant管理虚拟机以实现开发目的.我的操作系统是Windows 10,我使用的是Vagrant 1.9.1.由于文件夹同步的默认驱动程序很慢,我想实现Rsync.

为此,我使用了Cygwin并安装了Rsyn和OpenSSL.

当我在Cygwin控制台内运行vagrant我遇到了这个错误:

There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /cygdrive/c/Users/User/my-project/my-project/
Guest path: /var/www
Command: "rsync" "--verbose" "--archive" "-z" "--chmod=ugo=rwX" "--no-perms" "--no-owner" "--no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 2222 -o LogLevel=FATAL   -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'C:/Users/User/my-project/my-project/.vagrant/machines/gbb-my-project-sys-web-dev-1/virtualbox/private_key'" "--exclude" ".vagrant/" "--exclude" ".git/" "/cygdrive/c/Users/User/my-project/my-project/" "vagrant@127.0.0.1:/var/www"
Error: dup() in/out/err failed
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error …
Run Code Online (Sandbox Code Playgroud)

rsync cygwin vagrant vagrantfile vagrant-windows

11
推荐指数
1
解决办法
2065
查看次数