From owner-freebsd-virtualization@freebsd.org Fri Mar 23 18:06:20 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C79BF5FB8B for ; Fri, 23 Mar 2018 18:06:20 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF0C883388; Fri, 23 Mar 2018 18:06:19 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f44.google.com with SMTP id c78-v6so14879482lfh.1; Fri, 23 Mar 2018 11:06:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NRqooJ2sc7BD0bIG9WVRktLrtTFbdpv3VXapw9GwpMY=; b=lC81qEoYCRwfClKTEBgij1PnYZ9UKFRW599abaN/UFSi1IbPMBf2EQTlTcJmrsrbSB uLFS3cr/93Ljqv5D/5nnhnpqQCJNgHQ/NDQOwaMealG6ioSlpA0aFsef/EcG8GQLuMTh Cp6A+w06t6VVGbBGcuz5sUPDPKoHZqbcetjJ0ebvpaB+pP8Nz9J4lrXobg0wc4DUBX9i G894kWUoWpZt0HdSd0PZZNKDeqted4D/dtT0ZJJUD4EY8jYRM+iNy9CW2m6obBKUtnvj Auwe4IvSkhHYCwiugfQ69+zW6++SBf7a6TfxX5TWi6gqLxO6g85hFzYBtxUEE29W9wzO PCAw== X-Gm-Message-State: AElRT7H/fRDwxC0fKZHoUVhvp25lSamc+50WlzzK9BNiHgah8wW4B2Me Xq15AZO3p4W+L4DGzxe/38T/V19Nerc= X-Google-Smtp-Source: AG47ELscV+B2Ot7UhshP4ycROu32gaD6WleJRhD0uzFEV+c1xYPA4CdsyIdBG7GuSEVhb2k4KZ5kWg== X-Received: by 10.46.83.67 with SMTP id t3mr19585051ljd.63.1521828377922; Fri, 23 Mar 2018 11:06:17 -0700 (PDT) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com. [209.85.215.42]) by smtp.gmail.com with ESMTPSA id e28-v6sm2332800lfb.52.2018.03.23.11.06.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 11:06:17 -0700 (PDT) Received: by mail-lf0-f42.google.com with SMTP id p142-v6so19563701lfd.6; Fri, 23 Mar 2018 11:06:17 -0700 (PDT) X-Received: by 2002:a19:114f:: with SMTP id g76-v6mr15613102lfi.108.1521828377474; Fri, 23 Mar 2018 11:06:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Fri, 23 Mar 2018 11:05:56 -0700 (PDT) In-Reply-To: <201803231804.w2NI4FQq032385@pdx.rh.CN85.dnsmgr.net> References: <201803231804.w2NI4FQq032385@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 23 Mar 2018 13:05:56 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue encountered booting FreeBSD STABLE and CURRENT snapshots with EFI To: "Rodney W. Grimes" Cc: Joe Maloney , Warner Losh , "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 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: Fri, 23 Mar 2018 18:06:20 -0000 On Fri, Mar 23, 2018 at 1:04 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On Fri, Mar 23, 2018 at 9:58 AM, Rodney W. Grimes >> wrote: >> >> On Fri, Mar 23, 2018 at 3:56 AM, Joe Maloney wrote: >> >> > We narrowed the issue down to how vm-bhyve attaches a null.iso when starting >> >> > the VM. >> >> > >> >> >> >> What exactly are the contents of this null.iso? It sounds like we're >> > >> > touch "null.iso" >> > -rw-r--r-- 1 root wheel 0 Dec 3 22:55 /home/vmbhyve/.config/null.iso >> > >> > It is litterly a 0 byte file. This is just there to appease windows >> > installer that you have a cd drive. >> > >> > You can test with bhyve yourself this problem by adding: >> > -s 3:0,ahci-cd,${vm_dir}/.config/null.iso >> > to your bhyve command. >> > >> >> Thanks for that! A couple hundred printf's later, I think this might >> be a firmware bug or something of the sort (?). >> >> In this loop [1], the address at 'dp' is getting immediately clobbered >> by the efi_lookup_devpath on every iteration, so we end up looking at >> basically all of the partitions and this null.iso unfortunately meets >> this criteria [2] for removable media with no media present. >> Therefore, we detect absolutely no disks. >> >> The only candidate in efi_lookup_devpath [3] is the firmware itself >> having overwritten the devpath at that address. We can confirm this >> with a printf just after the efi_lookup_devpath- the pointer it's >> returning is in fact exactly match 'dp' every single time. >> >> Is there a newer/different firmware you can try? This seems like >> really peculiar behavior for a firmware to be exhibiting. > > What happened to the boot device on the hd? > There should be another -s x:0, ahci-hd drive that it boots from. > -s 4:0,ahci-hd,${vm_dir}/${vmname}/disk0.img > Right, it's there but we think it's removable media with no media present because of the above-mentioned clobbering by the firmware. We could probably work around it for this specific case, but I don't know if that's a great idea- there be snakes here...