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.
Possible to use LVM2 volume for guest OS
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Possible to use LVM2 volume for guest OS
Have you tried a few things yourself first? I know that the MBR isn't checked, because you have to supply one yourself for use in the VM (check the manual).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
chronoboy
- Posts: 89
- Joined: 21. Jul 2008, 07:11
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows
- Location: Canada
Re: Possible to use LVM2 volume for guest OS
Thanks, that's what I needed to know, if the MBR is checked. I read the documentation and it didn't really explain the process the command takes, by reading it, I thought it did read the MBR to determine the disc layout. I am unable to try this myself until I re-do my workstation set-up, and needed to know before hand if I should include this in my LVM. The main reason to re-do everything is to use an LVM to host a few guest OSes. If it didn't work, then I would scrap the idea and wouldn't re-do the system.Sasquatch wrote:Have you tried a few things yourself first? I know that the MBR isn't checked, because you have to supply one yourself for use in the VM (check the manual).
Another question relating to raw disk access, but not LVM2. If for example, you let VirtualBox use an external HDD as a raw disc... Does VirtualBox store the MBR on the external HDD or in the VMDK? If there a way to force it to write the MBR to the external HDD for later booting from the host computer? I am actually in the middle of testing this out, and am hoping when I return to work on it later that it works as I would like it to.