VMware ESXi - Lost connectivity to the device mpx.vmhba32:C0:T0:L0 backing the boot filesystem
I have some issues with my ESXi host. The host is losing contact to the usb stick that is holding the configuration. It might have something to do with the fact that the usb stick is bought at Gekås...
Anyway the error message looks like this:
Lost connectivity to the device mpx.vmhba32:C0:T0:L0 backing the boot filesystem /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0. As a result, host configuration changes will not be saved to persistent storage.
All you actually have to do is to reboot the ESXi host. The problem is that I am to lazy to do it right away and all the changes you have made, i.e deploying new VMs etc, will be lost on reboot.
If you have made some changes that you want to keep it is easy to take out the running configuration, reboot, and put the configuration back.
As my 'daily driver' is a linux laptop one of the easiest ways to get access to PowerCLI is to use the PowerCLI Core docker image.
This is a step-by-step guide to backup and restore your ESXi configuration.
Start by installing docker
Spin up the PowerCLI Core image
docker run -it vmware/powerclicore
As this is a homelab we have to ignore the warning about the ESXi host is using a self signed certificate
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Connect to vCenter or directly to the ESXi host
Connect-VIServer -server <IP> -user <user> -pass <password>
Put the host in Maintenance mode in the GUI or with this command
Get-VMHost <IP> | Set-VMHost -State Maintenance
Take a backup of the "running config"
Get-VMHost <IP> | Get-VMHostFirmware -BackupConfiguration -DestinationPath /tmp/
Reboot the host in the GUI or with this command
Restart-VMHost <IP>
Once the host has rebooted, reconnect vCenter or ESXi host
Connect-VIServer -server <IP> -user <user> -pass <password>
Restore configuration from backup
Get-VMHost <IP> | Set-VMHostFirmware -Restore -Force -SourcePath /tmp/configBundle-<IP>.tgz
The host will now automatically reboot and start with the restored configuration
Take the host out of Maintenance mode
Get-VMHost <IP> | Set-VMHost -State Connected