Hi there,
I'm experimenting with Foreman 1.4.1 and spinning up some test Virtual
machines on our VMWare ESXi hosts.
Unfortunately, we don't have DHCP on our environment, so I think I'm facing
the enhancement request described by Foreman Issue 3287
<Feature #3287: Connect boot ISO when creating a new VM and boot from it - Boot disk - Foreman>whereby:
"User wants to be able to connect foreman bootiso when creating a new VM
and boot from it as an alternative to PXE boot (they using vmware as
virtualization platform.)
There are networks where PXE boot not is possible due to various reasons a
good alternative to PXE boot would be to having foreman connect an foreman
bootiso to the VM when it's created and boot from it instead."
My test workflow was to create a boot ISO with foreman_bootdisk, mount it
up on the VM and proceed to boot it. This worked fine, but I'm wondering
if there's an easy way to try and and script this a little.
Questions:
When the VM is created, it doesn't have a CD/DVD drive attached. That
means I needed to power it off, create the device, reboot and attach the
ISO. Is there a setting I need to modify to add the CD/DVD device when the
VM is created?
I've not used the CLI tools but I wonder if I could use a combination of
the hammer CLI and vSphere CLI to create the host in Foreman, generate an
ISO image, SCP it to the ESXi host and then have the host boot from it.
Does that sound like a good option or is there a better solution I'm
overlooking?
Finally, is there a way to extract from Foreman a set of hammer commands
that correspond to a host?
Thanks for your help!
Richard.