Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2014 01:24:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 196243] New: [bhyve] vmrun.sh doesn't recognise zvol diskdev
Message-ID:  <bug-196243-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: paul.chakravarti@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196243-8>