Post-restore configurations
This section describes the additional configurations required for the target VM on different operating systems to ensure that the restored instance is reachable.
Target: AWS
- Perform the following steps to resolve the issue of restored AWS instance check fail and the instance is not reachable:
Connect to EC2 Serial Console, check if the network interface is up, and VM has started with all mount points.
If you get the following failure message while accessing EC2 Serial Console, change the instance type of VM to the one which supports EC2 Serial Console:
This instance type is not supported for the EC2 serial console.
You might be logged into rescue mode if some critical mount points fail:
Check if the following articles are applicable:
Check if all partitions are mountable, if not, further troubleshooting might be required to find out why they are failing.
Drives with mount failures can be detached from the impaired VM and attached to a healthy instance in the same availability zone for further troubleshooting.
If mounting succeeds and there are no failures, try restarting before the next steps, till you can boot into user space.
- If the VM is configured with
PasswordAuthenticationpassword check entry in/etc/ssh/sshd_configfile, then set the value to Yes. - If it is configured with
PubkeyAuthenticationssh key, then set the value of the entry in/etc/ssh/sshd_configfile to Yes. - If the instance is unreachable and the following error messages are displayed when attempting to connect to the EC2 console:
[ERROR]: Azure datasource failure occurred: result=error | reason=failure to find primary DHCP interface | agent=Cloud-Init [ERROR]: Azure datasource failure occurred: result=error | reason=http error 401 querying IMDS
It is recommended to create an empty file named
cloud-init.disabledin the/etc/cloud/directory by executing the following command:# touch /etc/cloud/cloud-init.disabled
This issue arises because the Cloud-init auto-configuration process during the VM boot sequence enters an infinite loop when it is unable to reach the required endpoints, resulting in a failure to successfully configure the endpoints.
- Update the device names in
/etc/fstabfile if they were not replaced with UUID during pre-backup.For example, change
/dev/sdc1 → /dev/nvme1n1p1. This allows to establish the network connection. - Now you can troubleshoot any mount failures and logon by ssh from any non-CSP Serial Console.
Target: Azure
To backup the restored Azure VM, deploy the Azure VM extension before taking the backup.
Target: AWS
Perform the following steps to resolve the issue of restored AWS instance check fail and the instance is not reachable:
- Connect to EC2 Serial Console, check if the network interface is up, and VM has started with all mount points.
If you get the following failure message while accessing EC2 Serial Console, change the instance type of VM to the one which supports EC2 Serial Console:
This instance type is not supported for the EC2 serial console.
- If the VM has booted into emergency mode further troubleshooting might be required.
- Try mounting all partitions with mount -a command. If f it fails, check if the following article is applicable:
- While restarting, the
cloud-initservice might cause the VM to get stuck in network configuration. Reconfigure or stop, disable, and uninstall/removecloud-initservice using the following respective commands:systemctl stop cloud-init
systemctl disable cloud-init
zypper remove cloud-init
If required, reinstall
cloud-initservice after a restart. - Restart the VM.
- During restart select AWS kernel from the GRUB menu.
- Check the mount points.
- Check the status of the network interface with ip addr command. If it is up you should be able to log on by SSH externally, else try SSH troubleshooting.
Target: Azure
To backup the restored Azure VM, deploy the Azure VM extension before taking the backup.
Target: AWS
Perform the following steps to resolve the issue of restored AWS instance check fail and the instance is not reachable.
- Stop and Start the VM.
- Log on using EC2 Serial Console and switch to superuser.
- Disable Azure-specific services if any:
systemctl disable hv-kvp-daemon.service systemctl disable walinuxagent.service systemctl disable walinux-agent
- Reconfigure the data source for
cloud-initservice to point it to EC2 data source, and disable any Azure cloud-specific configurations:dpkg-reconfigure cloud-init
Few configuration files can be moved or renamed.
For example,
mv /etc/cloud/cloud.cfg.d/10-azure-kvp.cfg /etc/cloud/cloud.cfg.d/10-azure-kvp.cfg.disabled
mv /etc/cloud/cloud.cfg.d/90-azure.cfg /etc/cloud/cloud.cfg.d/90-azure.cfg.disabled
cloud-init clean --logs
- Set the default kernel to AWS by changing the value of GRUB_DEFAULT entry in
/etc/default/grubfile:By default we have GRUB_DEFAULT=0 in
/etc/default/grubfile. Change it to: GRUB_DEFAULT='KERNEL_INDEX' where the value of KERNEL_INDEX can be found with update-grub command. - Restart the VM.
- If there is any issue after restart, enter the recovery mode for AWS kernel and drop to root shell prompt to perform any troubleshooting steps.
Target: Azure
To backup the restored Azure VM, deploy the Azure VM extension before taking the backup.
Target: AWS
Log on with the same username and password as the source VM.
Target: Azure
To backup the restored Azure VM, deploy the Azure VM extension before taking the backup.