VMware Cloud Community
JakeP
Enthusiast
Enthusiast
Jump to solution

Setting IP related properties using vCO/vRO and BuildingMachine?

A quick background is that I'm trying to set the IP Address, Subnet Mask, Gateway, and Primary/Secondary DNS properties in a vCO workflow using the BuildingMachine stub to make use of an IPAM.

Using the following method (thanks SkyCoop), I can set a custom property unrelated to networking:

actionResult = System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,virtualMachineEntity,"Property.Name","Property Value",isFalse,isFalse,isFalse,isFalse);

After the VM has been provisioned I can look at it via vCAC and see the property and its value.

However, if I try to set the IP using the VirtualMachine.Network0.Address property the same way, it does not work.

actionResult = System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,virtualMachineEntity,"VirtualMachine.Network0.Address","192.168.100.100",isFalse,isFalse,isFalse,isFalse);

Has anyone successfully set the network configuration like this?

Thanks!

Jake

0 Kudos
1 Solution

Accepted Solutions
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Jake - Make sure you are doing this in the building machine phase.. The properties need to be set before the VM is deployed and customised. < Scrap that, didn't read your post


I use the Create / Update property on virtual machine entity workflow to:


- Set IP property - VirtualMachine.Network0.Address

- Set Netmask - VirtualMachien.Network0.SubnetMask

- Set Gateway - VirtualMachine.Network.Gateway


Works really well for Windows and Linux.


What guest OS are you using? I had a strange issue with Windows Server where the IP would not get assigned to the server unless the DHCP service was enabled.

Are you using a vCenter Customization Specification with your blueprint?


Hope that helps?

View solution in original post

0 Kudos
5 Replies
GrantOrchardVMw
Commander
Commander
Jump to solution

Take a look at the InfoBlox plugin on solutionexchange.vmware.com - it should give you some ideas on how they are injecting IPs.

Grant

Grant http://grantorchard.com
0 Kudos
vmwaredownload
Enthusiast
Enthusiast
Jump to solution

Hi Jake,

Try using "VirtualMachine.Network0.NetworkProfileName" instead of "VirtualMachine.Network0.Address"

- SK

0 Kudos
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Jake - Make sure you are doing this in the building machine phase.. The properties need to be set before the VM is deployed and customised. < Scrap that, didn't read your post


I use the Create / Update property on virtual machine entity workflow to:


- Set IP property - VirtualMachine.Network0.Address

- Set Netmask - VirtualMachien.Network0.SubnetMask

- Set Gateway - VirtualMachine.Network.Gateway


Works really well for Windows and Linux.


What guest OS are you using? I had a strange issue with Windows Server where the IP would not get assigned to the server unless the DHCP service was enabled.

Are you using a vCenter Customization Specification with your blueprint?


Hope that helps?

0 Kudos
JakeP
Enthusiast
Enthusiast
Jump to solution

Thanks eatVM,

It looks like the issue is that I was not using a cusomization spec in my testing blueprint as I had tried to strip it back for speed in testing. It does stand to reason that the spec is where IP configuration would be applied.

Thanks again!

Jake

0 Kudos
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Glad to hear you have got it working! 🙂

0 Kudos