Re: vmrun.sh and zvols

2014-08-30 Thread Craig Rodrigues
On Aug 30, 2014 7:22 AM, Nikolay Denev nde...@gmail.com wrote:

 Index: share/examples/bhyve/vmrun.sh
 ===
 --- share/examples/bhyve/vmrun.sh (revision 270295)
 +++ share/examples/bhyve/vmrun.sh (working copy)
 @@ -176,10 +176,10 @@
  while [ 1 ]; do
   ${BHYVECTL} --vm=${vmname} --destroy  /dev/null 21

 - file ${virtio_diskdev} | grep boot sector  /dev/null
 + file -s ${virtio_diskdev} | grep boot sector  /dev/null


Hi,

See:

http://svnweb.freebsd.org/base?view=revisionrevision=270754

--
Craig
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
freebsd-virtualization-unsubscr...@freebsd.org


Re: vmrun.sh and zvols

2014-08-30 Thread Allan Jude
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.
 
 
 Index: share/examples/bhyve/vmrun.sh
 ===
 --- share/examples/bhyve/vmrun.sh (revision 270295)
 +++ share/examples/bhyve/vmrun.sh (working copy)
 @@ -176,10 +176,10 @@
  while [ 1 ]; do
   ${BHYVECTL} --vm=${vmname} --destroy  /dev/null 21
 
 - file ${virtio_diskdev} | grep boot sector  /dev/null
 + file -s ${virtio_diskdev} | grep boot sector  /dev/null
 
   rc=$?
   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=$?
   fi
   if [ $rc -ne 0 ]; then
 
 --Nikolay
 ___
 freebsd-virtualization@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
 To unsubscribe, send any mail to 
 freebsd-virtualization-unsubscr...@freebsd.org
 

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.

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature