VMware Cloud Community
MrJinx2008
Contributor
Contributor

Problem with adding existing hard disk in ESXi 8 (bug?)

I think there is a problem with the 'Add an existing hard disk' feature in the ESXi 8 UI.
The fields are empty and you can't save the disk you want to add.

MrJinx2008_0-1668847684688.png

To reproduce:

  1. Add a new standard hard disk to an existing VM and save
  2. Remove the newly created hard disk from the VM without deleting the files on datastore and save
  3. Add an existing hard disk to the VM and choose the vmdk you just created
  4. It won't be possible to save this configuration
Labels (5)
7 Replies
Kinnison
Commander
Commander

Hi,


It's a topic recently discussed in this same forum, and yes it's a bug easy to reproduce that occurs with hosts running EXSi 8.0 using their GUI. I also encountered the same problem by simply adding a new disk drive (not an existing one to an existing virtual machine but it is less reproducible because with some hosts it occurs and with others it doesn't.


Regards,
Ferdinando

Reply
0 Kudos
bss03arg12
Contributor
Contributor

I have the same problem...I think this bug is very easy to repeat...

bss03arg12
Contributor
Contributor

Hi

I solve the problem with follow steps.

you have an old disk to add... almalinux9_2.vmdk

1. add a new disk to vmWin_A, like tmp_disk_1

2. ssh login into exsi8 and vi the vmWin_A.vmx file and change the file name "tmp_disk_1" to almalinux9_2.vmdk, save the fiile.

3. unregister the vm (do not delete the vm) and then register it again.

you will see the disk with correct disk information.

if your almalinux9_2.vmdk is not in the same datastore, where vmWin_A is , you have to use ln -s to create. something like :

cd vm_directory

ln -s /vmfs/volumes/5fef1322-471bda24-550a-31e949ff6613/almalinux9/almalinux9_2-flat.vmdk
ln -s /vmfs/volumes/5fef1322-471bda24-550a-31e949ff6613/almalinux9/almalinux9_2.vmdk

I have not tested, maybe vmware can not handle the disks in different datastores.

 

bss03arg12_0-1669723483194.png

 

Tags (1)
maksym007
Expert
Expert

That is why better to wait and not to install this build to PROD.

Reply
0 Kudos
AAT_Aviation
Contributor
Contributor

This bug is so obvious that I'm starting to belive that this version wasn't tested at all. Besides, it has been three months since it was released. How long will you keep as waiting for the path, Vmware?

 

I've found the following workaround:

1. Get vmid using the command:  vim-cmd vmsvc/getallvms

2. Attach an existing disk using the commad: vim-cmd vmsvc/device.diskaddexisting vimid /path_to_datastore/test-vm/disk.vmdk 0 1

example (for vimid=10, SCSI0:1):

vim-cmd vmsvc/device.diskaddexisting 10 /vmfs/volumes/Datastore1/Test-Vm/additional_disk.vmdk 0 1

 

https://kb.vmware.com/s/article/1006685

 

robscreen
Contributor
Contributor

bss03arg12 ‎11-29-2022 04:05 AM>>>>

that worked for me.

Originally the re attached disk was 0 and VM couldnt be saved.

making a new dummy one. removing machine.

deleting new dummy disk and renaming old worked fine once the machine was re imported.

Reply
0 Kudos
dunnoIT
Contributor
Contributor

This worked for me thanks Heaps AAT

Reply
0 Kudos