T4K
Contributor
Contributor

How to disable ESXi Passthrough my findings

There is no easy way to do it, it seems.

So I wanted to say that I couldn't afford to do an upgrade on my server and my service provider wanted $30 for IPMI access. I have searched countless forums on how in the world to fix this problem. I set Passthrough on and all my datastores vanished and said I need to add a datastore. I couldn't remove Passthrough because since the file system is mounted in read only for some reason you can't ssh in to the server and edit esxi.conf to fix the problem. This is my first tutorial on how to do this, so don't bash my head that it's sloppy.

1. Boot with a debian or ubuntu live cd

List your drives / partitioned: Open a terminal window

2. type parted -l

Mine was sda5

3. mount /dev/sda5 /mnt

4. ls /mnt/

5. cp /mnt/state.tgz ~/

6. cd ~

7. tar xvf state.tgz

8. tar xvf local.tgz

So you get a etc folder now. Go to /etc/vmware

9. nano esxi.conf

10. Replace everything that says passthru with vmkernel

11. Save the file


Now lets copy the file back to the mount point, but first we have to recreate the archive.

12. tar czf local.tgz etc/

13. tar czf state.tgz local.tgz

14. cp state.tgz /mnt/

Done. Reboot and everything should work as it did originally.

This was tested in ESXi 6.0 and 5.5.

Hope this will help others that are trapped in a similar situation. Of course you can reinstall but a lot of people wanted to know how to do it. This which is basically 14 steps can probably be shortened. I hope that my first contribution on this forum is not overlooked.

9 Replies
naq90
Contributor
Contributor

Thank you so much for this! I wasted 2 hours trying to fix passthrough on my host, your post spared me from wasting anymore.

0 Kudos
mveras1972
Enthusiast
Enthusiast

This procedure resulted in a purple screen of death for me. However, it was the starting point that led to my solution. Here's what happened:

After I edited the esx.conf in Ubuntu, setting all my devices to owner = vmkernel, and packaged it back into the state and local tgz files (I'm surprised they don't have a federal.tgz (LOL)), I booted ESXi but got a purple screen saying I could not load multiboot device. Not sure what that meant. So I went back to Ubuntu live CD and knowing that there are two ESXi partitions, it occurred to me I could just copy the state.tgz from /dev/sda6 to /dev/sda5 to do a recovery. So that's what I did and then rebooted and ESXi came back up normally. I also knew that the esx.conf in the package stored in /dev/sda6 did not have all the entries set to passthrough. So that was my workaround. Thanks for the info. The only thing is that after booting up, I had to do a scan to find the datastore and then manually add my VMs to the inventory. After this my VMs booted up and all is well.

Thank you...

0 Kudos
pwillia6
Contributor
Contributor

This worked for me - thank you - what a pain.

I accidentally put my RAID controller onto passthru when I was adding something else and could not disable it.

0 Kudos
tibor979
Contributor
Contributor

THANKS A LOT!
This saved me a full esxi reinstall as I lost the nics+keyboard+mouse during a quick passthrough test :smileygrin:

Also read that removing the devices and booting the ESXi most probably will revert back the passthrough as well. For example in BIOS the nics,usb,etc can be disabled...

Although I did not have the option to try that as your solution was working great! Smiley Happy

0 Kudos
thelastofus
Contributor
Contributor

You rescue my life! Thank you!

0 Kudos
aniros
Contributor
Contributor

Hi T4K,

Thank you for your post. I'm preparing the Live USB...

But you said that we can reinstall. If I choose this option, I will lost my old VMs?

Thank you.

0 Kudos
aniros
Contributor
Contributor

Hi T4K,

I can't thank you enough. It was really useful for me.

I brought my VMs to life.

Now, in aim to avoid this situation in the future, I have 1 raid 5 with 4 SSDs. How can I install ESXi with the ability to, in case of a problem, make a new clean install without affecting existing VMs?

Thank you a lot

0 Kudos
TinoS1964
Contributor
Contributor

T4K,

I can't thank You enough for this solution.

It worked like a breeze in my VMware ESXI 6.5 machine, all my virtual machines are running again.

I'm a novice in Linux and it almost was a walk in the park with Your description.

Only thing that took me a minute  :

Between steps 11 and 12 the command "cd ~" should be entered before proceeding to step 12

Perhaps You could modify Your solution with this, so other dumbasses like myself don't have to think at all.Smiley Wink

Thanks again !! Heart

0 Kudos
Volker69
Contributor
Contributor

Hi,

thank you very much for this solution 😅
It saved me from more sleepsless nights.

 

One thing...
Most of the commands has to be executed with sudo.

Volker

0 Kudos