bhyve Trying to virtualize Solaris 11.4 with bhyve...

Hello.

I'm trying to boot and install Solaris 11.4 using bhyve. For some technical and unknown reason to me,bhyve is not able to detect and use the CD-ROM. To understand why,I've asked all around and I found what are the parameters needed to boot
it in qemu. I've used qemu as a means of comparison to understand the reason.

Well,the following are the correct parameters used by qemu to be able to boot the iso image and to start the installation :

Code:
qemu-system-x86_64 -name guest=s11x64,debug-threads=on \
-machine pc,usb=off \
-cpu kvm64,hv_relaxed,hv_time,hv_synic \
-m 8G -smp 2,sockets=2,cores=1,threads=1 \
-nodefaults -no-shutdown \
-drive if=pflash,format=raw,readonly=on,file=/usr/local/share/edk2-qemu/QEMU_UEFI_CODE-x86_64.fd \
-drive if=pflash,format=raw,file=/usr/local/share/edk2-qemu/QEMU_UEFI_VARS-x86_64.fd \
-drive file=/mnt/zroot2/zroot2/OS/ISO/Unix/Solaris/sol-11_4-text-x86.iso,media=cdrom,if=ide \
-drive file=/mnt/zroot2/zroot2/bhyve/img/Solaris/solaris114-empty.img,format=raw,if=virtio \
-global PIIX4_PM.disable_s3=1 \
-global PIIX4_PM.disable_s4=1 \
-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x4.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \
-device VGA,id=video0,vgamem_mb=32,bus=pci.0,addr=0x2 \
-netdev tap,id=mynet0,ifname=tap4,script=no,downscript=no \
-device e1000,netdev=mynet0,mac=52:55:00:d1:55:01 \
-device ich9-ahci,id=sata

here we go :

Istantanea_2024-10-29_00-23-52.png


Instead,these are the parameters that I used in bhyve :

Code:
/usr/sbin/./bhyve-win -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \
-s 0,hostbridge \
-s 1,ahci-cd,/mnt/zroot2/zroot2/OS/ISO/Unix/Solaris/sol-11_4-text-x86.iso,bootindex=1 \
-s 2,virtio-blk,/mnt/zroot2/zroot2/bhyve/img/Solaris/solaris114-empty.img \
-s 29,fbuf,tcp=0.0.0.0:5915,w=1600,h=950,wait \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \
vm0:15 < /dev/null & sleep 2 && vncviewer 0:15 &

and this is what happens when I try to start the installation of Solaris :


Istantanea_2024-10-29_00-23-52.png


it hangs there forever. My conclusion. This is the key :

Code:
-drive file=/mnt/zroot2/zroot2/OS/ISO/Unix/Solaris/sol-11_4-text-x86.iso,media=cdrom,if=ide \

Solaris needs that the cdrom is detected as IDE. Now,I'm almost sure that ahci-cd is not compatible with IDE.
Is that right ? Can someone confirm it ? Can bhyve offer another parameter to use instead of ahci-cd ?
Or maybe BHYVE_UEFI_CODE.fd is not good ?
 
Last edited:
This version worked...(Solaris 11.4 does not support : -s 0,hostbridge)

Code:
/usr/sbin/./bhyve-win -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \
-s 1,ahci-cd,/mnt/zroot2/zroot2/OS/ISO/Unix/Solaris/sol-11_4-text-x86.iso,bootindex=1 \
-s 2,virtio-blk,/mnt/zroot2/zroot2/bhyve/img/Solaris/solaris114-empty.img \
-s 29,fbuf,tcp=0.0.0.0:5915,w=1600,h=950,wait \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,/usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd \
vm0:15 < /dev/null & sleep 2 && vncviewer 0:15 &

Istantanea_2024-10-29_13-14-06.png
 
I should reopen this thread because a problem to fix arose when I tried to connect Solaris to the Internet. I've asked the VirtIO driver for Solaris and a very gentle developer gave it to me,but unfortunately it does not work with the virtio-net driver used by bhyve. You can read by yourself what's the situation :

Code:
Yes, I can provide you with a working driver for Solaris 11.3/4:

https://www.gulag.ch/www/download/virtio-solaris114.p5p.xz

The Solaris IPS archive contains the following IPS packages:
---
oss/virtio@1.0.2,5.11-1:20200108T023644Z
pcs/vm-guest-custom@1.0.0,5.11-1:20200414T104804Z
---

oss/virtio - the VirtIO net driver package (based on Illumos)
pcs/vm-guest-custom - a configuration package which makes some changes
to system(5)

Please be aware that I never tested this version of the driver with the
CBE version 11.4.42 of Solaris!

In case this is news to you, Oracle introduced VirtIO drivers with SRU33:

https://blogs.oracle.com/solaris/post/introducing-virtio-drivers-with-oracle-solaris-on-oci

Sadly the net driver (vtionet) does not work with Bhyve virtio-net
(which adheres to version 0.9 of the specification and Solaris expects
1.1) but the block driver (vtioblk) works with Bhyve virtio-blk.

so,the question is : Am I forced to use virtio-net 0.9 with bhyve or I can use another driver / version that may be liked by Solaris ?
 
The e1000 network driver workes for me. I am using vm-bhyve though. Here is my config:

Code:
loader="uefi"
virt_random="yes"
grub_options="-p"

debug="yes"

hostbridge="none"

cpu=1
memory=6G

network0_type="e1000"
network0_switch="jail"

graphics="yes"
graphics_wait="yes"
xhci_mouse="no"
graphics_res="1600x900"

ahci_device_limit="8"

disk0_type="ahci-hd"
disk0_name="disk0.img"
uuid="e632d8c7-b935-11ef-a295-002b670f6403"
network0_mac="58:9c:fc:05:b6:e3"
 
I never used e1000 instead of virto-net (---> I don't use vm-bhyve). I've used it now. And it works. Good to know. Very thanks.
 
Of course it works using e1000! Intel NICs are supported by Solaris out
of the box. But this NIC emulation does not perform very well ;-) for a
better network performance VirtIO NET (Bhyve virtio-net) is recommended.
In order to activate Virtio NET for Solaris you have two options:

1: Install Solaris without a NIC and install oss/virtio afterwards via
ISO (with the help of Bhyve ahci-cd).

2: Install Solaris with a e1000 NIC (which is supported out of the box
by Solaris) and install oss/virtio afterwards (via IPS, NFS, etc.).

After the installation of oss/virtio and pcs/vm-guest-custom you should
reboot your VM twice before activating Bhyve virtio-net (by introducing
a new Bhyve virtio-net NIC (case 1:) or changing the Bhyve NIC from
e1000 to virtio-net (case 2:)).
 
Back
Top