Use of installation media (ISO images)
Installation programs for operating systems are often made available for download as ISO images via websites. Under TwinCAT/BSD fetch(8)
can be used to download an ISO image from a website.
The following call loads the Debian ISO image debian-11.5.0-amd64-netinst.iso
from the website cdimage.debian.org and saves it locally in the file os-installer.iso
.
fetch -o os-installer.iso https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.5.0-amd64-netinst.iso
The downloaded ISO file can then in turn be used as media in a virtual CD-ROM drive (ahci-cd) of a virtual machine.
doas bhyve \
-c sockets=1,cores=1,threads=1 \
-m 2G \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_UEFI.fd \
-s 0,hostbridge \
-s 2,fbuf,rfb=0.0.0.0:5900,w=1024,h=768 \
-s 3,xhci,tablet \
-s 15,ahci-cd,/usr/home/Administrator/os-installer.iso,ro \
-s 31,lpc \
-A -H -P \
samplevm