Wednesday, August 12, 2020

Azure Migrate - How to reset the Azure Migrate Appliance

One of the limitations of Azure Migrate is that each Azure Migrate Appliance can only be associated with one Migrate project.  

After successfully migrating a VM from on-prem to Azure, here’s a quick and easy way to reset the appliance.

 

1. Open the following JSON file:


C:\ProgramData\Microsoft Azure\Config\appliance.json


Update "IsApplianceRegistered" from "True" to “False” and save the JSON file.

 

 

2. Restart the server.  Upon restart, the appliance has now been reset.


3.  That's it!  The appliance is now ready to be used for your next migration project. 

Sunday, August 9, 2020

vCSA 7 Update Failed - "Error in method invocation [Errno 2] No such file or directory" and "Update installation is in progress"

Well, that didn't go as planned...

I had a VMWare vCSA that was running version 7.0 GA that was in need of an update.  The pre-update check ran successfully, the update was staged (5GB) and I began the installation.  

After an hour, the progress was still 0%, I clicked "Cancel Installation" and received the following error:

Error in method invocation [Errno 2] No such file or directory


I then performed a graceful restart of the appliance and received the following from the VAMI when logging in using root creds:

"Update installation is in progress"

To resolve this issue I SSH'd into the appliance and performed the following:

1. Create a copy of the software_update_state.conf file.  The file is located in the /etc/applmgmt/appliance/ directory

cp software_update_state.conf software_update_state_backup.conf

2. Stop the applmgmt service.

service-control --stop applmgmt

3. Delete the software_update_state.conf file.

rm software_update_state.conf

4. Confirm the applmgmt service starts successfully.

service-control --start applmgmt

I was then able to successfully log into the VAMI and complete the install. 

5. I un-staged the update. (Neat, reboot not required)

6. This time, I selected "Stage and Install"

7. The update installed successfully and the vCSA is now running the latest release. 

This appears to be an issue when a vCSA update is unsuccessful.  Deleting the original software update state config file and having the vCSA create a fresh one looks to resolve the issue.