Possible to use LVM2 volume for guest OS
Posted: 31. Jul 2009, 00:58
I will be doing a re-partitioning of my desktop Linux workstation, and am wondering if it is possible to point a VMDK to an LVM2 logical volume?
In the documentation, it does not state an example of using this type of set-up. I have found online blogs which show how to use a ZFS volume for a VMDK disk. I have done searches everywhere, even using this forums search feature, and there does not appear to be any information relating to using an LVM2. I would assume it would work, however there are no examples which show this, only the using of entire disks.
The problem is, I cannot use an entire disk for a VMDK, as my disc has no MBR/Standard partitioning scheme. The entire disk /dev/sda is used as a dm-crypt volume, and the system loads the kernel and initrd.img from PXE to de-crypt and mount the volume. Inside this encrypted volume, there lies an LVM2, currently my set-up has the root partition using the entire dm-crypt. I will be switching this to an LVM2 instead.
Windows guests will be unable to work with the dm-crypt/LVM2 parition layout, so I want to dedicate an entire logical volume within my LVM2 to a Windows guest. When you run the command to manually create the vmdk, does it check the MBR and partition layout and fail if nothing or invalid set-up exists? Is there a way to force it, and allow the Guest VM to create a disk layout inside the logical volume(MBR/NTFS Partition).
I do not need to load this guest OS natively on the host at all, I just want to limit the file system usage on my Linux box and use a block device directly for a guest.
In the documentation, it does not state an example of using this type of set-up. I have found online blogs which show how to use a ZFS volume for a VMDK disk. I have done searches everywhere, even using this forums search feature, and there does not appear to be any information relating to using an LVM2. I would assume it would work, however there are no examples which show this, only the using of entire disks.
The problem is, I cannot use an entire disk for a VMDK, as my disc has no MBR/Standard partitioning scheme. The entire disk /dev/sda is used as a dm-crypt volume, and the system loads the kernel and initrd.img from PXE to de-crypt and mount the volume. Inside this encrypted volume, there lies an LVM2, currently my set-up has the root partition using the entire dm-crypt. I will be switching this to an LVM2 instead.
Windows guests will be unable to work with the dm-crypt/LVM2 parition layout, so I want to dedicate an entire logical volume within my LVM2 to a Windows guest. When you run the command to manually create the vmdk, does it check the MBR and partition layout and fail if nothing or invalid set-up exists? Is there a way to force it, and allow the Guest VM to create a disk layout inside the logical volume(MBR/NTFS Partition).
I do not need to load this guest OS natively on the host at all, I just want to limit the file system usage on my Linux box and use a block device directly for a guest.