Problem
While reviewing the Hard disk configuration of VMware Horizon View ioVDI enabled virtual desktops, you notice that there are several disposable disks assigned to the VDI:
Note the Disk File path: 18/disp0/18disp0.vmdk
Note the Disk File path: 18/disp1/18disp0.vmdk
Note the Disk File path: 18/disp2/18disp0.vmdk
The following are the paths of each Hard disk with the disposable disks highlighted in red:
[datastore01b:view_lun11] 18/18-checkpoint.vmdk
[datastore01b:view_lun11] 18/disp0/18disp0.vmdk
[datastore01b:view_lun11] 18/disp1/18disp0.vmdk
[datastore01b:view_lun11] 18/disp2/18disp0.vmdk
[datastore01a:view_lun11] 4-vdm-user-disk-D-e7fd3c19-ca5e-4c7e-9531-ac6a22830c49.vmdk
[datastore01b:view_lun11] 18/181-internal.vmdk
Solution
As shown in the desktop properties above, we have 3 disposable disks assigned to the VDI but only one is really being used. To identify which disk is in use, SSH into the ioVDI management appliance and connect to the vCenter via the following commands:
fio3prd:~ # iovdi vcenter -ln -vu sladmin -va vc01.contoso.com
Enter the vCenter password:
Re-Enter the vCenter password:
Logged in to VMP : vc01.contoso.com
Once successfully logged into vCenter, proceed to execute the following command to list the VDI’s Cache Mode properties for each disk:
iovdi guest -dr -np 18 -gu a-tluk -v
An output similar to the follow will be displayed:
fio3prd:~ # iovdi guest -dr -np 18 -gu a-tluk -v
Enter Guest Password :
Re-Enter Guest Password :
Checking vSCSI filter
VM name: 18
scsi0:1.Cache Mode = write_vector
scsi0:2.Cache Mode = hyper_cache (Write Vector Candidate)
scsi0:3.Cache Mode = hyper_cache (Write Vector Candidate)
scsi1:0.Cache Mode = hyper_cache
scsi1:1.Cache Mode = hyper_cache
scsi0:0.Cache Mode = hyper_cache
Duplicate write-vector disks found
vSCSI filter status: Not OK
Checking Write Vector status
VM name: 18
Pagefile and temp folder are redirected
Write Vectoring status: OK
1 tests failed
Add failed guests to an ioVDI config to fix the issues. If already present, reapply the config.
fio3prd:~ #
From the output above, the disposable disks that are actually being used are the ones that are labeled as with:
(Write Vector Candidate)
This means that SCSI (0:2):
… and SCSI (0:3):
… are the ones we can delete so proceed to remove them from within the Virtual Machine Properties then re-execute the command again. Output similar to the following will be displayed:
fio3prd:~ # iovdi guest -dr -np 18 -gu a-tluk -v
Enter Guest Password :
Re-Enter Guest Password :
Checking vSCSI filter
VM name: 18
scsi0:1.Cache Mode = write_vector
scsi1:0.Cache Mode = hyper_cache
scsi1:1.Cache Mode = hyper_cache
scsi0:0.Cache Mode = hyper_cache
vSCSI filter status: OK
Checking Write Vector status
VM name: 18
Pagefile and temp folder are redirected
Write Vectoring status: OK
All OK
fio3prd:~ #
If you would like to traverse through all of the desktops rather than doing them independently, the command also accepts wildcards as demonstrated in the following command:
fio3prd:~ # iovdi guest -dr -np VDInamingConvention-* -gu a-tluk -v