VMware Cloud Community
vvijays
Contributor
Contributor
Jump to solution

Need to change the .vmdk file name

I need to change name of the vmdk files which will get match to name of VMs. Please someone suggest me the steps to do the sameange the

0 Kudos
1 Solution

Accepted Solutions
siva2vmware
Enthusiast
Enthusiast
Jump to solution

Hi,

Hope you are looking below steps.

Renaming virtual machine files using Cold Storage Migration

The files of virtual machine can be renamed on the fly when a Cold Migration is initiated from the vSphere Client, only the virtual machine's folder is renamed.

To rename the files:

    Log into the VMware vSphere Client.

    Locate the virtual machine in your host inventory.

    Right-click the virtual machine and click Rename.

    Change the virtual machine name as required.

    Perform Cold migration to a new datastore of the virtual machine.

    For more information, see:

        For ESXi/ESX 4.x, see Cold Migration in the vSphere Datacenter Administration Guide.

        For ESXi/ESX 3.5, see Cold Migration in the Basic Administration Guide.

    After the migration completes, the virtual machine files match the virtual machine name configured in Step 4.

Note: If a virtual machine directory already exists on the datastore with the same name, then the target virtual machine is placed in a new directory with _1 appended.

View solution in original post

0 Kudos
4 Replies
siva2vmware
Enthusiast
Enthusiast
Jump to solution

Hi,

Hope you are looking below steps.

Renaming virtual machine files using Cold Storage Migration

The files of virtual machine can be renamed on the fly when a Cold Migration is initiated from the vSphere Client, only the virtual machine's folder is renamed.

To rename the files:

    Log into the VMware vSphere Client.

    Locate the virtual machine in your host inventory.

    Right-click the virtual machine and click Rename.

    Change the virtual machine name as required.

    Perform Cold migration to a new datastore of the virtual machine.

    For more information, see:

        For ESXi/ESX 4.x, see Cold Migration in the vSphere Datacenter Administration Guide.

        For ESXi/ESX 3.5, see Cold Migration in the Basic Administration Guide.

    After the migration completes, the virtual machine files match the virtual machine name configured in Step 4.

Note: If a virtual machine directory already exists on the datastore with the same name, then the target virtual machine is placed in a new directory with _1 appended.

0 Kudos
vvijays
Contributor
Contributor
Jump to solution

Appriciated your quick response , Tried your solution in environment and it works fine .

Thank you for your response

0 Kudos
vmkfix-SSA
Contributor
Contributor
Jump to solution

Spoiler

I recently received a request to rename the vmdk file on each VM.

This procedure is a little more complicated. If the instructions are not followed correctly, the VM may not be powered.

Before starting, I recommend making a backup of this VM and noting down all disc information.

When we change the OS drive, we must power off.

We can do this activity on other drives while the power is turned on..

 

>    Log in to the vCenter.

>   Locate the virtual machine in your host inventory.

>   Power down the virtual machine

>   Right-click on the virtual machine and click Remove the Disk from inventory.

>   Open SSH session to the ESXi/ESX host.

.>  Navigate to the directory containing the virtual machine.

For example:

cd /vmfs/volumes/DatastoreName/originalname

> Rename the virtual disk (VMDK) files using the vmkfstools -E command:

#  vmkfstools -E originalname.vmdk newname.vmdk

follow article with screenshots

https://vmkfix.blogspot.com/2023/04/how-to-rename-vmdk-file-in-vmware.html
0 Kudos