VMs registered to old datastore with no data related to the virtual machines
search cancel

VMs registered to old datastore with no data related to the virtual machines

book

Article ID: 394926

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Multiple virtual machines indicate they are attached to datastores with no data related to the VMs and no indication of attachment in VM settings via the UI. This is preventing removal and decommissioning of the storage.

Environment

  • VMware vCenter Server 8.x
  • VMware vCenter Sever 7.x
  • VMware vSphere ESXi 8.x
  • VMware vSphere ESXi 7.x

Cause

  • The association between the virtual machines and datastores exist due to virtual floppy drive configured to the VM.
  • Searching for the problematic datastore UUIDs in the associated VM vmx files shows that a floppy drive is configured which references the datastore.
    As long as the VM configuration references the datastore it will remain visible in the vCenter UI with an association to the virtual machines referencing it.

Resolution

    1. Gracefully shutdown or power off the virtual machine(s) in question.
    2. Connect to either an ssh session or direct host client to the host with the VM registered
    3. Remove the floppy reference:

                       If using the host client:

        1. Right click on the VM and choose edit settings
        2. Choose the X next to the entry for Floppy Drive to remove
        3. Click on Save to finalize the removal
        4. Verify the entry is no longer present in the vCenter UI for the VM

                      If using command line:

          1. cd into the virtual machine directory
          2. Edit the vmx file with vi
          3. Locate the lines related to the floppy drive (depending on virtual hardware version there may be differing numbers of lines per floppy drive from 2-4)
          4. Comment out the lines
          5. Save and exit the vi editor
          6. Locate the VM ID with vim-cmd vmsvc/getallvms | grep -i <vmname>
          7. Reload the VM configuration with vim-cmd vmsvc/reload <VM ID>
          8. Verify the datastore is no longer present under the VM in the vCenter UI 

Additional Information

See KB 323058 for other potential causes of the additional datastore entry