Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use a LVM partition as a Virtualbox disk?

I can't find any option to use a device as a Virtualbox disk, only disk images.

share|improve this question
What happens if you try to specify /dev/mapper/mygroup-mylv as the image? – Gilles Jul 8 '11 at 22:23
@Gilles It asks me if I want to overwrite the file. – Let_Me_Be Jul 8 '11 at 22:28
up vote 11 down vote accepted

Yes. You can create a VMDK (not a VDI — you have to use the VMware disk image format) that accesses a raw disk. You can easily use a logical volume as if it were a whole disk, but just like most virtual disks, you probably won't be able to make the host kernel interpret its partition table and mount it.

Once you create your volume, just run

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk \
    -rawdisk /dev/volumegroup/logicalvolume

Now you can use that VMDK file just like any other disk image, except it will store data on the raw volume rather than in the filesystem.

share|improve this answer
Can I not mount it as a loop back device?? – balki Feb 1 '12 at 19:23
I believe you can. If you use losetup on it, you should end up with /dev/loop0p1 -type names. Unless vmw does something odd, in which case you might have to look for ways to access its image format specifically. – XTL Mar 23 '12 at 13:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.