-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] LVM for VMs #24
Comments
Do you want to bootstrap the VM from the host system, without booting into a VM? I think this may be possible, you would specify the layout with the logical volume as underlying device, e.g.:
What could be difficult is that the partition table may not be detected automatically (one would need to add a step to call Creating the fstab and finding the boot device should work already since it uses UUID. Does this help at all? |
I should have been clearer. Yes, bootstrapping from the host would be ideal. I don't want multiple partitions, just one with no partition table so the root partition would be just /dev/vg0/testvm-root (/dev/vda, not /dev/vda1 on the vm). I use direct kernel boot, so a bootloader isn't needed at all. |
I see, that would require a few modification since I haven't thought about that particular use-case, so for example:
This doesn't work currently but shouldn't be too difficult to add. |
Would it be possible to implement it so that the lvm volume could be created automatically too, something like this maybe:
This isn't a great syntax, but you get the point. |
I think that would be somewhat out of scope for this ansible role, you can easily create the volume in your playbook beforehand. There are two additional caveats that I just now remembered:
|
Yeah, you're right. |
I mean that it may create things on the host system that don't get removed, I've just looked at the cleanup task and it seems like at the very least I forgot to remove the bootstrap user and its SSH configuration from the host system. I haven't yet tried running this twice from the same box. |
I have a volume group (vg0) on a vm host platform, which has all vm root partitions as volumes (/dev/vg0/testvm-root). The vm sees the volume as /dev/vda. I've been trying for a while now, but can't figure out a way to handle this with this role. Is it possible without modifying this too much or do I basically need to reimplement the handling of partitions?
The text was updated successfully, but these errors were encountered: