I have installed ESXi on a host and on-top of it I have installed a Windows Server with NFS server enabled and 2 nested ESXi hosts that share the NFS storage.
In the NFS storage I have memorized files of a vm that must run on top of the 2 nested hosts.
vMotion migration works well from a nested host to the other one, but when I try to see how vSphere HA host failover works, the vm host changes in the vSpehre Web Client but the vm is not powered on on the new host. Anyway after the failover, the vm is registered to the new host, but if I try to power it on an error appears:
"An error occurred while creating temporary file for /vmfs/volumes/5c4f12d7-7269db2d-0000-000000000000/Guest/Guest.vmx: The file already exists"
How do I fix this? And does anybody know how to share a VMFS (not NFS) storage over the 2 nested hosts?
First of all, why you don't try to setup the iSCSI target role instead of using NFS on the windows server? Basically, it can be more useful to provide a shared storage in virtual infrastructure...
Then try to power-on the VM by ESXi itself (start the VM from ESXi management console, not the vCenter) and check the result and log files inside the VM directory ...
Because when I go to the ESXi console to add a new datastore, it asks me to create a new VMFS or NFS storage, I don't see any options to attach a new iSCS target.
I have no problem in shutting down the vm on a host and restarting it on another one manually...
that should normally work, seems like a file is still locked somehow.
For iSCSI you have to configure vSphere vmkernel interaces first and enable iSCSI to begin with. Documentation describes it here:
All types of local and shared storage (SATA, SAS and so on) can be selected in the first step of adding new datastore. The second one is related only to the NFS-based of datastore.
If you want to deploy an iSCSI based datastore, first you must provide an iSCSI LUN and add the target to the ESXi hosts. (Instead of using a real SCSI-based storage, you can deploy iSCSI target in the windows server and choose software iSCSI Adapter in ESXi)
vSphere HA is dedicated to doing VM failover operations interruption automatically against any type of failure/, So remember you don't need to do it manually at all.