I am trying to provision hosts in VMware environment using image template. So far that is working. My template has a 30GB LVM for / and everything under it. I want to be able to provide additional disks for hosts that may need such customization, such as a MySQL server, where I could add a second disk for /var partition LVM. Would this be possible in Foreman in an automated manner? How exactly do I go about configuring this if it is possible?
this is indeed possible in multiple ways. If our VMWare integration allows you to add such a drive, then do this via UI/CLI/API when creating new VM. Not everything is possible (this should AFAIK be) so then use VMWare vSphere to create or modify the VM.
The next step is provision such a partition, for that you can either use cloud-init to download a script (script or finish template kind) to do the job or Remote Execution plugin to do post configuration. There is no way of initiating ReX job after provisioning tho. In short, all you need to have is a shell script that would configure the LVM. (*)
The third step is to automate LVM creation by using some cfg or orch mgmt tools like Ansible or Puppet. This is a bit out from my expertise, but I expect that facts in Foreman can provide you enough data about all volumes available so you can run “recipes” on them to create volumes and filesystems on them.
(*) Hold on and keep reading.