Re: Bhyve CD-ROM
- Reply: Mario Marietto : "Re: Bhyve CD-ROM"
- In reply to: Sysadmin Lists via virtualization : "Re: Bhyve CD-ROM"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Dec 2021 01:58:13 UTC
I decided to jump down the rabbit hole, and it lead me to something even easier.
I can create a memory disk from the ISO and pass the whole thing to Bhyve as a virtio-blk device.
I can then mount the partition of the block device inside the guest to access its contents:
file -sL /media/Debian-11.1.0-amd64-DVD-1.iso
[...] ISO 9660 CD-ROM filesystem data [...]
mdconfig -at vnode /media/Debian-11.1.0-amd64-DVD-1.iso
bhyve -w -H \
-s 0,hostbridge \
-s 3,virtio-blk,/dev/zvol/zroot/bhyve_vms/debianvm \
-s 4,virtio-blk,/dev/md0 \
-s 5,virtio-net,tap0 \
-s 29,fbuf,tcp=0.0.0.0:5914,w=800,h=600,wait \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd debianvm
And inside the guest vm:
fdisk -l
# /dev/vdb1 ... Empty
# /dev/vdb2 ... EFI (FAT-12/16/32)
file -sL /dev/vdb1
# [...] ISO 9660 CD-ROM filesystem data [...]
mount /dev/vdb1 /media/
# [...] mounted read-only
ls /media/
# [ rom contents ]
Thanks for the tip.
> ----------------------------------------
> From: Sysadmin Lists via virtualization <virtualization@freebsd.org>
> Sent: Tue Nov 30 22:01:17 CET 2021
> To: <virtualization@freebsd.org>, Miroslav Lachman <000.fbsd@quip.cz>, Mario Marietto <marietto2008@gmail.com>
> Cc: Corvin Köhne <C.Koehne@beckhoff.com>
> Subject: Re: Bhyve CD-ROM
>
>
> That's a mighty-tempting looking rabbit hole you've got there ....
>
> > ----------------------------------------
> > From: Miroslav Lachman <000.fbsd@quip.cz>
> > Sent: Tue Nov 30 13:27:32 CET 2021
> > To: <virtualization@freebsd.org>, Mario Marietto <marietto2008@gmail.com>
> > Cc: Corvin Köhne <C.Koehne@beckhoff.com>
> > Subject: Re: Bhyve CD-ROM
> >
> > If memory serves me right shorting the ISO (any disk device) by some
> > sectors can be done "on the fly" with gnop utility.
> > Something like gnop create -o <offset> ...
> >
> > Miroslav Lachman
--
Sent with https://mailfence.com
Secure and private email