Thanks ChrisF. I tried your idea but did not work.
This is what I tried now and just now it worked.
VM vm = GetFirstVM(vcloudClient, CreatedBy);//vapp.GetChildrenVms().FirstOrDefault(); NetworkConnectionSectionType networkconnectionsectiontype = vm.GetNetworkConnectionSection(); networkconnectionsectiontype.NetworkConnection[0].IpAddressAllocationMode ="POOL";//IpAddressAllocationModeType.POOL.ToString(); networkconnectionsectiontype.NetworkConnection[0].network = vdc.GetAvailableNetworkRefs()[3].name; vm.UpdateSection(networkconnectionsectiontype).WaitForTask(0);
This "IpAddressAllocationModeType.POOL.ToString()" is wrong and mislead me and have to figure out its just "POOL" by reverse engineering.
Hmm any way thanks Chris for taking your valuable time in answering. Appreciate it.
Now Connected is not checked need to see why? and also need to figure out how to assign network adapter type via .net SDK.
Sudheer