Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jun 2014 12:00:59 +0400
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        Craig Rodrigues <rodrigc@FreeBSD.org>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, Roman Bogorodskiy <bogorodskiy@gmail.com>, "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: libvirt and bhyve problems
Message-ID:  <20140612080057.GA93486@kloomba>
In-Reply-To: <CAG=rPVcN-O=cowV7VbD8OW2dtw6BN0H54y5p9_rAPMAHwAxBhQ@mail.gmail.com>
References:  <20140610175420.GC61743@kloomba> <CAG=rPVcgR4oP3-K_Mfih3xbtD5=99HW9z9L7aK11K7MtjRXtoA@mail.gmail.com> <20140610191439.GA220@kloomba> <CAG=rPVeKCW7WE=XUTkv_fzuqoEz8VTYb3gXOuKsVZFiczkat-Q@mail.gmail.com> <CAG=rPVd_oqrPXjMdSLJdoLM0AfB5eP4yh1_UgnaxYhP4%2BabdWw@mail.gmail.com> <CAG=rPVdWJZX9ZPinM5AqPgGocVnPQLfFbQuyRx-rhhSR1jPa=A@mail.gmail.com> <20140611182101.GD2855@kloomba> <CAG=rPVffHEFNUwtp4uFk_Sye1iMYixRaJ6D9v-LHjyUKJgkQ0g@mail.gmail.com> <20140611192514.GE2855@kloomba> <CAG=rPVcN-O=cowV7VbD8OW2dtw6BN0H54y5p9_rAPMAHwAxBhQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

  Craig Rodrigues wrote:

> On Wed, Jun 11, 2014 at 12:25 PM, Roman Bogorodskiy <novel@freebsd.org> w=
rote:
> > I've attached a patch which should fix the segfault. Could you please
> > let me know if it fixes the problem?
>=20
> I have incorporated your patch into the libvirt port, and provided a tarb=
all
> of the port here:
>=20
> http://people.freebsd.org/~rodrigc/libvirt_port.tgz
>=20
> I can confirm that your patch eliminates the coredump for me.
>=20
> So now I can do the following:
>=20
> (1)  Start libvirtd:
>                 /usr/local/sbin/libvirtd
>=20
> (2)  Start virsh:
>                 virsh -c "bhyve:///system"
>=20
> (3)  Execute following inside virsh:
>            define bhyve.xml
>            start bhyve
>=20
>            ( using bhyve.xml file from
> http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-June/00258=
8.html
> )
>=20
> In the libvirtd console, I see this:
>=20
> 2014-06-11 22:47:16.357+0000: 34485605376: info : libvirt version: 1.2.5
> 2014-06-11 22:47:16.357+0000: 34485605376: error : virExec:417 :
> Cannot find 'pm-is-supported' in path: No such file or directory
> 2014-06-11 22:47:16.357+0000: 34485605376: warning :
> virQEMUCapsInit:948 : Failed to get host power management capabilities
> 2014-06-11 22:47:21.050+0000: 34485605376: info :
> virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
> /usr/local/var/run/libvirt/qemu
> 2014-06-11 22:47:21.063+0000: 34485605376: info :
> virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
> /usr/local/etc/libvirt/qemu
> 2014-06-11 22:47:21.168+0000: 34485605376: info :
> virDomainObjListLoadAllConfigs:18249 : Scanning for configs in
> /usr/local/etc/libvirt/bhyve
> 2014-06-11 22:47:21.168+0000: 34485605376: info :
> virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml'
> 2014-06-11 22:47:43.469+0000: 34485598208: error :
> virNetDevBridgeAddPort:399 : Unable to add bridge tap0 port vnet18:
> Invalid argument
> 2014-06-11 22:47:43.573+0000: 34485598208: error : virCommandWait:2426
> : internal error: Child process (/usr/sbin/bhyvectl --destroy
> --vm=3Dbhyve) unexpected exit status 255
>=20
>=20
>=20
> For the last line, it looks like it is trying to do bhyvectl --destroy
> --vm=3Dbhyve
> on a VM which doesn't exist, i.e. there is no entry in /dev/vmm/bhyve
>=20
> It should ignore the error at this point and try to spawn the VM, but it =
fails.

This actually happens because it fails to spawn a VM (because there's no
bridge) and tries to make sure to unload previously loaded VM in order
not to leave it in a stale state.

I have adjusted the port:

http://people.freebsd.org/~novel/misc/libvirt_port_updated.tgz

With this setup, I'm able to get networking (e.g. virsh net-list works)
and updated the fix for the previous problem. I was able to start a VM
with that setup.

Roman Bogorodskiy

--x+6KMIRAuhnl3hBn
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (FreeBSD)

iQEcBAEBAgAGBQJTmV45AAoJEMltX/4IwiJq9FgIAKHhXqh6lCsayHuBn3pWAFXL
xqu9ND5I7CtQfKRtDFzMqGKPmca/mYUsvycw6GBiVPWiAWjKK6EPocZ6mr4joI3f
v0Yt4w+d6HB1sFCVSg76sBKUSxIYW/wk7CO6MhqLcPvKi4XwBhXP59+2VdIP3hQJ
Am8OysrgLOGhjJg0GjpY7hwHgJnKsgcvQztktg/4+dNtScs6cb498DY1WgnpJBdI
3CwefU1n8sHm8yxAQNHE8sD11kUeYAxDqn8YUaBUZH5GvKom3KsFLKYAkDdfdZoa
5FQFmmZtX1iwodIT6wHfK2aRJqH2sidQOf+xkakQOPEvaMUZPzrfScwjoLKj0Ho=
=K62g
-----END PGP SIGNATURE-----

--x+6KMIRAuhnl3hBn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140612080057.GA93486>