vmware-vmupgrade执行文件位于VirtualCenter服务器的Program Files
VMwareInfrastructureVirtualCenter Server目录下。
命令行选项:
| 选项 | 描述 |
| -u user |
指定在目标虚拟机上具有足够特权的用户 |
| -p password | 在命令行上指定密码。若省略此选项,工具将立即提示输入密码 |
| -n vmname |
指定要升级的虚拟机的名称。此名称与虚拟机的显示名称一致。 使用多个-n 参数可指定多个虚拟机。若指定了-h,将忽略-n 选项 |
| -h host |
尝试升级特定主机上的所有虚拟机。 如果指定的主机并非 |
| -m maxpowerons | 在特定主机上,一次仅启动此处指定数量的虚拟机 |
| -o port |
如果已配置的端口并非默认端口 902,指定 VirtualCenter Server 端口 |
| -t maxpowerontime |
用户通过此选项可以设置当客户无法自行关闭计算机时,虚拟机保持 |
| -s | 跳过工具,仅执行虚拟硬件升级 |
| -q | 安静工作。 关机时不生成状态或完成消息 |
例升级数据中心DL中名为xp的虚拟机:
vmware-vmupgrade -u administrator -n /DL/xp
Enter password for administrator:
Connecting to VirtualCenter server on local port 443
Looking for VMs…
Found /DL/xp
/DL/xp: host is VMware ESX Server version 3.5.0
/DL/xp: VM is powered off, checking virtual hardware
/DL/xp: virtual hardware upgrade was not required
/DL/xp: setting up tools upgrade…
/DL/xp: tools upgrade setup complete
/DL/xp: power on requested
/DL/xp: power on task is running
/DL/xp: power on is complete
/DL/xp: tools update completed successfully
/DL/xp: VM was powered off
升级主机192.168.100.101上所有已关闭的虚拟机,主机位于数据中心DL中,且主机一次最多启动2台虚拟机:
vmware-vmupgrade -u administrator -h /DL/192.168.100.101 -m 2
Enter password for administrator:
Connecting to VirtualCenter server on local port 443
Looking for VMs on host /DL/192.168.100.101…
Found /DL/192.168.100.101:VC25u2
Found /DL/192.168.100.101:xp
/DL/192.168.100.101:VC25u2: host is VMware ESX Server version 3.5.0
/DL/192.168.100.101:VC25u2: Cannot upgrade. VM is not powered-off
/DL/192.168.100.101:xp: host is VMware ESX Server version 3.5.0
/DL/192.168.100.101:xp: VM is powered off, checking virtual hardware
/DL/192.168.100.101:xp: virtual hardware upgrade was not required
/DL/192.168.100.101:xp: tools are up-to-date. Skipping tools upgrade