WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Heads Up - ESXi 8.0 Host Client unable to attach existing virtual disk to VM

Heads Up - ESXi 8.0 Host Client unable to attach existing virtual disk to VM

12.07.2022 by William Lam // 11 Comments

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

More from my site

  • Quick Tip - Accessing new custom theme editor for ESXi 8.0 Host Client
  • Managing ESXi Embedded Host Client settings
  • ESXi on Protectli Vault Pro 6650/6670
  • Creating a custom VIB for ESXi 8.x
  • Converting VirtualBox VDI (Virtual Disk Image) to VMDK for use with ESXi 8.x

Categories // Automation, ESXi, PowerCLI, vSphere 8.0 Tags // embedded host client, ESXi 8.0, host client

Comments

  1. *protectedSVC says

    12/07/2022 at 1:11 pm

    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.

    Reply
  2. *protectedOsama Muhammad says

    12/08/2022 at 9:22 am

    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.

    Reply
    • *protectedDaniel S says

      03/04/2023 at 5:21 pm

      It Worked for me. Added 4 SSD via Thunderbolt on a NUC for a NAS.

      Reply
  3. *protectedSprinkleJames says

    12/08/2022 at 2:52 pm

    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?

    Reply
    • William Lam says

      12/08/2022 at 4:03 pm

      ESXi host must be licensed with any type EXCEPT the Free Edition

      Reply
  4. *protectedAndré Pett says

    12/10/2022 at 10:00 am

    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

    Reply
    • William Lam says

      12/10/2022 at 12:52 pm

      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

      Reply
      • *protectedAndré Pett says

        12/11/2022 at 3:42 am

        Sorry, my bad. You're right, the workaround only works with newly created VMs.

        Reply
  5. *protectedShajal says

    12/12/2022 at 2:23 am

    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

    Reply
  6. *protectedStefan Gubler says

    12/21/2022 at 3:43 pm

    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.

    Reply
  7. *protectedTimothy Kwon says

    02/23/2023 at 6:15 pm

    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?

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...