Quantcast
Channel: VMware Communities : Discussion List - VMware vCloud Director
Viewing all articles
Browse latest Browse all 4515

Connectivity lost after changing the ip

$
0
0


Hi I have this situation:

I have a template with one Vm. I  clone a app and change the app by adding the same VM to  the app.

Now I have an app with 2 identical VM (same IP) and because of this I cant start the 2 machines at the same time. 

So I use this to update the Ip of one of the machine (I have just 1 NIC and before doing this at power one the first VM connect to internet):

 

 

 

List<VirtualNetworkCard> nics1 = VM.GetNetworkCards(vcloudexec.GetClient(), myVM.Reference);

 

nics1[0].UpdateIpAddress(ippp);

myVM.UpdateNetworkCards(nics1).WaitForTask(0);

 

Where "ippp" is new ip which is the last increased by 1.

Now I cat start the two WM but at the one with ip changed I cant connect to internet. The connection icons show the sign of limited network connection.

 

Strange is if I do this Ip change manually everything is OK.

 

Is require other code to update the app after changing the IP? I have tried to remove and add the NIC with the same effect. When done programmatically no internet connection when done manually everything is OK.


Viewing all articles
Browse latest Browse all 4515

Trending Articles



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