准备工作:

  1、到vmware网站下载vSphere CLI 4.0, 46M exe(md5sum:56f47c1c9f63e82bbc629d75099a09a9) 并安装

  2、下载升级文件upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip

       ESXi 4.1 (upgrade ZIP from ESXi 4.0),MD5SUM(1) 3397a58d7dc2f1be1e8eeee85d0d75c5
 

 

步骤如下:

  1、用VMware vSphere Client关闭所有虚拟主机,并进入维护模式(选择你的Esxi -> 右键“进入维护模式”)如图:

      

  2、运行vSphere CLI,步骤如下:开始->程序->VMware->VMware vSphere CLI ->Command Prompt

  3、输入以下命令:

       1) cd bin

       2) vihostupdate.pl -i --server 服务器名或IP --username root --password 密码 -b x:\xx\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip

      提示:

          1) x:\xx 为具体存放upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip路径;

          2) 输入第2条命令敲Enter后,可能提示:没有找到libxml2.dll ... 错误,这时你把所需文件从C:\Program Files\VMware\VMware vSphere CLI\Perl\bin下的所有DLL文件拷到c:\windows\system32下就可以了。

          3) 输入第2条命令敲Enter后,要等待一段时间,因为正在上传upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip到服务器上,如果提示如下:

Maintenance mode is not enabled or could not be determined.The following VIBs require this host to be in maintenance mode: deb_vmware-esx-firmware_4.1.0-0.0.260 247. Please put the host in maintenance mode to proceed.

     能看懂E文的人,就知道肯定是自己忘记设置主机进入维护模式了;这时把主机进入维护模式,再试下就行了:)    

  4、成功完成后,提示如下:The update completed successfully, but the system needs to be rebooted for the changes to be effective.

    如果不放心,还可以确认下,输入命令:vihostupdate.pl --server 192.168.1.9 -query ,提示:

Enter username: 输入用户名
Enter password:密码
显示如下:
---------Bulletin ID--------- -----Installed----- ----------------Summary-----------------
ESXi410-GA-esxupdate          2010-11-21T01:18:25 ESXi pre-upgrade Bulletin

ESXi410-GA                    2010-11-21T01:18:25 ESXi upgrade Bulletin
 
   5、退出维护模式,重新启动下虚机
  
      到此升级完成了,再用vSphere Client连接虚机时,就会提示升级vSphere Client 4.1软件了,如图: