[Bug 210410] /usr/share/examples/bhyve/vmrun.sh assumes virtio_diskdev to be a regular file

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 20 16:10:50 UTC 2016


            Bug ID: 210410
           Summary: /usr/share/examples/bhyve/vmrun.sh assumes
                    virtio_diskdev to be a regular file
           Product: Base System
           Version: 10.3-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: vas at mpeks.tomsk.su

The /usr/share/examples/bhyve/vmrun.sh script has the following code:

   # Create the virtio diskdev file if needed
    if [ ! -f ${virtio_diskdev} ]; then
            echo "virtio disk device file \"${virtio_diskdev}\" does not
            echo "Creating it ..."
            truncate -s 8G ${virtio_diskdev} > /dev/null

which assumes that ${virtio_diskdev} should be a regular file. When 
${virtio_diskdev} is a ZFS volume or an md(4) memory disk, it causes an
unnecessary warning message and an attempt to truncate the device.

Should we replace -f with something more reasonable, perhaps "-f -o -c"

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list