Date: Wed, 1 Dec 2021 02:58:13 +0100 (CET) From: Sysadmin Lists via virtualization <virtualization@freebsd.org> To: virtualization@freebsd.org, Miroslav Lachman <000.fbsd@quip.cz> Cc: =?utf-8?Q?Corvin_K=C3=B6hne?= <C.Koehne@beckhoff.com>, Mario Marietto <marietto2008@gmail.com> Subject: Re: Bhyve CD-ROM Message-ID: <1056372565.291120.1638323893028@ichabod.co-bxl> In-Reply-To: <1556048440.260065.1638306076965@ichabod.co-bxl> References: <1786593170.587714.1638135091567@ichabod.co-bxl> <CA%2B1FSiiarPVt55iZXQZ8-cidvp_iHBkomQFsg8gORVYrq2=xJQ@mail.gmail.com> <711266519.635448.1638165807735@ichabod.co-bxl> <3e5cfc26e781421ba0244d5c78c3a4d4@beckhoff.com> <878258613.80307.1638218553852@ichabod.co-bxl> <CA%2B1FSii6yL0HbpyMLNq3q4PybnJS0s6uaDO8f6jh25tAHP8=NQ@mail.gmail.com> <dc16f9af-180e-2749-248a-468229f0057a@quip.cz> <1556048440.260065.1638306076965@ichabod.co-bxl>
next in thread | previous in thread | raw e-mail | index | archive | help
I decided to jump down the rabbit hole, and it lead me to something even ea=
sier.
I can create a memory disk from the ISO and pass the whole thing to Bhyve a=
s a virtio-blk device.
I can then mount the partition of the block device inside the guest to acce=
ss 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=3D0.0.0.0:5914,w=3D800,h=3D600,wait \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd de=
bianvm
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>, Ma=
rio Marietto <marietto2008@gmail.com>
> Cc: Corvin K=C3=B6hne <C.Koehne@beckhoff.com>
> Subject: Re: Bhyve CD-ROM
>=20
>=20
> That's a mighty-tempting looking rabbit hole you've got there ....
>=20
> > ----------------------------------------
> > From: Miroslav Lachman <000.fbsd@quip.cz>
> > Sent: Tue Nov 30 13:27:32 CET 2021
> > To: <virtualization@freebsd.org>, Mario Marietto <marietto2008@gmail.co=
m>
> > Cc: Corvin K=C3=B6hne <C.Koehne@beckhoff.com>
> > Subject: Re: Bhyve CD-ROM
> >=20
> > If memory serves me right shorting the ISO (any disk device) by some=20
> > sectors can be done "on the fly" with gnop utility.
> > Something like gnop create -o <offset> ...
> >
> > Miroslav Lachman
--=20
Sent with https://mailfence.com =20
Secure and private email
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1056372565.291120.1638323893028>
