From nobody Wed Dec 01 01:58:13 2021 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9F9618C5CB3 for ; Wed, 1 Dec 2021 01:58:16 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from wilbur.contactoffice.com (wilbur.contactoffice.com [212.3.242.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3j0l6J1lz4ddm for ; Wed, 1 Dec 2021 01:58:15 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id F410B1308; Wed, 1 Dec 2021 02:58:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1638323895; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:Cc:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; l=2048; bh=KXLBYRDGm8mZ7xSe3i/95914A5wA32uUncVsbi8mOpY=; b=XNWihoxsu4vRbHIYBEHVEYJ1dW5IHtBGjBPLXXU6bhGCFrhkfd2wJSg9ixqQ4E9e pGHp2n/2zT8tlQMorAV5cdrm40SumkGTSf/4DuPm8yJynMnqAPiZJ5YT/jwwDCPve4t 1GoM3BB6gcM2ctTvMe3zijrCXr2JzrJ+gVyvwe/UTmkK1M2ZW6xnaXViis/UAkLC6rc kTkkIX7KJUj4FR8ZLhfNiXmbcjyn9guAhQ8lcFGzjSnY2zJ8WNXJ9iWnxx7UnVFXnpJ YpS1u4+uogHW8BT2BBNd6YW2X1Ywj2g0oO05QUM/xmKIIFRoP09NEc2seYDoIaEiHoW d2gBhfQorg== Date: Wed, 1 Dec 2021 02:58:13 +0100 (CET) To: virtualization@freebsd.org, Miroslav Lachman <000.fbsd@quip.cz> Cc: =?utf-8?Q?Corvin_K=C3=B6hne?= , Mario Marietto Message-ID: <1056372565.291120.1638323893028@ichabod.co-bxl> In-Reply-To: <1556048440.260065.1638306076965@ichabod.co-bxl> References: <1786593170.587714.1638135091567@ichabod.co-bxl> <711266519.635448.1638165807735@ichabod.co-bxl> <3e5cfc26e781421ba0244d5c78c3a4d4@beckhoff.com> <878258613.80307.1638218553852@ichabod.co-bxl> <1556048440.260065.1638306076965@ichabod.co-bxl> Subject: Re: Bhyve CD-ROM List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4J3j0l6J1lz4ddm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=XNWihoxs; dmarc=pass (policy=quarantine) header.from=mailfence.com; spf=pass (mx1.freebsd.org: domain of sysadmin.lists@mailfence.com designates 212.3.242.68 as permitted sender) smtp.mailfrom=sysadmin.lists@mailfence.com X-Spamd-Result: default: False [-4.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[mailfence.com:s=20210208-e7xh]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_IN_DNSWL_LOW(-0.10)[212.3.242.68:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[mailfence.com:+]; DMARC_POLICY_ALLOW(-0.50)[mailfence.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.3.242.68:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; FREEMAIL_CC(0.00)[beckhoff.com,gmail.com] Reply-To: sysadmin.lists@mailfence.com From: Sysadmin Lists via virtualization X-Original-From: Sysadmin Lists X-ThisMailContainsUnwantedMimeParts: N 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 > Sent: Tue Nov 30 22:01:17 CET 2021 > To: , Miroslav Lachman <000.fbsd@quip.cz>, Ma= rio Marietto > Cc: Corvin K=C3=B6hne > 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: , Mario Marietto > > Cc: Corvin K=C3=B6hne > > 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 ... > > > > Miroslav Lachman --=20 Sent with https://mailfence.com =20 Secure and private email