我的testing环境中有一台Satellite 6服务器, 安装在CentOS 7 的虚拟机中。 我已经将CentOS KVMconfiguration为计算资源,并且主机configuration(没有任何Capsule / Foreman代理)工作得很好。 但是,我想使用libvirt本身提供的DHCP / DNS来控制我的新盒子的IP /主机名。 根据Red Hat的说法,Satellite 6使用了Foreman的1.11版本。
我遵循Red Hat的外部胶囊文档以及Foreman的文档,将libvirt用作DNS / DHCP代理。
我已经安装了以下选项的Satellite 6:
satellite-installer -S satellite --foreman-proxy-dns-server kvmbox.example \ --foreman-proxy-dns-provider virsh \ --foreman-proxy-dns true \ --foreman-proxy-dhcp-server kvmbox.example \ --foreman-proxy-dhcp-provider virsh \ --foreman-proxy-dhcp true \ --foreman-proxy-dhcp-gateway eth0 \ --foreman-proxy-dhcp-interface eth0
所以,/etc/foreman-proxy/settings.d/dhcp.yml是:
--- # Enable DHCP management # Can be true, false, or http/https to enable just one of the protocols :enabled: https # valid providers: # - dhcp_isc (ISC dhcp server) # - dhcp_native_ms (Microsoft native implementation) # - dhcp_virsh (simple implementation for libvirt) :use_provider: dhcp_virsh :server: kvmbox.example # subnets restricts the subnets queried to a subset, to reduce the query time. #:subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128]
而对于DNS:
--- # DNS management :enabled: https # valid providers: # dns_dnscmd (Microsoft Windows native implementation) # dns_nsupdate # dns_nsupdate_gss (for GSS-TSIG support) # dns_virsh (simple implementation for libvirt) :use_provider: dns_virsh # use this setting if you want to override default TTL setting (86400) :dns_ttl: 86400
我的领class代理configuration似乎很好。 但是,当我尝试创build一个新的主机时,我看到以下错误:
Create DHCP Settings for z1.example.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for Capsule https://satellite.example.com:9090/dhcp
/var/log/foreman-proxy/proxy.log包含以下条目:
E,[2016-12-07T16:21:35.043048#31931]错误 – :DHCP virsh供应商>错误:无法检索virsh信息:virsh供应商错误:virsh调用>失败(pid 32091出口1) – 错误:失败连接到pipe理程序错误:无法将套接字连接到“/ var / run / libvirt / libvirt-sock” :没有这样的文件或目录
所以,从这些错误日志和缺lessconfiguration选项(如* _virsh)文件提到,似乎我可以使用libvirt DHCP / DNSfunction(至less在Satellite 6.2 / Foreman 1.11中)的唯一场景是当卫星/工头安装在物理盒子上,而不是VM …
这是真的,还是我错过了什么?