Unable to add a vmdk to the VM using the Host UI.
search cancel

Unable to add a vmdk to the VM using the Host UI.

book

Article ID: 314361

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Workaround to re-attach the vmdk.

Symptoms:
On the Host UI, when we detach a vmdk (either base vmdk or snapshot vmdk) and try to add it back, the hard disk shows a blank configuration, and the save button doesn't give us any output.


Environment

VMware vSphere ESXi 7.x

Cause

Under investigation.

Resolution

Currently, we are unable to add the vmdk to using the Host UI. However, as a workaround, we can add it by editing the vmx file using the CLI.

Workaround:

Add the vmdks to the VM using the CLI.
Take a PuTTY to the ESXi host and run the below command:

vim-cmd vmsvc/device.diskaddexisting <vmid> /vmfs/volumes/<datastore>/<VM folder>/<VM>.vmdk 0 1

The 0 at the end represents the SCSI controller you want to add the disk to and the 1 represents the SCSI target number, so if you already have a SCSI0:0 disk, add the next disk as SCSI0:1 (0 1).

Additional Information

Impact/Risks:
Unable to attach a vmdk to the VM.