I ran into an issue today that I wanted to share as it caused me some real frustration for a while, so I am hoping it might help you.
I have an Azure Cloud Service in the Classic portal running a .NET Application. The App is deployed on 2 Web Roles within the Cloud Service. It was created by using the New Cloud Service wizard in the portal, specifying the Package and Configuration files sent to me by the app vendor and just clicking Finish. The Cloud Service provisioned and was working, everything was done. Until we needed to change the internal network that this was connected to …
We have a VNET in the subscription with a dedicated subnets for our Nodes. This was not specified in the original CSCFG file used to create the Cloud Service, so consequently the nodes were not connected to it. This needed to change.
So, I downloaded a copy of the Configuration File to make sure all of the settings we added into the Configuration were present for the next upload and followed code to add Network Configuration as specified in article https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-move-vm-role-to-subnet/.
After clicking on Update in the Cloud Service and specifying my new CSCFG file and original package, I ran into an error … which unfortunately I didn’t grab (but am trying to find!), the effect was basically that I couldn’t add new Network Configuration to a Cloud Service I had already created with running nodes. No matter how many articles I found and workarounds I tried, the update that changed the Network properties just didn’t want to happen!
After digging around online and not really finding anything of use, I was on the verge of thinking “let’s just delete the whole service and just start again”. This didn’t excite me as I was worried about external IP changes, any Certificate impact and so on, it then occurred to me “why not use the Staging slot?”
I was able to upload my new CSCFG and original package into the staging slot, deploying 2 new nodes on the correct network! After verifying this by RDP connection to the nodes, I Swapped the Staging slot to Production which moved the App Configuration as it was to the new Nodes, then I could just delete the original production deployment and life was good again.
If you’re running into the same issues with moving nodes to a different network, perhaps give this a shot.
I was looking for a complex solution but actually, it was very easy in the end!