RE: Bhyve CD-ROM

From: Corvin Köhne <C.Koehne_at_beckhoff.com>
Date: Wed, 01 Dec 2021 14:24:13 UTC
You can check „man bhyve”. virtio-fs isn’t supported.
I don’t know the current state of implementing virtio-fs for bhyve.


Best regards
Corvin


Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

From: Mario Marietto <marietto2008@gmail.com>
Sent: Wednesday, December 1, 2021 3:10 PM
To: Sysadmin Lists <sysadmin.lists@mailfence.com>
Cc: virtualization@freebsd.org; Miroslav Lachman <000.fbsd@quip.cz>; Corvin Köhne <C.Koehne@beckhoff.com>
Subject: Re: Bhyve CD-ROM

CAUTION: External Email!!

This is the truth :

YanVugenfirer<https://nospamproxywebp.beckhoff.com/enqsig/link?id=BCAAAABGd7m3lfMOLOIhx3uNR_1Qav4Ffx8-jQB0torD82ts_HcAAABV9zWqlXXS2a9Q9exjV4uFiTBpBa4_f4XTUDzbwyEjQ98nqj5ujesWOeqGeBCKDM2Vz1ESfPBoUxirVesv6LN8eC8efjqSWEU7WE1TATQqjKkpVJVYaDMoMb6XrKmGebMLh1gyTH7va5myjcEC4UyJjkPM0j3NWg2>

-s 9,virtio-9p,sharename=/mnt \

This is not the right device. The right device is virtio-fs. Not knowing bvyve, this probably should be -s 9,virtio-fs,<virtio-fs specific parameters>


unfortunately If I do :
-s 9,virtio-fs,sharename=/mnt \

it does not work : so I suppose that bhyve does not support virtio-fs. Can someone confirm this ?

Il giorno mer 1 dic 2021 alle ore 02:58 Sysadmin Lists <sysadmin.lists@mailfence.com<mailto:sysadmin.lists@mailfence.com>> ha scritto:
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<http://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<mailto:virtualization@freebsd.org>>
> Sent: Tue Nov 30 22:01:17 CET 2021
> To: <virtualization@freebsd.org<mailto:virtualization@freebsd.org>>, Miroslav Lachman <000.fbsd@quip.cz<mailto:000.fbsd@quip.cz>>, Mario Marietto <marietto2008@gmail.com<mailto:marietto2008@gmail.com>>
> Cc: Corvin Köhne <C.Koehne@beckhoff.com<mailto: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<mailto:000.fbsd@quip.cz>>
> > Sent: Tue Nov 30 13:27:32 CET 2021
> > To: <virtualization@freebsd.org<mailto:virtualization@freebsd.org>>, Mario Marietto <marietto2008@gmail.com<mailto:marietto2008@gmail.com>>
> > Cc: Corvin Köhne <C.Koehne@beckhoff.com<mailto: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 Protected link<https://nospamproxywebp.beckhoff.com/enqsig/link?id=BCAAAABGd7m3lfMOLOIhx3uNR_1Qav4Ffx8-jQB0torD82ts_G0AAAD3oFAM8mD8i0iii1RIho0oLKwVR-N4SOVb_lHAsDWLWJLJIyUqFDDO25VW-f266NEZuqNzLIqcGLmQ-LvXlop5cV0J7L_xLep8yRwRLFk-SsabWYiKOef6GAdDDVKAOtsLHkwP3AwJBEGCz8q70>
Secure and private email


--
Mario.