From owner-freebsd-testing@FreeBSD.ORG Thu Jun 12 08:03:16 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC8FB4CC; Thu, 12 Jun 2014 08:03:16 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D39DB2CF6; Thu, 12 Jun 2014 08:03:15 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id q8so463816lbi.40 for ; Thu, 12 Jun 2014 01:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0yq7A4cxJhqwVjEsUUsGX9VUhL2ycxxql7zvwxw8ji4=; b=ijvMpHd0io9j5o8QPYs19TlZmm8jsztvBqsCehN+yrz4SNb7V6K5fyJQY3jq32VdA4 iBEUTj73N3MgRfN+GefxMmcN3R7o/bDz/3PwTKHCzkjbdau8Hm9Wz3c+QeaWfmH7U2bQ Z0CxIFyJrSaSsJbEE8T9k/TxRQ1HA4gtTnPRKiZ27v6HQ75In3JL50D5ucnaCCDpns7z 6OMzqhTGv2I3bKpPdb3OdmqV4+lsdhIwgb2wQ/b8veazszYdbLOGzWi6cMctj8tzpyWs XpDmU6SRGT37LJAIjTrEv2ESPoT2D97+s2+WI1iQ+AWzxXAqPaM3yow5HcDUkB2RQaTc wDOg== X-Received: by 10.152.199.39 with SMTP id jh7mr31523168lac.18.1402560193797; Thu, 12 Jun 2014 01:03:13 -0700 (PDT) Received: from kloomba ([217.65.223.250]) by mx.google.com with ESMTPSA id 6sm1508783laz.6.2014.06.12.01.03.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 01:03:12 -0700 (PDT) Sender: Roman Bogorodskiy Date: Thu, 12 Jun 2014 12:00:59 +0400 From: Roman Bogorodskiy To: Craig Rodrigues Subject: Re: libvirt and bhyve problems Message-ID: <20140612080057.GA93486@kloomba> References: <20140610175420.GC61743@kloomba> <20140610191439.GA220@kloomba> <20140611182101.GD2855@kloomba> <20140611192514.GE2855@kloomba> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-testing@freebsd.org" , Roman Bogorodskiy , "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 08:03:16 -0000 --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 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--