简体   繁体   English

无法从同一本地网络ping和连接云堆栈VM实例IP

[英]Unable to ping and connect cloud stack vm instance ip from the same local network

我是云计算的初学者,现在正在学习构建私有云的云堆栈。根据此文档,我已经在一个节点上安装了管理服务器以及存储,在另一个节点上安装了KVM计算服务器。我还设置了管理服务器并添加了区域,吊舱,群集和主机。一切似乎都正常运行。但是,当我在云堆栈中创建实例时,我可以使用云堆栈提供的控制台进入该虚拟机,但无法使用该IP ping并连接该实例通过ssh解决问题。现在有人可以解决这个问题吗?谢谢您的关注。

If you can access the VM's console that is provided by the Console Proxy VM than CloudStack has no role in you unable to ping the VM on your local machine. 如果您可以访问由控制台代理VM提供的VM控制台,则CloudStack在您无法ping通本地计算机上的VM方面没有任何作用。 Can you provide some more details regarding your network? 您能否提供有关您的网络的更多详细信息? I think as you have just started you would be using L2 (flat) networking right now (providing IP of the same network CIDR or subnet) There has got to be a problem with your network configuration either on the local machine from where you are trying or Cloudstack. 我认为您刚开始使用L2(扁平)网络(提供相同网络CIDR或子网的IP)时,您尝试使用的本地计算机上的网络配置都会出现问题或Cloudstack。 I suggest you see if both your machine and VM can ping the gateway. 我建议您看看您的计算机和VM是否都可以ping通网关。 That would be the first step, if they can, try accessing internet from both (if you can use internet in your network you used to setup Cloudstack). 如果他们可以的话,那将是第一步,请尝试从这两者访问Internet(如果可以在用于设置Cloudstack的网络中使用Internet)。

The quickstart guide you are using is specificly being designed for configuring management server, NFS storage and agent in one machine only. 您正在使用的快速入门指南专门用于仅在一台计算机上配置管理服务器,NFS存储和代理。 When you use a different machine as a KVM agent, it's configuration changes slightly I have encountered similar issues earlier. 当您使用其他计算机作为KVM代理时,其配置略有更改,我之前遇到过类似的问题。 I suggest you follow this guide: http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.9/hypervisor/kvm.html As you are using separate machine as KVM agent, a frequent issue is out of sync iptables rules. 我建议您遵循此指南: http : //docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.9/hypervisor/kvm.html当您使用单独的计算机作为KVM代理时,经常会出现问题同步iptables规则。 Following should be taken care of in KVM agent's OS environment: 在KVM代理的OS环境中应注意以下事项:

  1. Disable firewalld - don't be afraid, CloudStack uses iptables which is indeed used by firewalld service to manage network rules. 禁用防火墙-不要担心,CloudStack使用iptables,防火墙服务确实使用了iptables来管理网络规则。 Leaving firewalld service running is the most common root cause of the issue. 使防火墙服务保持运行是此问题的最常见根本原因。 You can do it by the following commands ( These disable and stops running of firewalld currently and after reboot) 您可以通过以下命令来执行此操作(这些命令将禁用并停止当前以及重新启动后运行firewalld)

    systemctl disable firewalld && systemctl stop firewalld systemctl禁用firewalld && systemctl停止firewalld

  2. Restart the iptables and cloudstack-agent services 重新启动iptables和cloudstack-agent服务

    systemctl restart iptables systemctl restart cloudstack-agent systemctl重新启动iptables systemctl重新启动cloudstack-agent

If you still see any issues, I suggest you load the default iptables rules that are given here in ACS documentation and restart the iptables service: http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.9/hypervisor/kvm.html 如果仍然发现任何问题,建议您加载ACS文档中此处提供的默认iptables规则,然后重新启动iptables服务: http : //docs.cloudstack.apache.org/projects/cloudstack-installation/zh/4.9/ hypervisor / kvm.html

Also, if you are just starting, common places to see and understand the errors are the /var/log/cloudstack/management/management-server.log in management machine and /var/log/cloudstack/agent/agent.log in agent machine. 另外,如果您刚刚开始,查看和了解错误的常见位置是管理机中的/var/log/cloudstack/management/management-server.log和代理中的/var/log/cloudstack/agent/agent.log机。 Here you will see the most probable errors or warnings (if they exist) in your cloudstack setup. 在这里,您将看到cloudstack设置中最可能的错误或警告(如果存在)。 Tell me if it works. 告诉我是否可行。 All the best. 祝一切顺利。

PS: Use Cloudstack 4.11 if you are just starting, that's the latest stable LTS release (although there are some minor bugs here and there, but nothing cloud breaking ;) PS:如果您刚刚开始,请使用Cloudstack 4.11,这是最新的稳定LTS版本(尽管到处都有一些小错误,但没有云破裂;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM