- Prerequisites
Read the official VMware documentation and we know that esxcli commands can only be used for minor version upgrades, but not for cross-version upgrades. For example, esxi4 to esxi5 is not allowed. The version to be upgraded is:
VMware-VMvisor-Installer-5.1.0-799733.x86_64, that is, ESXi5.1 upgrade to ESXi5.1b
Note official documentation ):
You can use vSphere CLI to upgrade, update, or patch ESXi 5.x hosts.
You cannot use the esxcli command to upgrade an ESX or ESXi host of version 4.x to ESXi 5.x. To upgrade an ESX or ESXi host of version 4.x to ESXi 5.x, use vSphere Update Manager or perform an interactive or script upgrade.
- Lab environment:
ESXi5.1 HOST: inspur NF560D2
Windows Server 2008 R2 client: Dell desktop
- Tutorial steps:
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image001 "border =" 0 "alt =" clip_image001 "src =" http://www.bkjia.com/uploads/allimg/131228/0223161432-0.png "height =" 484 "/>
Click security configuration file --> properties:
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image002 "border =" 0 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/131228/0223162405-1.png "height =" 455 "/>
Enable ESXi Shell and SSH in properties:
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image003 "border =" 0 "alt =" clip_image003 "src =" http://www.bkjia.com/uploads/allimg/131228/02231C231-2.png "height =" 484 "/>
Open the SSH port in the firewall settings:
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image004 "border =" 0 "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/131228/0223164292-3.png "height =" 484 "/>
2. Upload the esxi510-201212001.zip package to the storage for upgrade. The package is downloaded from the vmware official website.
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image005 "border =" 0 "alt =" clip_image005 "src =" http://www.bkjia.com/uploads/allimg/131228/0223161248-4.png "height =" 414 "/>
Find the corresponding upgrade package and put it under the root directory of the storage.
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image006 "border =" 0 "alt =" clip_image006 "src =" http://www.bkjia.com/uploads/allimg/131228/0223162B6-5.png "height =" 431 "/>
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image007 "border =" 0 "alt =" clip_image007 "src =" http://www.bkjia.com/uploads/allimg/131228/0223162430-6.png "height =" 124 "/>
3. At this time, the host enters the maintenance mode. We need to use commands for maintenance, so we need to move all virtual machines on the host to other hosts.
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image008 "border =" 0 "alt =" clip_image008 "src =" http://www.bkjia.com/uploads/allimg/131228/0223163963-7.png "height =" 198 "/>
4. Use SCRT to connect to the esxi host after opening
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image009 "border =" 0 "alt =" clip_image009 "src =" http://www.bkjia.com/uploads/allimg/131228/0223161246-8.png "height =" 422 "/>
Enter the root and password to enter the command line status:
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image010 "border =" 0 "alt =" clip_image010 "src =" http://www.bkjia.com/uploads/allimg/131228/02231A310-9.png "height =" 409 "/>
You have already entered the ESXI5.0 host and upgraded the esxcli command. Here we will introduce how to use esxcli.
Esxcli -- server = server_name software vib list to view packages
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image011 "border =" 0 "alt =" clip_image011 "src =" http://www.bkjia.com/uploads/allimg/131228/0223164518-10.png "height =" 133 "/>
We have seen all the packages.
5. Use esxcli -- server = server_name software vib install -- depot = LOCAL_PATH/DEPOT_NAME for upgrade below
First, determine the location of our package and use the ls command to view
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image012 "border =" 0 "alt =" clip_image012 "src =" http://www.bkjia.com/uploads/allimg/131228/0223164V0-11.png "height =" 303 "/>
We have seen that the esxi510-201212001.zip package is here. Here is our path, and the path is very important. If your path is incorrect, it cannot be upgraded normally, and it must be an absolute path!
6. Here, esxcli software vib install-d =/vmfs/volumes/datastore1is the absolute storage path of the esxi510-201212001.zip package. The path cannot be one fewer /! Every letter is required!
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image013 "border =" 0 "alt =" clip_image013 "src =" http://www.bkjia.com/uploads/allimg/131228/0223162a3-12.png "height =" 395 "/>
7. After the above steps appear, the upgrade is successful and you can reboot the system.
650) this. width = 650; "style =" background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px "title =" clip_image014 "border =" 0 "alt =" clip_image014 "src =" http://www.bkjia.com/uploads/allimg/131228/02231BI7-13.png "height =" 227 "/>
- Summary:
- Note the esxcli command restrictions. Not all upgrades can use esxcli for updated, and only minor updates can be performed between versions.
- When deploying and upgrading, you must pay attention to the absolute path, that is, the location where the storage is placed in the upgrade package. If this is wrong, the upgrade will fail.
- It is best to confirm that the host is already in the maintenance mode. Otherwise, the VM running in the host will be stopped during the upgrade, causing losses in the production environment.
This article from "be a practical virtual man" blog, please be sure to keep this source http://yb2010.blog.51cto.com/2805760/1151122