Rename Azure Virtual Machine

Anonymous
2022-08-25T07:23:12.08+00:00

Hallo,
I've got a question about how to rename a virtual mashine in Hyper V.
I already tried several solutions on the internet (for example renaming with the powershell script), but none seems to work.
Does anyone have experience with this and can help?

BMWITi.onmicrosoft.com
69c3b14b-e78e-400a-a3d2-7c0ae48f5375

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,763 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Alan Kinane 16,911 Reputation points MVP
    2022-08-25T08:24:15.617+00:00

    If it's an Azure virtual machine then the resource cannot be renamed. You would need to redeploy the virtual machine in order to choose a different name.

    You can use tags instead to help identify the resource or use a friendly name after the resource name, here's how to do that: https://azureis.fun/posts/Adding-a-friendly-name-to-Azure-Resources/


  2. Limitless Technology 39,731 Reputation points
    2022-08-26T08:51:22.58+00:00

    Hello UmanskiyFeliksFeliksUmanskiypartne

    Renaming a Virtual Machine in HyperV should be easy as long as the VM is Turned off (not Stopped or Running). It would be helpful if you post any information about how you are trying to rename and if there is any messages on screen that would help the community to identify the issue.

    Rename-VM cmdlet:
    https://learn.microsoft.com/en-us/powershell/module/hyper-v/rename-vm?view=windowsserver2022-ps

    -----------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  3. Xu Gu (Shanghai Wicresoft Co,.Ltd.) 501 Reputation points Microsoft Vendor
    2022-08-29T08:04:45.04+00:00

    Hello UmanskiyFeliksFeliksUmanskiypartne,

    If you want to rename a virtual machine in Azure, you can only back up the data from the original virtual machine, then delete the old virtual machine, create a new virtual machine, and finally import the data from the old virtual machine into the new virtual machine.

    The link below have the same problem with you:
    how-to-rename-an-azure-vm

    I hope my answer can help you!

    Best Regards,
    Xu Gu

    0 comments No comments

  4. Pavel yannara Mirochnitchenko 12,621 Reputation points MVP
    2023-10-30T15:25:51.85+00:00

    So Azure or Hyper-V, which is it? Totally different platform and capabilities. In Azure it cannot be renamed.

    0 comments No comments

Your answer

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