libvirt unix_sock_dir 控制三种 socket 所在目录

libvirt unix_sock_dir 控制三种 socket 所在目录

目前我测试的 libvird.conf

bash 复制代码
▶ cat /etc/kube-host-vm/libvirtd.conf          
listen_tcp = 1
listen_tls = 0
auth_tcp = "none"
tcp_port = "16509"
ca_file = ""
log_level = 1
log_outputs = "1:file:/var/log/libvirtd.log"
listen_addr = "0.0.0.0"
unix_sock_dir = "/run/libvirt2host"

进程启动后,可以看到三种 sock 均已创建

bash 复制代码
root@debian:/kube-ovn# ll /run/libvirt2host/
total 8
drwxr-xr-x 2 root root 4096 Jun  1 13:24 ./
drwxr-xr-x 1 root root 4096 Jun  1 13:24 ../
srwx------ 1 root root    0 Jun  1 13:24 libvirt-admin-sock=
srwxrwxrwx 1 root root    0 Jun  1 13:24 libvirt-sock=
srwxrwxrwx 1 root root    0 Jun  1 13:24 libvirt-sock-ro=

基于 sock 的连接方式

bash 复制代码
virsh -c qemu+unix:///system?socket=/run/libvirt2host/libvirt-sock list



# 或者


export LIBVIRT_DEFAULT_URI=qemu+unix:///system?socket=/run/libvirt2host/libvirt-sock


virsh list

参考:

  1. libvirt.org/uri.html#UR...
相关推荐
踏浪无痕7 分钟前
SQLInsight:从JDBC底层到API调用的零侵入SQL监控方案
数据库·后端·开源
superman超哥1 小时前
Rust HashSet与BTreeSet的实现细节:集合类型的底层逻辑
开发语言·后端·rust·编程语言·rust hashset·rust btreeset·集合类型
superman超哥2 小时前
Rust String与&str的内部实现差异:所有权与借用的典型案例
开发语言·后端·rust·rust string·string与str·内部实现·所有权与借用
愈努力俞幸运2 小时前
rust安装
开发语言·后端·rust
踏浪无痕3 小时前
JobFlow 负载感知调度:把任务分给最闲的机器
后端·架构·开源
UrbanJazzerati3 小时前
Python自动化统计工具实战:Python批量分析Salesforce DML操作与错误处理
后端·面试
我爱娃哈哈3 小时前
SpringBoot + Seata + Nacos:分布式事务落地实战,订单-库存一致性全解析
spring boot·分布式·后端
nil3 小时前
记录protoc生成代码将optional改成omitepty问题
后端·go·protobuf
superman超哥3 小时前
Rust 范围模式(Range Patterns):边界检查的优雅表达
开发语言·后端·rust·编程语言·rust范围模式·range patterns·边界检查
云上凯歌4 小时前
02 Spring Boot企业级配置详解
android·spring boot·后端