首页 > 其他分享 >virsh list报错: error: failed to connect to the hypervisor

virsh list报错: error: failed to connect to the hypervisor

时间:2022-12-05 14:47:00浏览次数:44  
标签:12 hypervisor list libvirt dnsmasq controller1 libvirtd 报错 Dec

查看本地kvm虚机时,发现无法查看,出现报错

# virsh list
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

由报错可发现是 libvirt异常,查看对应的libvirtd服务,发现服务未启动,然后直接启服务

如果存在服务启动异常,则针对对应的服务找问题即可,如依赖包版本问题

可尝试如下命令刷新依赖包

#yum -y remove qemu-kvm libvirt libguestfs-tools virt-install  virt-manager xorg-x11-xauth&&yum -y install qemu-kvm libvirt libguestfs-tools virt-install  virt-manager xorg-x11-xauth

[root@controller1 ~]# virsh list
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

[root@controller1 ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2022-12-05 12:03:12 CST; 1h 39min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 4409 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/libvirtd.service
           ├─1838 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           └─1839 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Dec 02 17:49:37 controller1 dnsmasq[1838]: read /etc/hosts - 5 addresses
Dec 02 17:49:37 controller1 dnsmasq[1838]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Dec 02 17:49:37 controller1 dnsmasq-dhcp[1838]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Dec 02 17:49:55 controller1 libvirtd[4409]: libvirt version: 7.6.0, package: 6.el8 (CBS <[email protected]>, 2021-11-17-01:57:30, )
Dec 02 17:49:55 controller1 libvirtd[4409]: hostname: controller1
Dec 02 17:49:55 controller1 libvirtd[4409]: operation failed: pool 'default' already exists with uuid 7ceb85c9-2688-40dc-adb4-2aafa92d59c3
Dec 02 21:33:10 controller1 libvirtd[4409]: internal error: End of file from qemu monitor
Dec 05 12:03:07 controller1 systemd[1]: Stopping Virtualization daemon...
Dec 05 12:03:12 controller1 systemd[1]: libvirtd.service: Succeeded.
Dec 05 12:03:12 controller1 systemd[1]: Stopped Virtualization daemon.
[root@controller1 ~]# systemctl start libvirtd
[root@controller1 ~]# virsh list
 Id   Name             State
--------------------------------
 5    centos-stream8   running

 

标签:12,hypervisor,list,libvirt,dnsmasq,controller1,libvirtd,报错,Dec
From: https://www.cnblogs.com/santia-god/p/16952214.html

相关文章

  • vba-传递listbox作为参数
    '反选PrivateSubCommandButton1_Click()CallTestss(Me!TIListBox)EndSubPrivateFunctionTestss(ByReflbAsObject)Iflb.ListCount<1ThenMsgBox......
  • 使用list和数组保存数据的差别
    在上位机开发曲线供能时遇到一个疑惑的问题,但又感觉这个问题太基础,想求证一下。需求:一共有1000个模拟量数据,每个数据记录600个点作为一组数据曲线,那么这1000个模拟量需要......
  • HACKTHEBOX VM LIST
    LinuxBoxes:WindowsBoxes:MorechallengingthanOSCP,butgoodpractice:LamelegacyJeeves[Windows]brainfuckBlueBart[Windows]shockerDevel......
  • vba-ArrayList
    TIListBox.MultiSelect=1TIListBox.ListStyle=1TIListBox.ColumnWidths=62TIListBox.ColumnCount=1Dimarr,brrC_Controlarr,b......
  • DevExpress 给TreeList添加右键菜单
    只有在右击节点时才会触发privatevoidtreeList1_MouseDown(objectsender,MouseEventArgse){if(e.Button==MouseButtons.Right)......
  • 操作Devexpress treelist中的项
    如果需要在单元格添加时则用TreeList如果只是单纯读取数据或检索数据时则用GridControl​​​​1.如果点击添加时则添加TreeList的节点:protectedinternalvoidbtnAdd_Cli......
  • Linux 下 hwclock 读写 RTC 报错 Invalid argument
    以上错误信息都是因为year设置不当引起的。没有设置RTC,RTC也不会启动计时。下面首先设置正确的系统时间,然后将系统时间传递给RTC。tm里的tm_year是从1900年开始算的,如要......
  • 连接mysql报错 errorCode 1129, state HY000, Host ‘xxx‘ is blocked because of ma
    https://copyfuture.com/blogs-details/202206101947537199错误原因:mysql设定了单个客户端最大连接失败次数,超过后便无法再连接成功.可命令行查看:最大失败数为100.......
  • springmvc注册fastJson报错
    原因:依赖版本问题这是我原本引入的依赖,版本是1.2.24<dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId......
  • mysql报错This function has none of DETERMINISTIC. NO SOL or READS SOL DATA...
    是因为存储过程/存储函数在创建时与开启慢查询日志冲突了解决冲突:临时解决:开启log_bin_trust_function_creatorsshowvariableslike'%log_bin_trust_function_cr......