How to add VM to already created Service? [SOLVED]


#1

I have an already created service. I would like to be able to add another VM to this service. Anyone know how to accomplish this task?


Associate VM with generic service catalogue item
[Resolved] Binding a VM to a service
#2

There is no UI operation to select any VM and add it to a service, though this can be automated. You will need to write a method and hook it upto a button. In the method you need to select a vm and add it to the service, something like

vm = $evm.rooot[‘vm’]
vm.add_to_service()

You can get the id of the service by doing a vmdb search, like

service_id = $evm.vmdb(‘service’).find_by_name(“myService”)

Hope this helps.


#3

@jhardy thanks a bunch for the info. I was hoping there was another one, but that process will do.