Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2017 14:48:47 -0500
From:      Peter Erickson <redlamb@redlamb.net>
To:        freebsd-questions@freebsd.org
Subject:   Read/Write Memory Disk using a Readonly Backing Store
Message-ID:  <58D4269F.6050600@redlamb.net>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58D4269F.6050600>