If downtime is an option, which obviously is needed, you can just upgrade the host without affecting the machines. The machines will be present on a datastore and they will not be on the disk that hosts Esxi OS (unless you have all of it on just one disk, which is very wrong thing to do).
Its almost like a windows machine, when you re-install/upgrade the OS the changes/formatting only happens on the OS drive and you still retain the files on other drives.