A couple of days ago, I had received an email from a customer that after upgrading to ESXi 8.0, they were no longer able to attach an existing virtual disk (VMDK) to a VM using the ESXi Host Client, which is accessible by opening a browser to the Hostname/IP Address of your ESXi host.
After selecting the desired VMDK to attach in ESXi Host Client wizard, the customer had noticed several fields were not populated as shown in the screenshot above and the workflow would not be allowed to complete as these fields are required.
Note: This issue also affects ESXi 7.0 Update 3i and potentially other newer releases, if they also contain the 2.x version of the ESXi Host Client. One workaround, which I have personally verified with ESXi 7.0 Update 3i is to uninstall the bundled esxi-ui VIB and install the prior version by downloading the ESXi offline depot (zip) for ESXi 7.0 Update 3g. While this may not be officially supported, for those that have a standalone ESXi host or using the Free ESXi version, this may be an acceptable workaround until a fix is available in a future patch/update. For detailed instructions, see my reply on this VMTN thread.
My use of the ESXi Host Client is typically limited because I have vCenter Server, but was curious about this issue since this is something I have done in the past using the ESXi Host Client without any issues. I saw the same behavior, which can easily be reproduced by creating a dummy VM with a virtual disk, detaching and attempt to re-attach the same VMDK.
I filed an internal bug and reached out to one of the ESXi Host Client Engineers and they confirmed that this is indeed a bug and they were able to quickly track down the problem relating to one of the Javascript calls which ESXi Host Client uses. This issue will be fixed in a future update of ESXi 8.x and currently only affects ESXi version that uses the new ESXi Host Client 2.x version, which was initially introduced with release of vSphere 8.
For customers that need a solution right now, you can use the following workaround by leveraging Automation. Below is an easy PowerCLI snippet that will allow you to attach an existing VMDK to VM by using the New-HardDisk cmdlet and connecting directly to ESXi host, since it also exposes a vSphere API.
The required parameters is a reference to a VM and the VMDK disk path which is in the format of "[datastore ] path/to/vmdk". While you can programmatically use PowerCLI and the vSphere API to construct this value. An easier way to retrieve this if you are only attaching a handful of VMs is by using the datastore browser within the ESXi Host Client. As you navigate to the desired VMDK, the disk path can be seen immediately below, which you can then copy and save that into the $diskPath variable.
$vm = Get-VM -Name "Test-VM" $diskPath = "[sm-vsanDatastore] 25169063-0084-2e2d-a364-ac1f6b1a4efa/Test-VM_1.vmdk" New-HardDisk -VM $vm -diskPath $diskPath -Confirm:$false
Below is an example output for running the PowerCLI snippet and now you have the desired VMDK attached to VM
SVC says
When attempting to change a disk from thin to thick from the datastore, I ran into the "A specified parameter was not correct" issue. I then detached the disk and tried again. I then was unable to reattach the disk due to the issue you describe. Looking forward to seeing a fix for both issues in the next release.
Osama Muhammad says
I found this bug 2 weeks ago the workaround is I created a new independent persistent disk, unregister the VM, manually edit the vmx file to replace the vmdk filename with that of the existing disk that you actually want, then re-register the VM.
Daniel S says
It Worked for me. Added 4 SSD via Thunderbolt on a NUC for a NAS.
SprinkleJames says
Hi William,
So, administering hosts licensed with the free vSphere Hypervisor is an important use case for the ESXi Host Client. Is your PowerCLI solution valid for such hosts? Or does that license disable use of such automation as I believe it does in some previous ESXi versions?
William Lam says
ESXi host must be licensed with any type EXCEPT the Free Edition
André Pett says
The ESXi 8.0a release notes mention a workaround for this issue.
"Workaround: After you select a hard disk and go to the Ready to complete page, do not click Finish. Instead, return one step back, wait for the page to load, and then click Next > Finish."
https://docs.vmware.com/en/VMware-vSphere/8.0/rn/vsphere-esxi-80a-release-notes/index.html
William Lam says
I don't believe this is the same issue, since the workaround doesn't really make sense as you can really go back one step ... at least I haven't been able to use it
André Pett says
Sorry, my bad. You're right, the workaround only works with newly created VMs.
Shajal says
The same thing happened to me, tube 2, solution one through terminal, add the hard drive,
vim-cmd vmsvc/getallvms
vim -cmd vmsvc/device.diskaddexisting 8/vmfs/volumes/vm2tbnvme/110lab/110lab.vmdk 0 0,
The other way is to open the virtual machine console with vmware vmrc from there open menu > manage > Virtual machine settings add the scisi disk
Stefan Gubler says
unbelievable. Version 8 and new bugs. If the issue was already in ESX 7U3i why it was not fiex before rolling out version 8 ?
Mots propably because sales determines the roll out date and not development nor Quality Assurance ! Poor quality. I'm now waiting to upgrade to version 8 and save the money.
Workaround for users of Vmware Workstation:
use vmware workstation to connect to your ESX.Server and then open the vm to edit. Adding existing virtual disks is not an issue. It works as desired.
Timothy Kwon says
thank you so much.
As a first homelab builder using consumer grade hardware. many features in esxi were not available. I was struggling a lot. This definitely helped me setting up VMs. I was advised against using this method to run NAS. any opinions?