Happened upon an unusual error while wrestling a Nexus 1000v out of a ESXi 5.1 host.
All seemed to progress well, the host was removed from the dvs without issue. The next step was to remove the Cisco vem VIB from the host in preparation for upgrade.
esxcli software vib remove -n cisco-vem-150-esx (or whatever vib name you are removing )
This led to an error I hadn’t seen before;
Error in running rm /tardisks/cisco_ve.v00:
Return code: 1
Output: rm: can’t remove ‘/tardisks/cisco_ve.v00’: Device or resource busy
It is not safe to continue. Please reboot the host immediately to discard the unfinished update.
…That’s not very pleasant.
Of course, if you’ve had to muck around with a petulant host and Nexus 1000v before, you’re probably aware that the VEM module is controllable from the ESXi shell.
So even though this host was removed from the DVS, the process controlling it hadn’t been stopped. The process can be controlled via the ‘vem’ command with the following basic available operators;
of course, vem stop is our go to here.
You could also use lsof to and grep to find the PID and then kill /brute-kill it, but unless the above fails, it’s more elegant to do it the first way.
Repeating the remove command was successful this time;
and we’re done here.