Share via

Problems deploying Azure VM application on migrated server

Henrik Flodén 20 Reputation points
2023-12-01T09:06:29.38+00:00

Hi

I have created an Azure VM application that would like to deploy on a subset of my Azure VMs. This I can do without any problems through the Azure portal for VMs created in the Azure but servers that have been migrated (which is the bulk of our servers) this errors out with the message:
"Failed to update the virtual machine application. Error: Changing property 'osProfile' is not allowed."

I even get this error for servers that have been restored from backup.

I am able to deploy the VM application by creating a deploy-if-not-exist policy but that is quite a hassle. Has anyone found a way to overcome this bug?

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,537 Reputation points Moderator
    2023-12-01T10:59:00.4133333+00:00

    Hello Henrik Flodén

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Based on the issue looks like you are trying to update the OS profile of a migrated VM, which is not allowed. This is because the OS profile is set during the initial deployment of the VM and cannot be changed afterwards.

    One workaround for this issue is to create a new VM with the updated OS profile and migrate your workload to the new VM. Alternatively, you can use the deploy-if-not-exist policy to deploy the VM application to the migrated VMs.

    If you are still facing issues, I would recommend reaching out to Azure support for further assistance. They will be able to provide you with more specific guidance based on your environment and configuration.

    Hope this helps.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.