I had already posted this in the ESXi 5 forum under the title "Can't hot remove virtual disk from running VM after adding passthrough device" but not received any reply. I hope this is the right forum for my problem.
I have a VM with 2 virtual disks under ESXi 5.1.
When the VM is running I can hot remove disk 2 in the VM settings dialog.
However, the remove button is greyed out when the VM is running as soon as I add a PCI device that has been passed through by the ESXi host.
The passthrough device is a SAS controller without any disks connected.
Why is it not possible to hot remove a virtual disk that resides on a datastore that is not related to the passthrough device ?
Is there any parameter that can be modified to enable removal ?
I've worked a little more on this and still don't understand what's blocking the removal of a virtual disk from a running VM when it has direct-IO devices configured which are passed through by the ESXi host.
It even doesn't work when you go pretty low level on the ESXi shell with vim-cmd.
Got the VM-id with "vim-cmd /vmsvc/getallvms"
and tried to remove the second virtual disk with "vim-cmd /vmsvc/device.diskremove <VM-id> 0 1 n".
( <VM-id> beeing the number of the VM in question returned by the first command, 0 is the controller number, 1 the disk unit number and the n stands for not deleting the related vmdk file)
It works and removes the second virtual disk from the running VM when it does not have direct-IO devices configured.
As soon as I run the VM with a SAS controller connected that has been passed through from the ESXi host the command fails with:
"Reconfigure failed"
Why is it not possible to remove a virtual disk from a running VM in that case ?
What is preventing the vim-cmd command to work ?
Is there a setting that can be tweeked to enable the hot removal ?