I upgraded VMWare vSphere Hypervisor (ESXi) 4.1 to 4.1 Update 1 through ssh, and here’s the way.
First, you must enable SSH by the console or vSphere Client. The following web page shows the detail process for it, but I have not set up the non-root user yet.
After that, you can login as root user (if you’ve set up non-root user, use it).
$ ssh root@esxi-server-ip
To enter the maintenance mode, shutdown all virtual machines. I don’t know the way of shutting down all at once, and execute the command many times.
# vim-cmd vmsvc/power.shutdown <vmid>
You can use this command in order to know the vmid.
# vim-cmd vmsvc/getallvms
Enter the maintenance mode.
# vim-cmd hostsvc/maintenance_mode_enter
Download the update file (update-from-esxi4.1-4.1_update01.zip), and send it by SCP. Since ESXi server, however, doesn’t have ‘unzip’ program, I unzipped the files on my Mac and send the directory.
$ scp -r update-from-esxi4 root@esxi-server-ip:/vmfs/volumes/Your-Data-Storage-Name
You can check the data storage name by the command `ls /vmfs/volumes/`.
The preparation step is done, and go!
# cd /vmfs/volumes/Your-Data-Storage-Name/update-from-esxi4 # esxupdate update -m metadata.zip
After updated, you must exit maintenance mode and reboot the machine.
# vim-cmd hostsvc/maintenance_mode_exit # reboot
Finally, you can check the current version of Hypervisor by the following command.
# vmware -v VMware ESXi 4.1.0 build-348481
References
- ESXi (ESX 4i) Enable SSH
- ESXiにSSHでログインしてよく使うコマンド | ホゲホゲロック (in Japanese)
- VMware/ESXi/VMware Infrastructure Remote CLIを利用する – きのさいと (in Japanese)
- [VMware] VMware ESXiを4.0.0から4.1.0へアップデートする方法: Akito’s IT技術 メモ (in Japanese)
- ehsia.com – my stuff and reviews » SCP to ESXi in Mac OS X
- VMware Communities: how to check esx version from command…