search
HomeOperation and MaintenanceCentOSWhat should I do if centos cannot ping under the virtual machine?

What should I do if centos cannot ping under the virtual machine?

Problem discovery:

1. First ping the address:

win R and enter cmd to enter the command prompt

Enter ping Linux The system's IP address

was found to be unable to be pinged.

(Recommended tutorial: centos tutorial)

Solution process:

2. Enter Linux, check the firewall

Enter the command Check whether port 22 is open:

firewall-cmd --zone= public --query-port=22/tcp

Return no, so open it:

firewall-cmd --zone=public --add-port=22/tcp --permanent

Reload the firewall:

firewall-cmd --reload

Check whether port 22 is open:

firewall-cmd --zone= public --query-port=22/tcp

Return yes, indicating that it has been enabled.

So I pinged the IP address again and found that the ping still failed.

3. Enter the virtual machine and configure the network

1. Open the virtual machine homepage, click ->Edit->Virtual Machine Network Editor->Change settings in the lower right corner-> After re-entering, click VMnet0->Select Bridge Mode->Select Automatic->Click OK to end;

2. Select the specific Centos7, right-click and select Settings-> Select Network Adapter->Select Customize (U): Specific virtual network->Select VMnet0->Check Connected, check Connect at startup, click OK;

3. Restart Centos7.

4. Return to our computer, configure the network

ping ip address, and find that pinging still fails.

Open the Control Panel->Network Sharing Center->Enable VMware Network Adapter VMnet1->Select Properties-> Enter: Internet Protocol Version 4 (TCP/IPv4), set automatically obtain an ip address and automatically Get the DNS server address.

ping the ip address and found that the ping was successful.

problem solved.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of What should I do if centos cannot ping under the virtual machine?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
如何修复 Windows 11 中的 Hypervisor 错误如何修复 Windows 11 中的 Hypervisor 错误Apr 16, 2023 pm 12:37 PM

对于许多用户来说,Windows有一个隐藏的内置功能,可用于轻松创建和管理虚拟机。此功能称为Hypervisor或Hyper-V。但与其他Windows功能一样,此功能并非完全没有错误。在本文中,我们将向您展示如何轻松快速地解决Hyper-V问题。因此,事不宜迟,让我们立即进入解决方案,让虚拟机启动并运行。修复1–检查您的系统是否支持Hyper-V您应该尝试的第一件事是检查系统是否支持Hyper-V并且仍然处于激活状态。1.您必须重新启动系统。要安全地执行此操作,请按一次Wi

使用 VirtualBox 在 Windows 11 上安装 Windows XP ISO使用 VirtualBox 在 Windows 11 上安装 Windows XP ISOMay 05, 2023 pm 02:25 PM

Windows11VirtualBox虚拟机上的WindowsXP此处给出的使用VirtualBox安装WindowsXPISO映像的步骤不仅限于Windows11。用户可以在Linux(例如Ubuntu、macOS、Windows10、7或他们正在使用并拥有Virtualbox的其他操作系统)上遵循这些步骤。下载WindowsXPISOWindowsXP已由Microsoft存档,其ISO与产品密钥一起由他们在Archive.org上正式

如何修复 VMMEM 高内存和 CPU 使用率如何修复 VMMEM 高内存和 CPU 使用率Apr 18, 2023 pm 04:40 PM

由于各种因素,Vmmem或虚拟内存可能会导致高CPU或内存使用率。此问题背后的关键原因之一是虚拟主机中运行的一些资源密集型进程。但是,如果不是这种情况,并且VM在空闲模式下仍然占用大量系统资源,则可能是驱动程序故障。这会降低虚拟机的速度,并且您的工作可能会停止。因此,请按照以下步骤快速解决问题。修复1–结束所有资源密集型进程如果您正在运行一些繁重的应用程序或软件版本,则预计vmmem会使用大量资源。这没有什么异常。即使您可以直接终止这些进程,也可以为您的设备释放更多资源。注意–您可以通

适用于Windows 11的最佳虚拟机(免费和付费)适用于Windows 11的最佳虚拟机(免费和付费)Apr 13, 2023 am 11:40 AM

虚拟机或虚拟机是一种模拟计算机并替代真实事物的软件。VM 模仿计算机的硬件和体系结构以提供相同的功能。你可以在虚拟机上运行现有的应用和服务,而不必冒常规电脑稳定性的风险。例如,Windows 11现在有很多错误,可能会使体验令人沮丧。虚拟机将允许人们试用它而无需注册任何东西。请继续阅读,了解哪个是适合您需求和愿望的最佳 Windows 11 虚拟机。什么是适用于 Windows 11 的最佳虚拟机?VMware 工作站VMware Workstation是市场上最好的虚拟机之一,因为它具有高度的

如何在 Windows 11 上安装和使用 VirtualBox:2022详细的分步教程如何在 Windows 11 上安装和使用 VirtualBox:2022详细的分步教程Apr 14, 2023 pm 11:43 PM

自发布以来,Windows11经历了相当大的起伏。该操作系统现在更加稳定,并且具有许多似乎可以适应大多数用户的变化。Windows作为一个平台一直是通用的,能够创建虚拟机、驱动器、硬件设备等。这有助于内部测试、在不同环境中编码,或者只是一些好的旧修补。如果您一直希望在Windows11上模拟或虚拟化平台,那么VirtualBox是您的绝佳选择。让我们进一步了解它!什么是VirtualBox?VirtualBox是一款历史悠久的虚拟化软件,自发布以来一直受到大多数用户的青睐。目前由Ora

VMWare Workstation Fix 中没有足够的物理内存可用VMWare Workstation Fix 中没有足够的物理内存可用Apr 20, 2023 pm 03:43 PM

VMWare上的虚拟机需要大量物理内存才能正常运行和运行。RAM是虚拟机的重要组成部分,如果没有足够数量的物理RAM可用,它甚至无法启动并抛出一个长错误消息“没有足够的物理内存来启动此虚拟机”。正如错误消息所暗示的,这是系统中物理内存不足的结果。解决方法——1.您应该做的第一件事是重新启动系统。这显然会为主机清除一些额外的内存。重启后直接启动VMWare,启动虚拟机。2.如果你有另一个虚拟机,尝试运行它并测试。修复1–编辑config.ini文件您可以编辑配置文件,以便虚拟机仅使用系统可

Windows 11 ARM 在 UTM 虚拟机中在 Apple M1 上的惊人运行速度Windows 11 ARM 在 UTM 虚拟机中在 Apple M1 上的惊人运行速度Apr 22, 2023 am 08:55 AM

Windows11架构:ARM64内存:8GB磁盘:20GiB显示:VGASPICE工具:已安装本教程仅适用于AppleSiliconMac。下载适用于Mac的UTM适用于ARM的WindowsSPICE访客工具指示打开UTM并单击“+”按钮以打开VM创建向导。选择“虚拟化”。选择“窗口”。单击“浏览”并选择上面下载的WindowsVHDX。按“下一步”继续。选择您希望授予VM访问权限的RAM和CPU内核数量。按“下一步”继续。如果你有一个目录要挂载到V

最好用的六款虚拟机软件最好用的六款虚拟机软件Aug 01, 2023 pm 05:05 PM

说起虚拟机,相信作为技术人员的小伙伴们不会感到陌生。虚拟机的使用场景非常多,如搭建测试环境、在Windows系统中安装Linux或在Mac机器上运行Windows系统、甚至还可以用来进行安全实验。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software