From owner-freebsd-questions@freebsd.org Fri Mar 24 13:02:06 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5D48D18AA8 for ; Fri, 24 Mar 2017 13:02:06 +0000 (UTC) (envelope-from redlamb@redlamb.net) Received: from smtp.redlamb.net (swoop.redlamb.net [50.244.208.116]) by mx1.freebsd.org (Postfix) with ESMTP id CD732A1B for ; Fri, 24 Mar 2017 13:02:05 +0000 (UTC) (envelope-from redlamb@redlamb.net) Received: from Shrapnel.local (173-165-231-73-minnesota.hfc.comcastbusiness.net [173.165.231.73]) by smtp-01.ext.mn.redlamb.net (Postfix) with ESMTPSA id 613814E68C for ; Thu, 23 Mar 2017 14:48:46 -0500 (CDT) To: freebsd-questions@freebsd.org From: Peter Erickson Subject: Read/Write Memory Disk using a Readonly Backing Store Message-ID: <58D4269F.6050600@redlamb.net> Date: Thu, 23 Mar 2017 14:48:47 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 13:02:07 -0000 Is it possible to create a read/write memory disk that is backed by a readonly file? That is, writes to the memory disk are written somewhere other than the original backing store. I need the original to stay pristine. I'm open to other solutions that solve the problem, but this is what I'm trying to accomplish... I'm need to attach a forensic dd image to a VirtualBox guest and I'm stuck with that fact that I don't have the space to convert it to a supported format.. My plan was to attach the dd image as a readonly memory disk and then attach the raw device to the VM, however VirtualBox won't let me create the "raw vmdk" without read/write access to the drive. When attempting to create the vmdk file, I get the following: (forgive any possible typos. I wasn't able to copy and paste the output.) # VBoxManage internalcommands createrawvmdk \ > -filename ~/raw_access.vmdk -rawdisk /dev/md0 VBoxManage: error: VMDK: could not open raw disk file '/dev/md0' VBoxManage: error: Error code VERR_WRITE_PROTECT at ... VBoxManage: error: Cannot create the raw disk VMDK: VERR_WRITE_PROTECT VBoxManage: error: The raw disk vmdk was not created Thanks in advance.