On ESXi, 6.7.0, 19898906, trying to run 'cleanup_patch_store.sh' suggested in "VMware vSphere Lifecycle Manager fails to download patches after vCenter Server upgrade from 5.5.x u...", results in:
./cleanup_
patch_store.sh
Traceback (most recent call last):
File "./worker.py", line 10, in <module>
from vumUtils import parseConfigFile
ImportError: No module named 'vumUtils'
What do I need to do to fix this?
---
Background: can't update the server using vCenter because of:
The host returns esxupdate error codes: -1. Check the Lifecycle Manager log files and esxupdate log files for more details.
... and
2023-08-25T16:09:20Z esxupdate: 2100557: Metadata.pyc: INFO: Reading metadata zip /tmp/tmp6hx5xtx4
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: An esxupdate error exception was caught:
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: Traceback (most recent call last):
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/esxupdate/lib64/python3.5/site-packages/vmware/esximage/Metadata.py", line 64, in ReadMetadataZip
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/zipfile.py", line 1026, in __init__
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/sys-boot/lib64/python3.5/zipfile.py", line 1093, in _RealGetContents
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: zipfile.BadZipFile: File is not a zip file
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR:
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: During handling of the above exception, another exception occurred:
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR:
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: Traceback (most recent call last):
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/usr/sbin/esxupdate", line 239, in main
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: cmd.Run()
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/esxupdate/lib64/python3.5/site-packages/vmware/esx5update/Cmdline.py", line 105, in Run
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/esxupdate/lib64/python3.5/site-packages/vmware/esximage/Transaction.py", line 88, in DownloadMetadatas
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: File "/build/mts/release/bora-19898906/bora/build/esx/release/vmvisor/esxupdate/lib64/python3.5/site-packages/vmware/esximage/Metadata.py", line 68, in ReadMetadataZip
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: ERROR: vmware.esximage.Errors.MetadataFormatError: File is not a zip file
2023-08-25T16:09:20Z esxupdate: 2100557: esxupdate: DEBUG: <<<
... which lead me to the above mentioned article and the instructions to download and run a cleanup script.
I got through this error:
-sh: ./cleanup_patch_store.sh: Permission denied
... by running this:
chmod +x cleanup_patch_store.sh
I even got through this error thanks to e.g. "run bash script" discussion (thank you!):
-sh: ./cleanup_patch_store.sh: not found
... by updating the first line in the script from
#!/bin/bash
to:
#!/bin/sh
... and now I am getting the "ImportError: No module named 'vumUtils'" error.
(Do I really need to install 'pip' or something like that and install that python package?)
Appreciate any help!
@marauli wrote:The question then is, how do I bypass those "vmware.esximage.Errors.MetadataFormatError: File is not a zip file" errors and patch the server?
Turns out, I needed to reboot the host not once but twice to bypass 'esxupdate error codes: -1' and all the related errors in the log.
The original question is a bad one as the article and the script are not applicable to ESXi 6.7, it seems.
My bad: the article suggesting to run the script only applies to ESXi 7, and this one is 6.7.
The question then is, how do I bypass those "vmware.esximage.Errors.MetadataFormatError: File is not a zip file" errors and patch the server?
@marauli wrote:The question then is, how do I bypass those "vmware.esximage.Errors.MetadataFormatError: File is not a zip file" errors and patch the server?
Turns out, I needed to reboot the host not once but twice to bypass 'esxupdate error codes: -1' and all the related errors in the log.
The original question is a bad one as the article and the script are not applicable to ESXi 6.7, it seems.
