[Bug 196243] New: [bhyve] vmrun.sh doesn't recognise zvol diskdev

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 24 01:24:19 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196243

            Bug ID: 196243
           Summary: [bhyve] vmrun.sh doesn't recognise zvol diskdev
           Product: Base System
           Version: 10.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: paul.chakravarti at gmail.com

Hello,

I noticed that there is a minor problem in the vmrun.sh script if you are using
a zvol as the virtio_diskdev. The 'make_and_check_diskdev' check will fail if
virtio_diskdev is a zvol as it only checks for files (vs char devices). This is
harmless as the truncate doesn't actually do anything if the device is a zvol
however the attached small patch fixes the problem and removes the spurious
error message.

Paul


--- vmrun.sh.orig       2014-12-24 01:56:58.468954569 +0100
+++ vmrun.sh    2014-12-24 02:03:23.543145433 +0100
@@ -152,7 +152,7 @@
 {
     local virtio_diskdev="$1"
     # Create the virtio diskdev file if needed
-    if [ ! -f ${virtio_diskdev} ]; then
+    if [ ! -f ${virtio_diskdev} -a ! -c ${virtio_diskdev} ]; then
            echo "virtio disk device file \"${virtio_diskdev}\" does not
exist."
            echo "Creating it ..."
            truncate -s 8G ${virtio_diskdev} > /dev/null

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


More information about the freebsd-bugs mailing list