How to configure hostname and ip address for VMware VM provisioning


#1

I have a simple service dialog with three fields: service_name, vm_name and ip_addr. A catalog item is created to deploy from a VMware template without using the VMware customization specification. After the VM is deployed only the VM name and service name are changed to what I specified. The hostname and IP address of the VM are not changed.

Did I miss anything? I am following the example in Peter McGowan’s book.


#2

Let me answer my own question.

I forgot the check the “Override Specification Values” check box under Customization Specification for the VMware service dialog. Duh. Now VMware properly update the VM with values I passed from the service dialog.


#3

@ecchong Glad you were able to resolve your issue. Thanks for following up with the solution.


#4

Which is the options Hash key/value of “Override Specification Values” that modifies customization?


#5

Hello, Can you deploy vm (vmware) with ip?
Thanks


#6

@andrescueva if you have not found it yet: :sysprep_spec_override=>[true, 1]


#7

@dgomeman sure you can:


#8

Hi! thanks for you quickly reply!

I try configured with a service catalog but no change the ip.


#9

OK so you’re trying to do this within a service. The dialog looks good, make sure to choose a custom spec within Request Info, select override and static IP address:


#10

Thanks! the ip run now! but have a other problem… I try change th vlan id but no change with constumization.

1


#11

Try with variable name vlan. In /var/www/miq/vmdb/log/automation.log you can find the vmware_customizerequest with options you can use. The value of VLAN name must match with the name discovered by MIQ (you can see them in Compute/Infrastructure/Networking).


#12

Hi! Now run with variable name vlan but no change correcly in vcenter (tag network empty)

red


#13

As you use distributed vSwitch you need to pass VLAN name as dvs_VLAN_553 or set is_dvs=>true . I have not found an easy way to do that in a service dialog but in Automate you can do it: Adding a second Network Adapter and setting vlan


#14

Perfect! thanks for all!!


#15

Hello everyone. I am using the automate feature to customize the VM provision in VMware and RHEV. In case you want to add another vlan, you can use this code:

@task.set_network_adapter(0, {:network=>“vlan1”, :is_dvs=>true})
@task.set_network_adapter(1, {:network=>“vlan2”, :is_dvs=>true})
@task.set_network_adapter(2, {:network=>“vlan3”, :is_dvs=>true})

In vmware the vlan name is: dvs_yourvlanname (the prefix dvs_ is added. RHEV does not change the name), so you must use the method:

@task.set_vlan(“dvs_yourvlanname”)


#16

Thanks. I have solved it.