Cannot remove passthrough setup on ESXi
Solution 1:
The following best practice prevents this problem from occurring:
Always unmark devices for passthrough before removing them from the server.
The following workaround describes how to force the change from passthrough mode to non-passthrough mode:
Edit the /etc/vmware/esx.conf file by changing the owner of the PCI device from passthru to vmkernel. The following is an example of the necessary edit: Change from: /device/000:02.0/owner = "passthru" Change to: /device/000:02.0/owner = "vmkernel"
Reboot the ESX/ESXi host.
Solution 2:
Using the Vsphere Client select your host, then the Configuration tab, select Advanced Settings in the Hardware section, then Configure Passthrough and de-select the PCI device you're concerned about and reboot the host.
Solution 3:
I ran into this issue this evening as I had 2 identical SAS controllers. PhungHV's information was correct, however when you are in this mode you also cannot access the disks to change the file to get out of the mode. An annoying catch 22 at best. What happens is that VMware boots and reads the settings, then marks the device as a passthrough which causes VMWARE to loose access to it.
To resolve this issue I booted to an Ubuntu live disk. I mapped partition #5
-
Mount Boot Drive Partition #5
mount /dev/sdX5 /mnt
-
Make temp folder to work in
mkdir /tmp/vmware
-
Copy State.tgz
cp /mnt/state.tgz /tmp/vmware
-
Extract local.tgz from state.tgz
tar -zxf /tmp/vmware/state.tgz
-
Extract etc from local.tgz
tar -zxf /tmp/vmware/local.tgz
-
Edit the Config File
nano -w /tmp/vmware/etc/vmware/esx.conf
Find appropriate reference (or all if your not sure) of passthrough and change to vmkernel
-
Create new local.tgz
cd /tmp/vmware tar czf local.tgz etc/
-
create new State.tgz
tar czf state.tgz local.tgz
-
Copy to partition
cp state.tgz /mnt/state.tgz
-
Reboot
reboot