AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题

问题[vagrant](unix)

Martin Hope
cs224
Asked: 2022-06-18 05:34:56 +0800 CST

VirtualBox vboxnet0 对 192.168.56.100 的 ping 响应,这与任何虚拟机都没有关联?

  • 0

我通过 vagrant 将 VirtualBox 虚拟机配置为在 192.168.56.100 有一个 private_network 地址,并注意到我可以 ping 该地址,但不能 ssh 到它。

经过一番调查,我发现即使我关闭了 VM,我仍然可以 ping 地址 192.168.56.100,而没有运行 VirtualBox VM。

更奇怪的是,当我重新配置我的 Vagrant 文件以使用地址 192.168.56.101 然后重新启动我的主机时。然后最初在重新启动后 vboxnet0 不存在,我无法 ping 任何 192.168.56.* 地址。然后,当我通过 vagrant up 启动虚拟机时,vboxnet0 在 192.168.56.1 可用,新 VM 在 192.168.56.101 可用。但是我仍然可以ping 192.168.56.100??不存在会使用此地址的虚拟机!

我该如何进一步调试呢?如何找出 192.168.56.100 是什么?vboxnet0 不是 brdige 设备,所以我不能使用 brctl 之类的工具。

谢谢!

PS:我在“Ubuntu 22.04 LTS”上:Linux master 5.15.0-30-generic #31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux。

我在版本 6.1.32_Ubuntu r149290 中使用 VirtualBox。

首先是我之前要求的附加信息vagrant up。

ip route sh
default via 192.168.178.1 dev wlp4s0 proto dhcp metric 600 
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-87529e8f38b0 proto kernel scope link src 172.18.0.1 linkdown 
172.20.0.0/16 dev br-09115dd7adf5 proto kernel scope link src 172.20.0.1 linkdown 
172.21.0.0/16 dev br-95476c66ec3f proto kernel scope link src 172.21.0.1 linkdown 
172.25.0.0/16 dev br-f259d334ba7f proto kernel scope link src 172.25.0.1 linkdown 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
192.168.178.0/24 dev wlp4s0 proto kernel scope link src 192.168.178.63 metric 600 

ip addr show | grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 192.168.178.63/24 brd 192.168.178.255 scope global dynamic noprefixroute wlp4s0
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-09115dd7adf5
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-87529e8f38b0
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-95476c66ec3f
inet 172.25.0.1/16 brd 172.25.255.255 scope global br-f259d334ba7f

ping 192.168.56.100
PING 192.168.56.100 (192.168.56.100) 56(84) bytes of data.
^C
--- 192.168.56.100 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3080ms

之后也是一样vagrant up:

ip route sh
default via 192.168.178.1 dev wlp4s0 proto dhcp metric 600 
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-87529e8f38b0 proto kernel scope link src 172.18.0.1 linkdown 
172.20.0.0/16 dev br-09115dd7adf5 proto kernel scope link src 172.20.0.1 linkdown 
172.21.0.0/16 dev br-95476c66ec3f proto kernel scope link src 172.21.0.1 linkdown 
172.25.0.0/16 dev br-f259d334ba7f proto kernel scope link src 172.25.0.1 linkdown 
192.168.56.0/24 dev vboxnet0 proto kernel scope link src 192.168.56.1 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 
192.168.178.0/24 dev wlp4s0 proto kernel scope link src 192.168.178.63 metric 600

ip addr show | grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 192.168.178.63/24 brd 192.168.178.255 scope global dynamic noprefixroute wlp4s0
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-09115dd7adf5
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-87529e8f38b0
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-95476c66ec3f
inet 172.25.0.1/16 brd 172.25.255.255 scope global br-f259d334ba7f
inet 192.168.56.1/24 brd 192.168.56.255 scope global vboxnet0

我启动的 VM 具有 IP 192.168.56.101 并按应有的响应:

ping 192.168.56.101
PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data.
64 bytes from 192.168.56.101: icmp_seq=1 ttl=64 time=0.364 ms
64 bytes from 192.168.56.101: icmp_seq=2 ttl=64 time=0.205 ms

但是现在 192.168.56.100 上也有一些响应:

ping 192.168.56.100
PING 192.168.56.100 (192.168.56.100) 56(84) bytes of data.
64 bytes from 192.168.56.100: icmp_seq=1 ttl=255 time=0.108 ms
64 bytes from 192.168.56.100: icmp_seq=2 ttl=255 time=0.078 ms
virtualbox vagrant
  • 1 个回答
  • 93 Views
Martin Hope
Laurenz
Asked: 2019-12-13 05:15:33 +0800 CST

尝试将 Vagrant 与 Virtual Box 一起使用时出错

  • 0

我已经在我的 MacOS 中安装了带有 Vagrant 的宅基地。我已经用 Virtual Box 安装了所有东西,但是当我尝试vagrant up在终端中使用命令运行虚拟机时出现此错误:

MacBook-Pro-di-Lorenzo:~ lorenzomammi$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise32'...
Progress: 90%There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "/Users/lorenzomammi/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise32/1.0.0/virtualbox/box.ovf", "--vsys", "0", "--vmname", "precise32_1576225284920_5564", "--vsys", "0", "--unit", "11", "--disk", "/Users/sybercodesign/VirtualBox VMs/precise32_1576225284920_5564/precise32-disk001.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/lorenzomammi/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise32/1.0.0/virtualbox/box.ovf...
OK.
0%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Appliance import failed
VBoxManage: error: Code NS_ERROR_INVALID_ARG (0x80070057) - Invalid argument value (extended info not available)
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg *)" at line 957 of file VBoxManageAppliance.cpp

谁能帮我?这是什么意思?

terminal vagrant
  • 1 个回答
  • 1086 Views
Martin Hope
user356582
Asked: 2019-06-07 06:11:44 +0800 CST

无法从 vagrant 连接到端口 9200 上的 localhost (11.213.234.24)

  • 0

我正在使用 centos 的虚拟盒子运行 vagrant。尝试使用 (curl -X GET ' http://11.213.234.24:9200 ') 从 vagrant 连接端口 9200 上的本地主机。低于错误

curl: (7) couldn't connect to host

我还添加了config.vm.network "public_network", ip: "11.213.234.24"in vagrant 文件

我一直在浏览器中尝试http://11.213.234.24:9200/,我可以看到结果

{
  "name" : "qAn6D9F",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "XH_d3889RPChpcY261vLRQ",
  "version" : {
    "number" : "5.5.3",
    "build_hash" : "9305a5e",
    "build_date" : "2017-09-07T15:56:59.599Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}

有谁知道问题可能是什么?

提前致谢!

centos vagrant
  • 1 个回答
  • 205 Views
Martin Hope
user301042
Asked: 2018-07-18 09:14:13 +0800 CST

我将如何编辑 Vagrantfile 以便 Vagrant 知道从我的主机获取 .box 文件?

  • 2

我正在用 Vagrant 建立一个开发环境。在配置基本盒子时,我将如何编辑Vagrantfile以便 Vagrant 知道从我的主机获取 .box 文件?

我已按照Sitepoint关于如何配置的Vagrantfile说明进行操作,以便 Vagrant 获得配置基本框所需的说明。但是我的基本框文件位于我的计算机上!

我假设也可以指示 Vagrant 从我的计算机加载基本框文件而不是 url(Vagrant Cloud 或 DropBox) 有问题的代码行如下。

它指定托管在 Vagran Cloud 上的托管基本盒文件的名称:

config.vm.box = "primalskill/ubuntu-trusty64"
vagrant
  • 1 个回答
  • 1398 Views
Martin Hope
Rui F Ribeiro
Asked: 2018-03-04 16:34:08 +0800 CST

tcpdump 使 VMWare Fusion 中的 Vagrant box 崩溃

  • 0

我在 VMWare Fusion 10 + Vagrant + High Sierra 中同时部署了 FreeBSD 10.3 和 OpenBSD 6.2 VM。

但是,它们在运行时都挂起:

sudo tcpdump -n port 53

这里发生了什么?

osx vagrant
  • 1 个回答
  • 132 Views
Martin Hope
Rui F Ribeiro
Asked: 2018-03-04 15:53:55 +0800 CST

无法关闭或销毁崩溃的 Vagrant 盒子

  • 0

我正在使用 VMWare Fusion 10 + vagrant + High Sierra。

我提供了一个流浪的 FreeBSD 盒子:

$ vagrant init freebsd/FreeBSD-10.3-RELEASE
$ vagrant up --provider vmware_fusion

然后我犯了一个愚蠢的错误,失去了对虚拟机的控制/崩溃。

两者vagrant ssh和vagrant halt都vagrant destroy default不起作用。

$ vagrant halt
==> default: Attempting graceful shutdown of VM...
^C==> default: Waiting for cleanup before exiting...
^C==> default: Exiting immediately, without cleanup!
$ 


$ vagrant destroy default
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Stopping the VMware VM...
^C==> default: Waiting for cleanup before exiting...

该怎么办?

vagrant vmware-fusion
  • 1 个回答
  • 692 Views
Martin Hope
Kutsubato
Asked: 2018-02-13 14:43:15 +0800 CST

在没有用户交互的情况下安装 Pi-Hole?

  • 2

我想在 Vagrant (VirtualBox) 中自动安装 Pi-Hole。因此,在自动化脚本中,它必须运行才能启动。不幸的是,通常情况下,您必须回答多个安装问题才能安装 Pi-Hole,例如 IPv4 或 6,...,并且您需要与设置进行键盘交互(由用户)。

有没有任何方法或解决方案可以在没有任何交互的情况下安装它?如何在 Bash 脚本或 Vagrantfile 中编写它?

software-installation vagrant
  • 2 个回答
  • 2571 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve