Rename VMDK file in esxi 6.5

5,509

Maybe this KB Articel by VM can help you with your question. In the articel it is described like this:

  • First you should stay save and have a Backup of the VM and it should be powered down.
  • Also your VM shouldnt have any snapshots left or shared disks with other machines.

The Renaming process is follwing with: If you have a vSphere Client

Log in to the VMware vSphere Client.

Locate the virtual machine in your host inventory and remove it.

Open a console to the ESXi host

Navigate to the directory containing the virtual machine.

Rename (VMDK) files using the vmkfstools -E command

Copy the virtual machine configuration file (.vmx) and edit the copied file in a text editor (i would preffer Notepad++) modify all old instances of the virtual machine's file names to the new file names.

Save the file and exit the editor.

Rename all remaining files with exception to the .vmx config file. Swap to the parent dircetory and rename it.

Now you can add the new VM config to the inventory of your ESXi host. You should be able to power on the Machine and be prompted for a question where you should answer I moved it. If you are not promted for the question you can find it in the summary tab and by right clicking the machine in your inventory where should be an option Answer question

For more information and more detailed reffer to this link https://kb.vmware.com/s/article/1029513?

This Section: Renaming virtual machine files in-place using the console

should help you.

Share:
5,509

Related videos on Youtube

Prince Tagoe
Author by

Prince Tagoe

Updated on September 18, 2022

Comments

  • Prince Tagoe
    Prince Tagoe almost 2 years

    I am attempting to rename VMDK's to eliminate spaces in the name.

    Because I want to migrate our VMs from an old ESXi Server to a new Version Server.

    (with scp command , I can only migrate VMs without spaces in the file names)

    looking at this question : Migrate/Copy VM from ESXi to other ESXi

    I don't have a VMware vCenter

    Any idea or any suggestions to do this migration?

    • dortegaoh
      dortegaoh about 5 years
      You can copy files with spaces with scp. you only need to either escape the space in the file\ name.vmdk or use quotes around the "file name.vmdk".
    • Prince Tagoe
      Prince Tagoe about 5 years
      I have do scp copy , but he can't copy only 505B
    • dortegaoh
      dortegaoh about 5 years
      Then you should focus on fixing that problem. Renaming files will gain you nothing.
    • Prince Tagoe
      Prince Tagoe about 5 years
      Thank You I open the issue in Esxi Forum or here in serverfault ?
    • dortegaoh
      dortegaoh about 5 years
      That's up to you. But I just posted a different method in your earlier question, I suggest you try this first.
    • Prince Tagoe
      Prince Tagoe about 5 years
      Not working for me , but author file is worked propley
    • Prince Tagoe
      Prince Tagoe about 5 years
      author file like <vmname>-flat.vmdk is proply copied (size = 10Gb)
  • Prince Tagoe
    Prince Tagoe about 5 years
    this article is also for esxi 6.5 ?.
  • Kevin
    Kevin about 5 years
    @PrinceTagoe This should actually work for this version fine
  • Prince Tagoe
    Prince Tagoe about 5 years
    Rename cannot resolve the problem :