From owner-freebsd-virtualization@FreeBSD.ORG Wed Jun 11 22:49:55 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DFE54C8; Wed, 11 Jun 2014 22:49:55 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (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 2B5482034; Wed, 11 Jun 2014 22:49:53 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id e16so238926lan.2 for ; Wed, 11 Jun 2014 15:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=srDrHyDOdSr4lgOvwHUesFw/nm/htOcTUD4zu1+na0M=; b=sv3LR2tww4V4mnWv8deo00sJjp0gmhBUWQItvQGplyRSf3FdFKinXBDWgaHzNiTjig Xc1xrcbKVXQgBXccCMfF3f4bc0wv4cwtiaezHMgCDztdcvvi3ZyuwXWJSx39ln9zFjs7 xicLRyDAU/53LN8o9Jlhb+9gT47oYkl32lD3L0rVG8DMoRfz3V086ufYR0aZPvS8Jrgs T9lByMqVH9e7dhkroauYDInKNI0UMD1QIuslz5tpy68w4af8wG1jBQtkfg6QITHl98fE 7WWwfxyEVV7Ttrb6niQXWM9ej82QBGKTibiBBC7BDIgssTrGJXCQKYxu0EHywwwFTFoN Gn5Q== MIME-Version: 1.0 X-Received: by 10.112.143.132 with SMTP id se4mr3847414lbb.53.1402526991435; Wed, 11 Jun 2014 15:49:51 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.67.73 with HTTP; Wed, 11 Jun 2014 15:49:51 -0700 (PDT) In-Reply-To: <20140611192514.GE2855@kloomba> References: <20140610175420.GC61743@kloomba> <20140610191439.GA220@kloomba> <20140611182101.GD2855@kloomba> <20140611192514.GE2855@kloomba> Date: Wed, 11 Jun 2014 15:49:51 -0700 X-Google-Sender-Auth: NivgK4Tr2vRCDeIfCncnV8vYRLw Message-ID: Subject: Re: libvirt and bhyve problems From: Craig Rodrigues To: Roman Bogorodskiy Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-testing@freebsd.org" , Roman Bogorodskiy , "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 22:49:55 -0000 On Wed, Jun 11, 2014 at 12:25 PM, Roman Bogorodskiy wrote: > I've attached a patch which should fix the segfault. Could you please > let me know if it fixes the problem? I have incorporated your patch into the libvirt port, and provided a tarball of the port here: http://people.freebsd.org/~rodrigc/libvirt_port.tgz I can confirm that your patch eliminates the coredump for me. So now I can do the following: (1) Start libvirtd: /usr/local/sbin/libvirtd (2) Start virsh: virsh -c "bhyve:///system" (3) Execute following inside virsh: define bhyve.xml start bhyve ( using bhyve.xml file from http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-June/002588.html ) In the libvirtd console, I see this: 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=bhyve) unexpected exit status 255 For the last line, it looks like it is trying to do bhyvectl --destroy --vm=bhyve on a VM which doesn't exist, i.e. there is no entry in /dev/vmm/bhyve It should ignore the error at this point and try to spawn the VM, but it fails. -- Craig