There are 2 subscriptions in Azure and migrating Chef from Chef Server1(subscr-1) to another Server2(subscr-2) in Azure. The process followed is using the VHD files. The VHD files are created from Server1(Subscr1) and VMs are provisioned using the VHD images in the subscription-2. This worked and able to login to Server2 using the same credentials from Server1.
The services are running and did restarted the services. Chef URL was not working and made hostname change(edited /etc/hosts,/etc/hostname) and executed "chef-server-ctl reconfigure".But the URL is not coming up. Then reverted hostname change(no explict hostname or ip in the hosts file) and added the line like below to hosts file.
#/etc/hosts
127:0.0.1 old.chef.server.blob-url.cloud.com
And rebooted the server and Chef URL worked. Thought of reproducing the issue and did changed the hostname and could not bring the Chef URL working.Did executed reconfigure and restarted the services and restarted the VM. But Chef URL is not coming up.
What is the correct way to migrate Chef from one subscription to another and what are files/changes needs to be made to make the Chef working.