Hey guys,
I just spent 4 hours trying to solve this problem and turns out it's a bug so I thought i'd share it here
Steps to reproduce:
1 - create a VM and setup its dvd player to use an ISO file in a datastore as boot device for installing
2 - after install is done the dvd player is automatically disconnected from the connected devices to avoid booting on it again.
3 - delete the ISO file in the datastore or through SSH.
4 - try to export the VM through any mean: web client, ovftools, anything... All fails, especially the web client which just shows a progress bar with no errors.
When you check the logs, you find this in hostd.log:
2020-01-25T22:46:28.314Z info hostd[2098582] [Originator@6876 sub=Solo.Vmomi opID=esxui-2b6c-039b user=root] Activation [N5Vmomi10ActivationE:0x00000063e4b18730] : Invoke done [exportVm] on [vim.VirtualMachine:6]
2020-01-25T22:46:28.314Z info hostd[2098582] [Originator@6876 sub=Solo.Vmomi opID=esxui-2b6c-039b user=root] Throw vim.fault.FileNotFound
2020-01-25T22:46:28.314Z info hostd[2098582] [Originator@6876 sub=Solo.Vmomi opID=esxui-2b6c-039b user=root] Result:
--> (vim.fault.FileNotFound) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> file = "/vmfs/volumes/5e2335a6-78aef506-d442-28f10e01eeaf/ISO/debian-10.2.0-amd64-DVD-1.iso"
So even when the dvd player of a VM is disconnected if it was previously set to an ISO file which has been later removed from a datastore it prevents any regular VM export command through any mean and without clear error message.
This shouldn't provoke a blocking to export a VM, and if it does the corresponding action should display "failed because of missing ISO file..." and not just show an infinite progress bar with no errors.
Thanks for your time