ratheeshp1986
Contributor
Contributor

Configure vRO to sent IP , Hostname and Mac

I am using event subscription and providing IP(With VLAN information) , Hostname and MAC in vRO. in vRO I have configured one workflow which will provide all. Workflow getting executed but VM getting hostname, IP different via vRA itself. Any help here

ip = "192.168.1.2";

mac = "00:50:56:00:00:01";

hostname = "test002";

domain = "example.net";

vlan = "2559";

netmask = "255.255.255.0";

gateway = "192.168.1.1";

if (payload !== null) {

for ( var so in payload) {

System.log("so: " + so+", "+payload[so]);

}

}

var virtualMachineAddOrUpdateProperties = new Properties();

virtualMachineAddOrUpdateProperties.put('hostname', hostname);

virtualMachineAddOrUpdateProperties.put('VirtualMachine.Network0.Address', ip);

virtualMachineAddOrUpdateProperties.put('VirtualMachine.Network0.SubnetMask', netmask);

virtualMachineAddOrUpdateProperties.put('VirtualMachine.Network0.Gateway', gateway);

virtualMachineAddOrUpdateProperties.put('VirtualMachine.Network0.MacAddress', mac);

0 Kudos
2 Replies
daphnissov
Immortal
Immortal

  1. Why are you manually specifying a MAC address? What is your use case?
  2. Network configuration is done at allocation and is therefore too late when EBS runs.
  3. You're missing a required custom property if you must use a custom MAC called VirtualMachine.Network0.MacAddressType with value of 'Static'
0 Kudos
ratheeshp1986
Contributor
Contributor

I have another workflow which talks to another system to get IP, MAC and hostname. Before that I am trying with static values

0 Kudos