
Recover ESXi if USB boot device is VMDirectPath enabled
Recover an ESXi if the USB boot device has been enabled for VMDirectPathYou have activated VMDirectPath an all USB interfaces to find the right USB Port ?
Unfortunately, your system was booting from an USB device... (like me...
)Symptoms after the reboot (needed to enable VMDirectPath): - The configuration is "read-only" / configuration modifications are lost after reboot
- the local console is frozen.
- ESXi is booting slowly.
- ESXi can't find the VMtools when you try to install it.
- You can't disable VMDirectPath.
The problem is obvious, ESXi makes available the USB booting interfaces for VMDirectPath.
The USB boot drive behind this interface is no more available for the system.
Surprisingly, ESXi don't crash, VM's start as usual (try to remove system drive of Hyper-V).
Which operations have no effect ? - Any modification through vSphere Client (all settings are stored on the USB flash drive).
- Trying to connect in SSH on host to modify something (there is no more files to edit).
- ...
What can we do ?Manually edit the configuration for VMDirectPath on the USB Flash drive through a virtual machine.
Let's go:
- Download the last version of Ubuntu (
http://www.ubuntu.com/desktop/get-ubuntu/download)
- Load the ISO on hypervisor datastore
- Create a new VM for Ubuntu (no harddrive, no network, 1 vCPU and 512MB is enough).
- Attach the Ubunutu ISO file to virtual CD drive
- Add the VMDirectPath USB interface (which have the USB boot device)
- Boot on Ubuntu, don't install, just start as live CD
- Open the
Hypervisor1 partition
- Copy
local.tgz on Desktop
- Untar the copy of
local.tgz through these commands:
Code:
cd Desktop
sudo tar czf local.tgz etc
- Open the extracted folder
etc on desktop, then go in
vmware folder and finaly right click on
esx.conf, edit in text editor.
- find the line looks like
Code:
/device/000:27.0/owner = "passthru"
/device/000:27.0/
/device/000:27.1/owner = "passthru"
/device/000:27.1/
- Delete these lines, there is two lines for one VMDirectPath enabled device.
- Save this file on Desktop and close editor
- Replace the old config, compact the new
local.tgz through these commands
Code:
sudo rm /etc/vmware/esx.conf
sudo cp esx.conf /home/ubuntu/Desktop/etc/vmware/esx.conf
sudo rm local.tgz
sudo tar czf local.tgz etc
- If the new tgz as been made without error, replace
local.tgz on
Hypervisor1 partition with the new one on Desktop.
- Reboot ESXi
- Now, you are root, a read-write root
Does it work for you ?(VMware ESXi 4.1 / Ubuntu 10.10 x86)