From owner-freebsd-stable@freebsd.org Sat Oct 29 17:35:27 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91CDAC20A4E for ; Sat, 29 Oct 2016 17:35:27 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 173DDD29; Sat, 29 Oct 2016 17:35:26 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id u9THZPo7021161; Sat, 29 Oct 2016 19:35:25 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (titan.inop.mo1.omnilan.net [IPv6:2001:a60:f0bb:1::3:1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id DC221B3F; Sat, 29 Oct 2016 19:35:24 +0200 (CEST) Message-ID: <5814DDDC.60104@omnilan.de> Date: Sat, 29 Oct 2016 19:35:24 +0200 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-stable@freebsd.org CC: Alexander Motin Subject: Re: Unexpected ahci-hd bytes when running in bhyve(8) References: <58124200.5080306@omnilan.de> <5814C101.90805@omnilan.de> In-Reply-To: <5814C101.90805@omnilan.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Sat, 29 Oct 2016 19:35:25 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 17:35:27 -0000 Bezüglich Harry Schmalzbauer's Nachricht vom 29.10.2016 17:32 (localtime): … > Like mentioned, while reading the first 448 bytes on the host, I get > identical results from /usr/local/guest.img and /dev/ada4, but when > attaching /dev/ada4 to ahci-hd (-s 7,ahci-hd,/dev/ada4) and inspecting > inside vmm, all I see is 0x0, while ahci-hd attached > /usr/local/guest.img shows the same pmbr as on the host!? > > Do I have to exclude /dev/ada4 on the host from geom? As soon as bhyve > opens /dev/ada4, all partitions vanish from the host – probably ada4 > itself gets blocked somehow? Maybe that's related? https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-April/003509.html (resulting in https://svnweb.freebsd.org/base?view=revision&revision=281700) Just another symptom I can only describe, not debug: Opening /dev/adaX on the host works by 'hd /dev/ada4 | less', but not inside the guest, where it just leads to endless IO when trying the same on the ahci-hd attached /dev/ada4. Of course I found discussion threads about virtio-scsi, which was more appropriate for my needs, but unfortunately nobody skilled enough had time to implement yet afaik and it also wouldn't solve my problems while this ssd is SATA attached (could switch to a SAS port so the HBA would do SAT which should work then...) Are there any other ways I'm missing to get mass storage into the guest? ZVOl is a very good candidate for many setups, but not for all. RAw-device-mappings to HBA-virtual-drives is doing a great job on ESXi, but replacing HBA-virt-drive RAW-mappings with ZVOL isn't really the same and sometimes I need physical devices in the guest. P(cie)P(ass)T(through) seems to work great in bhyve, but I can't sacrifice a complete HBA to accomplish. Thanks, -harry