The first step in being able to create a persistent VM in Azure is to get your account upgraded to take advantage of these features, which are all in preview. Once the features are enabled you can follow this process to get the various components configured to support running an isolated SharePoint farm.
In this case, by “isolated farm” I mean one in which there are two virtual images. In my scenario one image is running Active Directory, DNS and ADFS. The other image is running SharePoint 2010 and SQL 2012. The second image is joined to the forest running on the first image. The IP address used by the domain controller (SRDC) is 192.168.30.100; the IP address for the SharePoint server (SRSP) is 192.168.30.150 and 192.168.30.151.
IMPORTANT: Make sure you enable Remote Desktop on your images before uploading them to Azure (it is disabled by default). Without it, you will find it very difficult to manage your farm, specifically things like Active Directory and ADFS.
Your images may go through multiple states, including “Stopped”, before it finally enters the running state. Once it starts running, you need to give it a couple minutes or so to boot up, and then you can select it in the Azure portal and click the Connect button on the bottom of the page. That creates and downloads and RDP connection that you can use to connect to your image and work with it.
It’s also important to note that your network settings are not preserved. What I mean by that is my images were using static IP addresses, but after restarting the images in Azure they were using DHCP and getting local addresses, so the images require some reconfiguration to work.
The networking configuration is changed for the images once they are started in Azure. Azure persistent VMs use DHCP, but the leases last indefinitely so it acts very similar to fixed IP addresses. One of the big limits though is that you can only have one IP address per machine, so that means the second lab for the SAML Ramp will not be feasible.
To begin with though you need to correct DNS and the domain controller, so RDP into the domain controller first (SRDC in my scenario). Restart the Net Logon service, either through the Services applet or in a command prompt by typing net stop netlogon followed by net start netlogon. This will reset your new DHCP address as one of the host addresses for the domain. Next you need to delete the old host address for the domain, which for me was 192.168.30.100. Open up DNS Manager and then double-click on the Forward Lookup Zone for your domain. Find the host (A) record with the old address, 192.168.30.100 in my case, (it will also say “(same as parent folder)” in the Name column) and delete it.
Next you need to change the DNS server for your network adapter to point to the DHCP address that was assigned to the image. Open a command prompt and type ipconfig and press Enter. The IPv4 Address that is shown is what needs to be used as the DNS server address. To change it, right click on the network icon in the taskbar and select Open Network and Sharing Center. Click on the change adapter settings link. Right-click on the adapter and choose Properties.
When the Properties dialog opens, uncheck the box next to Internet Protocol Version 6. Click on Internet Protocol Version 4 but DO NOT uncheck the box, then click on the Properties button. In the DNS section click on the radio button that says Use the following DNS server addresses and for the Preferred DNS server enter the DHCP address for the SRDC server that you retrieved using ipconfig. Click the OK button to close the Internet Protocol Version 4 Properties dialog, then click the OK button again to close the network adapter Properties dialog. You can now close the Network Connections window.
Now if you open a command prompt and type ping your Active Directory forest name it should resolve the name and respond with a ping; on my image it responded with address 192.168.30.4.
On the SharePoint server you just need to change the Primary DNS server IP address to the IP address of the domain controller, which in this example was 192.168.30.4. After doing so you should be able to ping your domain controller name and Active Directory forest name. Once this is working you need to get the new IP address that’s been assigned to the SharePoint server and update DNS on the domain controller if you used any static host names for your SharePoint sites. One limitation that could NOT be addressed in this scenario is the fact that my SharePoint server used multiple IP addresses; persistent images in Azure currently only support a single IP address.
How do you join domain outside of Azure?
How do you communicate between you local computer and server?
In this case the machines were joined to the domain before the images were uploaded to Azure. You communicate via machines via IPv4 or v6, just like you do on a normal network.