Now, if you are like me and need to perform an upgrade from ESXi 4.0 to ESXi 4.1 on an existing server, you may quickly find yourself a bit miffed at VMware for getting rid of the handy client-side GUI host-update-utility/server-update-utility that previously came with ESXi 4.0; instead, you will find yourself forced to work at the "unsupported" command-line within ESXi 4.1 for a bit, but do not fear, it is rather straightforward and worth the patience.
Step 1: Get Required ESXi 4.1 Upgrade Files
On the VMware web site for ESXi 4.1 downloads, you will find the upgrade files that we are going to use to perform this update from VMware ESXi 4.0 to version 4.1 of ESXi.
Files to download:
- upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip
- VMware-viclient-all-4.1.0-258902.exe
- vmware-esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib
- vmware-esx-firmware-4.1.0-0.0.260247.i386.vib
- vmware-esx-tools-light-4.1.0-0.0.260247.i386.vib
Step 2: Get those VIB files to your ESXi Server
This step may sound a bit complicated or cumbersome to anyone that is used to doing all this sort of thing with nice little management GUIs, but it really is not TOO bad even for a novice. Just follow along and I will try to make this as straight-forward and simple as possible so you can migrate from ESXi 4.0 to ESXi 4.1 without incident. (note: as always, back up your VMs and such first, just in case).
In a nutshell, what we are about to do: we need to get the *.vib files over onto your ESXi datastore where they can be accessible by the ESXi command-line esxupdate utility where we can then apply the latest ESXi 4.1 .vib files as an update to our 4.0 installation.
Enable SSH access to your ESXi 4.0 ServerIf you already have this setup, just skip to the next step. If you need to know how to do this, here's how in a quick way.
An aside about PuTTY: I highly recommend downloading and installing PuTTY for an SSH client. This tool will come in very handy, as it makes it really easy to cut/copy/paste text from your desktop machine to the ESXi command-line. And, since we are going to have some rather lengthy commands coming up, this feature alone is worth having a nice SSH client.
Another aside: enabling SSH on ESXi 4.1 (i.e., after we upgrade) is cake. More discussion below.
From your ESXi Server Console, get to the "command line":
You can get to the command-line as follows: use the keyboard and press ALT-F1, then type "unsupported" without quotes, and you will not see this being typed... then, when prompted, enter the root password for your ESXi server.
NOTE: at any time, you can press ALT-F2, or type "exit" followed by
Now, edit the /etc/inetd.conf file to enable SSH. The "vi" editor is available at the ESXi command-line level, so what you want to do is:
- vi
(this will start the VI editor) - find and uncomment SSH lines (i.e., remove the # sign at front of line(s))
- :qw (this keystroke-combo writes changes to disk and exits)
- or :q! (exit, no changes saved -- in case you mess up something and just want to start over)
OK, you should now have the correct /etc/inetd.conf file settings to enable SSH, but in ESXi 4.0 you need to essentially restart some stuff to get that setting-change to "take". So, enable SSH on ESXi, as follows, from the command-line in ESXi console... (this is cake in ESXi 4.1 (see below), but prior to that upgrade, you need to do this manually.
- ps | grep inetd
- kill -1 <the-PID-as-shown-in-our-ps-grep-command>
- and/or: sbin/services.sh restart (try this if SSH not running after above two steps)
OK, that should make SSH available to your SSH-Client (e.g., PuTTY), so you can connect from your Windows desktop computer to the ESXi Server and have nice GUI command-line window to ESXi 4.0's command-line. When you connect with PuTTY, you will need to "login", so keep that root password handy. The only notable PuTTY settings I entered were to use port 22 (on connection/data screen) and to use root for autologin information.
Transfer the files to your ESXi Datastore:
Here is how I went about this...
Place those 3 files (.vib) that we extracted earlier in a location that you can reach, via an HTTP URL, from the ESXi command-line when we use WGET in upcoming step. Those files were:
- vmware-esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib
- vmware-esx-firmware-4.1.0-0.0.260247.i386.vib
- vmware-esx-tools-light-4.1.0-0.0.260247.i386.vib
I was able to use my networked QNAP NAS appliance for temporarily "hosting" those 3 files on in a directory that would be accessible via HTTP/wget. I simply placed the files in my QNAP appliance's QWeb directory and temporarily enabled the NAS appliance web-server via QNAP Admin. Hopefully you have somewhere equally simple to place those 3 files where you can "retrieve" them to the ESXi server via wget.
wget the files (over HTTP) to the ESXi 4.0 Host
We are performing these steps from our ESXi 4.0 command-line; in particular, I did this through the PuTTY SSH client terminal-window that gave me access to the ESXi command-line from my Windows desktop. Do these steps:
We are performing these steps from our ESXi 4.0 command-line; in particular, I did this through the PuTTY SSH client terminal-window that gave me access to the ESXi command-line from my Windows desktop. Do these steps:
- cd /vmfs/volumes/YOUR-DATASTORE-DIR-HERE
- wget http://YOUR-WEB-SERVER-WITH-VIB-FILES-ADDRESS-HERE/vmware-esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib
- repeat wget for other two VIB files
- cd /
Step 3: Applying VIB files to your ESXi Server
esxupdate -b /vmfs/volumes/DATASTORE/vmware-esx-firmware-4.1.0-0.0.260247.i386.vib -b /vmfs/volumes/DATASTORE/vmware-esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib -b /vmfs/volumes/DATASTORE/vmware-esx-tools-light-4.1.0-0.0.260247.i386.vib stage
esxupdate -b /vmfs/volumes/DATASTORE/vmware-esx-firmware-4.1.0-0.0.260247.i386.vib -b /vmfs/volumes/DATASTORE/vmware-esx-esxupdate-esxi-4.1.0-0.0.260247.i386.vib -b /vmfs/volumes/DATASTORE/vmware-esx-tools-light-4.1.0-0.0.260247.i386.vib update
There are really just two commands you will need to execute (well, one that matters; the first one is a "test run" that does not apply the updates - it just "tests" them).
You will want to do this at the ESXi command-prompt, and through your PuTTY SSH client or such (for easy cut/paste of command). Replace "DATASTORE" with the exact directory-name of your particular datastore where you placed those VIB files earlier (i.e., the value of YOUR-DATASTORE-DIR-HERE in prior step where we used wget to transfer the VIB files to your datastore):
THAT TESTS IT... notice the "stage" directive at the end of the line... we are "staging", or "testing" the packages essentially. If all looks fine after that comment, this NEXT COMMAND REALLY DOES the upgrade (aka, "update"):
ALL RIGHT, you should now have updated ESXi 4.0 to ESXi 4.1 (well, after your server is done applying that stuff, and rebooting -- allow a few minutes for the update command, and then time to reboot after all that).
Step 4: Update viClient to Version 4.1
This part is rather simple. You should have download (in first step) the file: VMware-viclient-all-4.1.0-258902.exe
Just run that executable and update your client machine(s) to have the latest VMware viClient 4.1
Connect to your newly updated ESXi 4.1 host machine now with that viClient 4.1 GUI, and proceed...
Step 5: Re-Enable SSH on ESXi 4.1 Server
IF YOU WANT SSH enabled after updating to 4.1, you will find that the /etc/inetd.conf file on ESXi has reverted to not allowing SSH. But, with ESXi 4.1, enabling ssh is really simple from the vSphere 4.1 client.
FROM HOST management-GUI (viClient)
> Configuration
> Security profile - Services, Properties... (in upper-right-corner in blue)
> Remote Tech Support (SSH) ; daemon will show "Stopped" by default
> Options... (button in lower left)
> Choose a Startup-Policy type with radio-button (e.g., "Start automatically", then click the Service-Commands button below labeled “Start”, followed by the "OK" button.
Works instantly! That sure is preferred to having to manually edit the initd.conf file!
Step 6: Cleanup Install Files and Wrap-Up
You should be able to safely remove the .vib FILES from your datastore when all is done, and likewise you can remove them from your web-server or wherever you pulled them over to ESXi from.
That should do it!
I hope this goes as smoothly for you as it did for me.
I had to figure out this stuff, but once I got over the fact that there was no ESXi 4.0 to 4.1 upgrade GUI tool (like 4.0 offered), I just dealt with it and went to the command-line and such. You can too, and best wishes!
6 comments:
Great article!
Bro, you saved me all kinds of time with this post. Thanks!!
Hello friend.
Do you know if custom oem.tgz files persist through upgrades?
--
Regards.
dabb
Anonymous,
For anyone else reading this: the oem.tgz is a file used by ESXi to customize an ESXi installation.
Now, with regards to your question about whether the file persists through upgrades, I am not sure how to answer. The file is usually placed on your install-media. But, what I think you are trying to get at is whether the customizations you made to ESXi v4.0 (by using the oem.tgz files) remain in-effect after upgrading from ESXi 4.0 to 4.1 - right?
Well, the fact is I just do not know since I used the default install, BUT if I were to make an educated guess, I would say that there is a fair chance your customizations would remain in effect *unless* VMware included some new driver(s) (i.e., support for new hardware) in the v4.1 version that were not previously in the v4.0. But, I am only guessing. Sorry I can not help more on this one.
The only thing I did differently was upload the vib files through the vsphere client but this article save me tons of time
Perfect! thank you. Also, I copied the files via vSphere Client; very simple.
Post a Comment