Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

Configure network after vApp deployment

$
0
0


Hi,



If I clone a vApp without any customization, I can't configure the network afterwards, e.g.



$vappRefs = $sdkVdc->getVAppRefs($vappName);



$sdkVapp = $service->createSDKObj($vappRefs[0]);



$vmRefs = $sdkVapp->getContainedVmRefs();



$sdkVm = $service->createSDKObj($vmRefs[0]);



     



$netSection = new VMware_VCloud_API_NetworkConnectionSectionType();



$netSectionInfo = new VMware_VCloud_API_OVF_Msg_Type();



$netSectionInfo->set_valueOf("Specifies the available VM network connections");



$netSection->setInfo($netSectionInfo);



$netSection->setPrimaryNetworkConnectionIndex(0);



$netCon = new VMware_VCloud_API_NetworkConnectionType();



$netCon->set_network($orgVdcNetwork);



$netCon->set_needsCustomization(false);



$netCon->setNetworkConnectionIndex(0);



$netCon->setIpAddress(NULL);



$netCon->setExternalIpAddress(NULL);



$netCon->setIsConnected(true);



$netCon->setMACAddress(NULL);



$netCon->setIpAddressAllocationMode($IpAddressAllocationMode);



$netSection->addNetworkConnection($netCon);



$modifyNetwork = $sdkVm->modifyNetworkConnectionSettings($netSection);



The error in the vCD log is as follows: The VCD entity network "Network" does not exist.



However, the network does exist - it can be added to the VM using the GUI.



Thanks



Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>