NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Couldn't boot NetBSD-9.2-amd64-install.img on bhyve VM



Hello.

I'm a FreeBSD user and a bhyve lover. I've read the Yuuki post and I want to give some help. I'm installing netbsd92 on my FreeBSD 13Rp8 using the following parameters :

setxkbmap it

bhyvectl --vm=vm13 --force-reset

set vmdisk=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (NM13N4CZ)/ && d{print d}'`
echo $vmdisk

set vmdisk0=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (20130506005976F)/ && d{print d}'`
echo $vmdisk0

set vmdisk1=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (2015020204055E)/ && d{print d}'`
echo $vmdisk1

set vmdisk2=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (2022285F1175)/ && d{print d}'`
echo $vmdisk2

set vmdisk3=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (BE0191500218)/ && d{print d}'`
echo $vmdisk3

set vmdisk4=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (38434B4237354B45)/ && d{print d}'`
echo $vmdisk4

set vmdisk5=`geom disk list | awk '/^Geom name: /{d=$NF} /^ *ident: (WD-WCAV2X597309)/ && d{print d}'`
echo $vmdisk5

mount -t ufs /dev/$vmdisk'p2' /mnt/$vmdisk'p2'

bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H -A \
-s 0,hostbridge \
-s 1,ahci-cd,/mnt/$vmdisk'p2'/bhyve/iso/BSD/NetBSD-9.2-amd64.iso \
-s 2,ahci-hd,/mnt/$vmdisk'p2'/bhyve/os/BSD/netbsd92.img \
-s 7:0,passthru,2/0/0 \
-s 7:1,passthru,2/0/1 \
-s 7:2,passthru,2/0/2 \
-s 7:3,passthru,2/0/3 \
-s 8,virtio-net,tap13 \
-s 9,virtio-9p,sharename=/ \
-s 29,fbuf,tcp=0.0.0.0:5913,w=1440,h=900 \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm13 < /dev/null & sleep 2 && vncviewer 0:13

Screenshot_2022-04-19_15-21-07.jpg
maybe this can help.

Il giorno mar 19 apr 2022 alle ore 14:50 Yuuki Enomoto <uki%e-yuuki.org@localhost> ha scritto:
On Sun, Apr 17, 2022 at 07:43:00AM -0400, Greg Troxel wrote:

> I would look at the bhyve logs, and see if you can turn on debugging.
> It looks like the within-VM system (domU in xen terms) is accessing the
> disk, but the hypervisor is seeing the accesses as malformed or
> erroneous.

I'm using vm-bhyve. I've turn on debugging but no logs in debug log.

> I would also suggest booting single user and trying dd in the utility
> menu, both reading from and writing to the virtual disk.

I did zero writing to the disk after exit from installer.

Result:

# dd if=/dev/zero of=/dev/ld0 bs=1M count=1
dd: /dev/ld0: end of device
1+0 records in
0+0 records out
0 bytes transferred in 0.001 secs (0 bytes/sec)

> Also, look at how the disk attaches, in dmesg.  Often there are pciide
> controllers, and ahcisata, or various other kinds, and it may be that
> bhyve provides multiple options and some work and some don't and
> disabling  the non-working one would be a workaround.

I attach full dmesg image.
I'm investigating about vm-bhyve disk option...

> It seems overwhelmingly likely that there is a bug in NetBSD or bhyve,
> but really hard to say which.  I suspect the bhyve people would be
> interested in looking into this and would suggest asking there, but if
> you can get a well-documented and more minimal failure case, I bet that
> would help greatly.

OK, I'd ask a question to bhyve relation mailing list.

> > In addition, the following image boot fine. So it may install image
> > specific issue.
> >
> > - FreeBSD-13.0-RELEASE-amd64-memstick.img (from FreeBSD official)
> > - NetBSD-9.2-amd64.iso (from https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/images/)
>
> But after you boot the 9.2 iso, can you read/write to the disk?

No. I tried to proceed installation through the ISO but `gpt create` command
failed when disk partitioning. I entered to shell then run gpt manually:

# gpt create -p 128 ld0
gpt: /dev/rld0: Media size can't be 0

--
Yuuki Enomoto <uki%e-yuuki.org@localhost>
B684 4BF2 9CD4 961F 510A  8121 7B4D FF44 2348 20B8


--
Mario.


Home | Main Index | Thread Index | Old Index