How to create VMs with a dynamic name prefix using a Catalog Bundle

Hi all, extremely new user of ManageIQ trying to wrap my head around my first true issue and any assistance or guidance anyone can provide would be appreciated.

Running Hammer-2

At the moment i’ve got a Catalog Bundle that includes a collection of VM Catalog Items, each configured with a basic hostname such as “db”. In the Service Dialog for the Bundle i’ve got a field defined as “environment_id`” that I would like to be prefixed on the names of the VMs created by this bundle, e.g. uat-db0001.

I’ve tried setting the dialog field as “vm_prefix” to no effect, and i’ve took the “send_vm_names” code from the miq_Utilities repository on Github, created a new Catalog Bundle Init instance with Pre5 overridden. I can see the value being populated through to “Prov Opts” in the logs but the VMs are still configured as “db0001”.

I feel like this is a simple problem with a blinding obvious solution that i’m missing. Any help would be much appreciated.

It turns out I was using “set_vm_names” in the Bundle init, rather than the Item init :man_facepalming:

Sleep and a fresh look in the morning sorted it all.

1 Like