From owner-freebsd-testing@FreeBSD.ORG Thu Jun 12 19:03:02 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 35247A7B; Thu, 12 Jun 2014 19:03:02 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (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 452B32DE8; Thu, 12 Jun 2014 19:03:01 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id u10so952375lbd.24 for ; Thu, 12 Jun 2014 12:02:59 -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=kkn1bENRNXvAUpmFKYaAOigpj4IMxP8ifSDMNQd8a8I=; b=WFHazADP99dAYZQKwCEWfjLsCHWl9Pi4nuDZ9jnbnk9D2BV/c0taz7LQ0qjITUj4Rd TmBVi2caAqjOEZU+/JiOLRge4vUtMC4/YxZ/nFhy5JyfwkNAW9hFIPAAy5tcBi28thkR 0qHpwqhsdJyiY4RVTsB5tlboce2SsyFyI7ZctiW17uiqWRHavBbLB00VHzWa/pZsa9SG A90UPRpfGs2lfJphf4M3OEYs4QPTqP7zznKqUmzckrkK0MrbkIsCWloFTkBQ5lfYXYho SRkuJhRiukLd+zLZPbNyZV6H/cqEVWlz00hyV/ts663wOtXRiMMo9b3RZoz0cbET/6aq MAJA== X-Received: by 10.152.234.229 with SMTP id uh5mr2923590lac.56.1402599779011; Thu, 12 Jun 2014 12:02:59 -0700 (PDT) Received: from kloomba ([217.65.223.250]) by mx.google.com with ESMTPSA id d8sm25043689lah.12.2014.06.12.12.02.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 12:02:58 -0700 (PDT) Sender: Roman Bogorodskiy Date: Thu, 12 Jun 2014 23:00:43 +0400 From: Roman Bogorodskiy To: Craig Rodrigues Subject: Re: libvirt and bhyve problems Message-ID: <20140612190042.GA2858@kloomba> References: <20140611182101.GD2855@kloomba> <20140611192514.GE2855@kloomba> <20140612080057.GA93486@kloomba> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" 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 19:03:02 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Craig Rodrigues wrote: > On Thu, Jun 12, 2014 at 11:28 AM, Craig Rodrigues w= rote: > > On Thu, Jun 12, 2014 at 1:00 AM, Roman Bogorodskiy = wrote: > >> > >> 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. > > > > > > I deleted the old port from my system and took your modified port, > > built it, and installed it. > > > > I followed my previous steps in: > > http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-June/002= 588.html > > and got this: > > > > 2014-06-12 18:23:54.328+0000: 34485605376: info : libvirt version: 1.2.5 > > 2014-06-12 18:23:54.328+0000: 34485605376: error : > > dnsmasqCapsRefreshInternal:726 : Cannot check dnsmasq binary dnsmasq: > > No such file or directory > > 2014-06-12 18:23:54.328+0000: 34485605376: info : > > networkReloadFirewallRules:1750 : Reloading iptables rules > > 2014-06-12 18:23:54.328+0000: 34485605376: info : > > networkRefreshDaemons:1722 : Refreshing network daemons > > 2014-06-12 18:23:54.438+0000: 34485605376: error : virExec:417 : > > Cannot find 'pm-is-supported' in path: No such file or directory > > 2014-06-12 18:23:54.439+0000: 34485605376: warning : > > virQEMUCapsInit:948 : Failed to get host power management capabilities > > 2014-06-12 18:23:54.460+0000: 34485605376: info : > > virDomainObjListLoadAllConfigs:18249 : Scanning for configs in > > /usr/local/var/run/libvirt/qemu > > 2014-06-12 18:23:54.461+0000: 34485605376: info : > > virDomainObjListLoadAllConfigs:18249 : Scanning for configs in > > /usr/local/etc/libvirt/qemu > > 2014-06-12 18:23:54.560+0000: 34485605376: info : > > virDomainObjListLoadAllConfigs:18249 : Scanning for configs in > > /usr/local/etc/libvirt/bhyve > > 2014-06-12 18:23:54.560+0000: 34485605376: info : > > virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml' > > 2014-06-12 18:24:17.940+0000: 34485598208: error : > > virNetDevBridgeAddPort:399 : Unable to add bridge tap0 port vnet0: > > Invalid argument > > 2014-06-12 18:24:18.056+0000: 34485598208: error : virCommandWait:2426 > > : internal error: Child process (/usr/sbin/bhyvectl --destroy > > --vm=3Dbhyve) unexpected exit status 255 > > > > > > -- > > Craig >=20 >=20 > After the program fails, these are my tap and bridge devices, as shown > by ifconfig: >=20 > bridge0: flags=3D8843 metric 0 mt= u 1500 > ether 02:29:45:c7:8f:00 > nd6 options=3D9 > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > member: em0 flags=3D143 > ifmaxaddr 0 port 1 priority 128 path cost 20000 > member: tap2 flags=3D143 > ifmaxaddr 0 port 7 priority 128 path cost 2000000 > member: tap1 flags=3D143 > ifmaxaddr 0 port 6 priority 128 path cost 2000000 > member: tap0 flags=3D143 > ifmaxaddr 0 port 5 priority 128 path cost 2000000 > tap0: flags=3D8902 metric 0 mtu 1500 > options=3D80000 > ether 00:bd:53:27:00:00 > nd6 options=3D29 > media: Ethernet autoselect > status: no carrier > tap1: flags=3D8902 metric 0 mtu > 1500 > options=3D80000 > ether 00:bd:59:27:00:01 > nd6 options=3D29 > media: Ethernet autoselect > status: no carrier > tap2: flags=3D8943 > metric 0 mtu 1500 > options=3D80000 > ether 00:bd:5e:27:00:02 > nd6 options=3D29 > media: Ethernet autoselect > status: active > Opened by PID 1506 > vnet0: flags=3D8802 metric 0 mtu 1500 > options=3D80000 > ether fe:54:00:33:20:8c > nd6 options=3D21 > media: Ethernet autoselect > status: no carrier >=20 >=20 > This is in my /etc/rc.conf for creating bridge and tap devices on bootup: >=20 > ##################################################### > # Create tap devices, one tap interface per BHyve VM. > # Add the tap interfaces to bridge0 > #################################################### > cloned_interfaces=3D"bridge0 tap0 tap1 tap2" >=20 > autobridge_interfaces=3D"bridge0" > autobridge_bridge0=3D"tap* em0" Ah. Actually, libvirt manages bridges and taps on its own. So, the preferred flow is that libvirt starts its networks on startup automatically. By default it has a network with the 'virbr0' device which it creates on its own. Later on it creates vnet devices (which are tap devices) automatically as well on VM startup and plugs them to the bridge. The configuration you have probably confuses it, could you consider trying without that? Also, do you have working 'net-list' command in virsh with my version of port? PS If you're available for some real-time conversation such as on IRC, I think some kind of things would be faster to discuss there. Thanks, Roman Bogorodskiy --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJTmfjaAAoJEMltX/4IwiJq4K8H/1o5UX77Kw3FO+CN/cCOt4H7 Aa06bB9vCSJrRK8qlc2HJgiXvQgC2IeczkcCJ4EVkc6tLSnSdSTtvJt6u1PKaAz1 varEsL5KMHhP9KSXfqZ7VJC4/EY/mnJRkWtUErZDnFA51i4wDEFZa7KFm19TxZHI oP3DLkG5PwkaB+9WccuPWyNKYNwtvzYVAXsjyZKlfmC0bw5/ebWE9VWppXNoC2Ui guDLQGo8HYa+tpxSZg11xs4Obn9aQufn7idPs6/2FV+aTiPmI7UCYs2HA3WaO3fh BPGpQiEcG7rNQbjQ6xfsquQNv689zxm0RPK7ZeMvbtvn4dsDI9Xl7uANGYWv5Q0= =Bs7F -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--