echoidcf commented on issue #4246: URL: https://github.com/apache/cloudstack/issues/4246#issuecomment-679912894
@Spaceman1984 I think there is some misunderstanding here. How to call plugPublicNic() is not the concern here, and it is not the problem. The problem is something wrong happened AFTER the plugPublicNic is called, not how to call it. If you want to trigger plugPublicNic(), you may try process below 1. add at least TWO public networks in cloudstack 2. associate new IP to VR UNTIL it begin to use IP from second network. (small networks may help) and voila, plugPublicNic is called. The real problem is vcenter return [config.hardware.device] may not in original order as I showed above. To fix that, in plugPublicNic() you should use ~~~ VirtualDevice[] nicDevices = vmMo.getNicDevices(true); ~~~ instead of ~~~ VirtualDevice[] nicDevices = vmMo.getNicDevices(); ~~~ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
