libvirt and bhyve problems

Craig Rodrigues rodrigc at FreeBSD.org
Sun Jun 15 19:04:34 UTC 2014


On Sun, Jun 15, 2014 at 8:20 AM, Roman Bogorodskiy <novel at freebsd.org> wrote:
>
> I have updated the port:
>
> http://people.freebsd.org/~novel/misc/libvirt_port2.tgz


OK, I deinstall the old port, took your port, built it, and installed it.

When I started libvirtd, I got this:

2014-06-15 18:47:07.236+0000: 34485605376: info : libvirt version: 1.2.5
2014-06-15 18:47:07.236+0000: 34485605376: info :
dnsmasqCapsSetFromBuffer:685 : dnsmasq version is 2.71, --bind-dynamic
is present, SO_BINDTODEVICE is in use
2014-06-15 18:47:07.237+0000: 34485605376: info :
networkReloadFirewallRules:1750 : Reloading iptables rules
2014-06-15 18:47:07.237+0000: 34485605376: info :
networkRefreshDaemons:1722 : Refreshing network daemons
2014-06-15 18:47:07.395+0000: 34485605376: error : virCommandWait:2426
: internal error: Child process (/usr/local/sbin/dnsmasq
--conf-file=/usr/local/var/lib/libvirt/dnsmasq/default.conf)
unexpected exit status 2:
dnsmasq: failed to create listening socket for 127.0.0.1: Address already in use

2014-06-15 18:47:07.484+0000: 34485605376: error : virExec:417 :
Cannot find 'pm-is-supported' in path: No such file or directory
2014-06-15 18:47:07.484+0000: 34485605376: warning :
virQEMUCapsInit:948 : Failed to get host power management capabilities
2014-06-15 18:47:07.495+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/var/run/libvirt/qemu
2014-06-15 18:47:07.495+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/etc/libvirt/qemu
2014-06-15 18:47:07.583+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/etc/libvirt/bhyve
2014-06-15 18:47:07.584+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml'



Trying to start bhyve did not work.

After some investigation, I did the following:

service local_unbound stop


Then I started libvirtd again:

2014-06-15 18:47:07.236+0000: 34485605376: info : libvirt version: 1.2.5
2014-06-15 18:47:07.236+0000: 34485605376: info :
dnsmasqCapsSetFromBuffer:685 : dnsmasq version is 2.71, --bind-dynamic
is present, SO_BINDTODEVICE is in use
2014-06-15 18:47:07.237+0000: 34485605376: info :
networkReloadFirewallRules:1750 : Reloading iptables rules
2014-06-15 18:47:07.237+0000: 34485605376: info :
networkRefreshDaemons:1722 : Refreshing network daemons
2014-06-15 18:47:07.395+0000: 34485605376: error : virCommandWait:2426
: internal error: Child process (/usr/local/sbin/dnsmasq
--conf-file=/usr/local/var/lib/libvirt/dnsmasq/default.conf)
unexpected exit status 2:
dnsmasq: failed to create listening socket for 127.0.0.1: Address already in use

2014-06-15 18:47:07.484+0000: 34485605376: error : virExec:417 :
Cannot find 'pm-is-supported' in path: No such file or directory
2014-06-15 18:47:07.484+0000: 34485605376: warning :
virQEMUCapsInit:948 : Failed to get host power management capabilities
2014-06-15 18:47:07.495+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/var/run/libvirt/qemu
2014-06-15 18:47:07.495+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/etc/libvirt/qemu
2014-06-15 18:47:07.583+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
/usr/local/etc/libvirt/bhyve
2014-06-15 18:47:07.584+0000: 34485605376: info :
virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml'


At this point, I could see the virbr0 device:

virbr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 02:b8:18:5f:0f:00
        inet 192.168.122.1 netmask 0xffffff00 broadcast 192.168.122.255
        nd6 options=1<PERFORMNUD>
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 4
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0


I was then able to do:

virsh -c 'bhyve:///system'
    start bhyve

and start a VM.
This is good progress!

Once thing I observed is that if I killed the libvirtd process,
it did not clean up the dnsmasq process that it started:

/usr/local/sbin/dnsmasq
--conf-file=/usr/local/var/lib/libvirt/dnsmasq/default.conf

and a subsequent restart of libvirtd would fail.


The devel/libvirt port is looking a lot better with your changes.
Can you push these changes into the port?

I filed bugs 190767 and 190783, but did not get any response
from the port maintainer, jgh at .

--
Craig


More information about the freebsd-virtualization mailing list