Today I accessed my VM on Azure and it was very slow, so I decided to upgrade it. I went to Size, selected a level up in RAM memory and CPU and then I clicked on the button "Resize". After waiting a few minutes, I got a fail message saying: Failed to resize the virtual machine 'xxx' to size 'xxx'. Error: Unknown error encountered when retrieving secret from the Key Vault with URL: xxx.
Since then I can't start my virtual machine, how can I solve this problem?
Thanks.
[EDIT] Apparently, I just need to update the secretURL for a key vault that I've created, I just don't know-how.
I would assume VM is having issues accessing the Key Vault. Can you try the following if possible?
Deallocated the VM to full stop.
Then start it back up
Check that the Key Vault and secret are still the same and have not been deleted or changed.
Check the access to the Key vault. The following documents may help with this.
Creating and configuring a key vault for Azure Disk Encryption
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-overview#networking-requirements
In the meantime, please help me perform a quick check and log into the ‘serial console’ of this VM and confirm if you’re able to get into the ‘commandprompt’ from the ‘SAC’ mode: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/serial-console-windows
Option2 Step 1: On portal select Key Vault à “Access Policy” and ensure that “Azure Disk Encryption for volume encryption” is enabled. If not, enable it, save changes and try to Start the VM again.
Step 2: If “Azure Disk Encryption for volume encryption” is already checked , make sure that “secret “ is present under the Key Vault and it has a “version” of in enabled state. If there is any expiration date set for the version, make sure that we are within the expiration period.
Repair a Windows VM by using the Azure Virtual Machine repair commands: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/repair-windows-vm-using-azure-virtual-machine-repair-commands
Can you try redeploying the VM that this is happening on? This will place the VM on new hardware and rule out a platform issue if it stops happening after the redeploy.
Try to remove the extension and add it back to the VM. Extension must have failed sometime. https://learn.microsoft.com/en-us/cli/azure/vm/extension?view=azure-cli-latest
Resize virtual machines
There is similar thread discussion in SO, you may also refer to the suggestion mentioned over-there which gives some idea on your query
Related
In the process of Nuntanix Virtual Machine migration to Azure, I had copied ral-rdmbuild-02 copy.ova file into a windows machine and extracted to get .vmdk and .mf. From the extracted file the .vhd file was created, later it was resized on a ubuntu to meet 1MB requirement.
Subsequently, the .vhd was copied to azure and attempted to create a vm to face the following error. Could someone can help me to overcome this issue.
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"OSProvisioningTimedOut","message":"OS Provisioning for VM '' did not finish in the allotted time. The VM may still finish provisioning successfully. Please check provisioning state later. Also, make sure the image has been properly prepared (generalized).\r\n * Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/ \r\n * Instructions for Linux: https://azure.microsoft.com/documentation/articles/virtual-machines-linux-capture-image/ \r\n * If you are deploying more than 20 Virtual Machines concurrently, consider moving your custom image to shared image gallery. Please refer to https://aka.ms/movetosig for the same."}]}
• Please check whether the Nutanix VM hard disk is configured as a dynamic disk or not because dynamic disks don’t work with Azure, and they can’t be migrated. Also, the image of the Nutanix VM may not be prepared correctly, thus would suggest you recreate the image of the Nutanix VM and try migrating it to Azure once again.
• To convert the dynamic disk to fixed type of virtual disk, kindly refer to the below documentation link that guides to use the appropriate command for converting the same: -
Convert-VHD -Path c:\test\child1vhdx.vhdx -DestinationPath c:\test\child1vhd.vhd -VHDType Fixed
https://learn.microsoft.com/en-us/powershell/module/hyper-v/convert-vhd?view=windowsserver2019-ps
• Also, based on the error message that you are encountering, the OS deployment might have also failed from the Portal side as it was unable to pass on some of the required parameters which is why you got ‘TimeOut’ message. The VM also didn’t finish the deployment correctly. I would recommend trying stop(deallocate) and start the VM and see if that resolves the issue.
I would recommend you delete the VM and its related resources if created and take a snapshot of the OS disk, create a disk from the snapshot and then create the machine from that disk. Please refer to the link below for creating a VM from a ‘VHD’ by using the Azure portal: -
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-centos
• Finally, to generalize the VM and execute ‘sysprep’ on a VM to take its correct reference image such that it can be successfully migrated to another environment, please refer to the below link that explains the correct steps to perform for generalizing the VM: -
https://portal.nutanix.com/page/documents/details?targetId=Web-Console-Guide-Prism-v6_1:wc-windows-vm-customize-with-sysprep-clone-vm-wc-t.html
I have a new vm, Operating system Windows (Windows Server 2016 Datacenter).
When I try to enable backup and select new Recovery Service Vault, I get deployment error:
Deployment to resource group test failed.
Additional details from the underlying API that might be helpful: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Resource
vault242/Azure/iaasvmcontainer;iaasvmcontainerv2;test;web01/vm;iaasvmcontainerv2;test;web01
Type
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems
Status
Conflict
Status message
{
"status": "Failed",
"error": {
"code": "BMSUserErrorContainerObjectNotFound",
"message": "Item not found"
}
}
Can't find any information for code BMSUserErrorContainerObjectNotFound and why a protected item not created automatically
My apologies for the delay in the response.
Were you able to resolve the issue?
If not, let's review it.
As I understood, you are enabling the Azure VM Back Up by following the next steps:
There could be multiple reasons why you are getting this failure.
Did you perform these steps manually using the Azure Portal? Template deployment? Scripting? I suspect most likely you are doing the template deployment or any kind of scripting and this one is the syntax issue.
Second thought, it was the transmitted issue due to the load of request on the Azure end. In this case, you need to retry the operation.
Additional question to ask, do you get the failure on one specific machine or all machines? Specific region?
Do you get the same failure when you use the existing vault?
If you still can provide information above, it's going to be helpful to narrow down the root cause.
I ran into this error as well today and I think it is is a Azure portal bug when enabling the Backup from the VM blade.
Instead, you can initiate a Backup from the "Recovery Services vaults" blade and add the VM to it.
I am the admin of this particular azure subscription. I had to add my ssh key to a ubuntu server. But when I try to add the ssh key through "Reset Password", After sometime I'll get the following error message.
VM agent on VM 'Server' has not reported latest status for extension 'enablevmaccess'. Please verify the VM has a running VM agent and can establish outbound connections to Azure storage.
What might be the issue? How to resolve this?
Failed to reset ssh key
vmaccess is enabled
Two simple thing you might try;
Uninstall the VMAccess extension and try reset again.
Use the 'Run Command' to set/reset password.
Hope this helps.
your first error tells you exactly why this happens. vm extension needs to talk to azure storage to report extension status. if it cant - portal operations might fail (this doesnt mean the extension failed; its just unable to report actual extension status).
I am cleaning out some old items from my azure account and cannot remove an older version Bacup Vault.
I get the following error when I try to delete it:
Vault cannot be deleted as there are existing resources within the
vault. Please ensure there are no backup items, protected servers or
backup management servers associated with this vault. Unregister the
following containers associated with this vault before proceeding for
deletion : COMPUTER-NAME. Unregister all containers from the vault and then
retry to delete vault
Notice the COMPUTER-NAME
That is the name of my computer, but I can not find the Azure back up agent installed on that computer. I also cannot find the computer name container in any storage containers in my entire azure account.
Can someone help me figure out how to remove these items
thanks in advance
First screenshot shows the Backup vault and the error message I get when I try to delete.
the second screenshot shows the BackupItems that remain, but I cannot delete them.
the red boxes cover my COMPUTER-NAME
Looks like my previous answer was turned into a comment due to brevity. Here's an update to make it a better answer anyway. Answer from that link quoted below for reference.
I have not mapped this answer to the corresponding Azure commands, but I was able to find my way to a solution via the Azure Portal. The steps were as follows:
Selected my Recovery Service resource
Under the Manage section, clicked Backup Infrastructure
Under Management Servers, clicked Protected Servers
In the list that followed, clicked on the row where my Protected Server > Count was greater than 0, in my case, Azure Backup Agent (because the backup agent was installed on my Windows Desktop)
Clicked on my server name in the Protected Server list
Clicked Delete in the card for my protected server
After that completed, I was able to delete the entire vault. These steps may be helpful if you have other Backup Infrastructure resources and possibly even Site Recovery Infrastructure resources associated with a vault.
Update: It seems like there's an open issue for Get-AzureRmRecoveryServicesBackupItem not having any capacity to return MARS backup items which is ultimately what the issue here was.
I have an Ubuntu Server 17.10 VM in vCenter that I exported using Export-VApp, then used Microsoft's Virtual Machine Converter to create a VHD. Created an Azure RM Disk Image from that and spun up a VM, all of which seemed to go fine. My problem is that the New-AzureRMVM gets stuck in creating, and when I go to the boot diagnostics from the screenshot it is stuck on a "Please unlock disk sda5_crypt:". First, from what I gather is there really no way to get console access to my VM so that I can enter this? It won't get past creating so connect is greyed out and I can't SSH into it. Is my only option here to go back to the VM on vCenter and migrate the entire partition to a new partition without disk encryption, then redeploy? Is there any sort of startup file Azure accepts that could input this for me?