Date: Sat, 30 Aug 2014 12:43:21 -0400 From: Allan Jude <allanjude@freebsd.org> To: freebsd-virtualization@freebsd.org Subject: Re: vmrun.sh and zvols Message-ID: <5401FF29.5010109@freebsd.org> In-Reply-To: <CA%2BP_MZHP4TfBQfZbQxTMDwjFRJqN0CieZbvAVep%2B8t2Wu4jSbA@mail.gmail.com> References: <CA%2BP_MZHP4TfBQfZbQxTMDwjFRJqN0CieZbvAVep%2B8t2Wu4jSbA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iPk5Ms6pxKAbJGT9WF76R9sE6PSq0J1Wk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-08-30 10:22, Nikolay Denev wrote: > I had to to this so that zvols used for bhyve can be booted with vmrun.= sh. > Without this vmrun.sh does not detect the filesystem and always wants > the installation CD. >=20 >=20 > Index: share/examples/bhyve/vmrun.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/examples/bhyve/vmrun.sh (revision 270295) > +++ share/examples/bhyve/vmrun.sh (working copy) > @@ -176,10 +176,10 @@ > while [ 1 ]; do > ${BHYVECTL} --vm=3D${vmname} --destroy > /dev/null 2>&1 >=20 > - file ${virtio_diskdev} | grep "boot sector" > /dev/null > + file -s ${virtio_diskdev} | grep "boot sector" > /dev/null >=20 > rc=3D$? > if [ $rc -ne 0 ]; then > - file ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null > + file -s ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null > rc=3D$? > fi > if [ $rc -ne 0 ]; then >=20 > --Nikolay > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@fr= eebsd.org" >=20 Note: you might also want to look at the ZFS 'volmode' setting, and the vfs.zfs.vol.mode sysctl. Otherwise GEOM can steal your zvol while you are trying to use it, and you'll get write errors from inside the vm. At one point, it was not possible to install FreeBSD from the CD image onto a zvol, because as soon as the installer partitioned it, GEOM on the host would re-taste it and grab a lock, preventing newfs from working. --=20 Allan Jude --iPk5Ms6pxKAbJGT9WF76R9sE6PSq0J1Wk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJUAf8sAAoJEJrBFpNRJZKfimIP/2PzVP6p8Zc+TnBVgemR4HDY 2gOfH5Be0arXRfX4+idNlu3zav4VVEEIZd7F2eb36W/h2ZeoADXuZ0+rkCmT2jBo +AxKNj78EL3HQU04IW2cpOGCDJEqYnhXRHTaV969LvdZ+OwcRTGJ87RsOZ5lM00b qtIoHyFIzAniWaYCB1pon8GbmScDPWgYmszyxmTSr8AaHYh8YoCI3mZ1wVNIcCVc H9BTD6p73xG4wnmCvxCPyEZVMqFFsh35ta9KGytsiPT3i1XOoDukqNtBK+f/370g b0rF144zN95FRLFBwPk5mmcxkexIo1iqKwpn/5zDOdV3vyl1+OipwRx+MkD/3D9V AsRh8OSKzLQD3iOinNrdGfkcaTELFtgp2v6PC3T/nIDJ1z8hzH8ULjbzcP5Qgec0 YOYw8XkCc6Q1qO9n6DHaa6Fs1PhDFvzEl5hFWvIBJa99Cd4Iaz6KHkaaWD0ozn86 yIJZmgX8gQey/dys7ytlMIiUNcoRUxc1Rt8ubmqQM4y8Fv+ZsASl0DHlxTCY3geY ZWeqn33KhL3pux+q7b2ivpojXCtPPWTqpo7H88BkOYcc6LeNvjowLOe4XfUj5PnQ 346GGgE9US3s6YJg6ZbYr9hdErYTWrySt5yv5NXMB9n6vYqs7HOsN9jVpdp1Si9h cqbQeFODDMzP3Oxa8L2j =fYAv -----END PGP SIGNATURE----- --iPk5Ms6pxKAbJGT9WF76R9sE6PSq0J1Wk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5401FF29.5010109>