Safely moving virtual disks to a new VM and decommissioning old VMs in vSphere.
search cancel

Safely moving virtual disks to a new VM and decommissioning old VMs in vSphere.

book

Article ID: 450002

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides guidance on safely decommissioning source virtual machines (VMs) after detaching virtual disks and re-attaching them to a different VM.

It also outlines the procedure to ensure backend datastore filenames match the new VM's inventory name.

  • Note: Backend datastore disk files (.vmdk) retain the name of the original source VM after being attached to a new VM as well by design.

Environment

  • VMware vSphere ESXi 7.x, 8.x, 9.x
  • VMware vCenter Server 7.x, 8.x, 9.x

Cause

Disk renaming and VM decommissioning are standard administrative tasks. vSphere does not automatically rename files during disk remount to prevent breaking external references.

Resolution

Follow the below steps to safely move the disk to a new VM and decommission the old VM.  

Step 1: Verify Decommissioning Safety

  1. Log in to the vSphere Client.
  2. Select the source VM and confirm the Hard Disk intended for migration is no longer listed under VM Hardware > See All Disks in the VM Summary tab.
  3. Remove the source VM from inventory by right click > Delete from Disk.
    (NOTE: Prior to deletion, verify that you have selected the correct VM and have a backup of any critical component data which needs to be retained.)

Step 2: Rename disk via Storage vMotion 

  1. On the destination VM, verify that the disk(s) are mounted and accessible inside the guest OS.
  2. Right-click the VM and select Migrate, select Change storage only and click on NEXT
  3. Select CONFIGURE PER DISK and choose the disk(s) with the name of the source VM you want to rename and click CONFIGURE
  4. Choose a datastore different from the current one and click CONFIRM.
  5. Complete the migration by clicking NEXT.