From owner-freebsd-virtualization@freebsd.org Fri Mar 23 18:12:24 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 8F86BF607DB for ; Fri, 23 Mar 2018 18:12:24 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (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 E680983C9E; Fri, 23 Mar 2018 18:12:23 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2NICLvV032461; Fri, 23 Mar 2018 11:12:21 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2NICLEW032460; Fri, 23 Mar 2018 11:12:21 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201803231812.w2NICLEW032460@pdx.rh.CN85.dnsmgr.net> Subject: Re: Issue encountered booting FreeBSD STABLE and CURRENT snapshots with EFI In-Reply-To: To: Kyle Evans Date: Fri, 23 Mar 2018 11:12:21 -0700 (PDT) CC: Warner Losh , "freebsd-virtualization@freebsd.org" X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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:12:24 -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... And this also appers to works with the Windows boot code.. so I do suspect something has become broken in the new loader. -- Rod Grimes rgrimes@freebsd.org