首页 > 其他分享 >虚拟机无法ping通其他主机&主机不能ping通虚拟机【解决方案】

虚拟机无法ping通其他主机&主机不能ping通虚拟机【解决方案】

时间:2022-08-23 01:00:25浏览次数:100  
标签:network service 主机 虚拟机 ping systemctl root localhost

在安装redis时不知道怎么的, linux ping www.baidu.com 出不来了;
重启网卡报错

Restarting network (via systemctl):  Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

  

解决:

[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager-wait-onl
ine.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
[root@localhost ~]# systemctl restart network
[root@localhost ~]#

[root@localhost ~]# service network restart
Restarting network (via systemctl):                        [  OK  ]
[root@localhost ~]#

 

 

转自:https://blog.csdn.net/Smile__1/article/details/90733532

标签:network,service,主机,虚拟机,ping,systemctl,root,localhost
From: https://www.cnblogs.com/qizhang0828/p/16614762.html

相关文章

  • ubuntu20.04虚拟机最小化安装(legacy server+xfce4,装完只有3G)
    server自己配桌面,可以最小化安装。legacyserver比liveserver更小,虚拟机用来部署编译环境最好了。其实还有更小的ubuntu-base版,但是那个安装配置太麻烦了。 1.下载ub......
  • Python标准库typing
    Python标准库typinghttps://docs.python.org/zh-cn/3/library/typing.html简介python3.5+才有Python运行时不强制执行函数和变量类型注解,但这些注解可用于类型......
  • CentOS宿主机和虚拟机ping不通
    一.配置网络使用命令 vi/etc/sysconfig/network-scripts/ifcfg-eth0 进入如下界面。 二.修改文件在vi模式下按dd删除想要删除的行然后按i进入编辑模式,编辑完内容后......
  • 等保主机加固
    https://github.com/WeiyiGeek/SecOpsDev#CentOS7-InitializeSecurity.sh#!/bin/bash#@Author:WeiyiGeek#@Description:CentOS7TLSSecurityInitiate#@Creat......
  • 936. Stamping The Sequence
    Youaregiventwostrings stamp and target.Initially,thereisastring s oflength target.length withall s[i]=='?'.Inoneturn,youcanplace st......
  • VMware虚拟机迁移到openstack平台
    1.检查内核是否支持virtio驱动grep-ivirtio/boot/config-$(uname-r)2.如果内核没有virtio驱动需要指定virtio驱动cp/boot/initramfs-$(uname-r).img/boot/initr......
  • Linux虚拟机Nginx代理vue前端与SpringBoot后端资源
    1.Nginx安装配置详细参见菜鸟教程:https://www.runoob.com/linux/nginx-install-setup.html2.nginx.conf内容usernginx;worker_processes1;#设置值和CPU核心数......
  • 来聊聊 OpenJDK 和 JVM 虚拟机
    自从Oracle收购Sun以后,Java世界也变了不少。好在Oracle还开源了个OpenJDK,并且很多东西都变了。OpenJDK就是一个桶,什么都可以往里面装,各大公司又纷纷推出自己的......
  • 长ping脚本监控网络状态
    监控是1分钟采集一次数据,有时候出现几秒的网络波动触发不了告警,用长ping的方式可以定位具体时间。#!/bin/bash#nohupbashlong_ping.sh>>long_ping.log&>/script......
  • 虚拟机安装Linux系统
    环境:Windows11+VMwareWorkstation16Pro安装:Linux的UbuntuCentOS(CommunityENTerpriseOperatingSystem)是Linux发行版之一,它是来自于RedHatEnterpriseLinux......