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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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.