Here we are. The forth part of Using ESXi to replace ESX. Somehow I start to have feeling I’m not just updating my blog but also I’m writing a book? This ESXi series is getting longer and longer. But there are still much more to talk about if we want to use ESXi to replace ESX in the production.
This post is about how to configure ESXi host. I’m not going to discuss about same stuff you can do on ESX. What I’m discussing here is how to initialize and setup your ESXi so you won’t have further troubles in the future. As what I always said, I may make mistakes, please feel free to leave comments. Thanks
At the end of last post, I was showing everyone this picture.
This is default result after you finish installation on your host. This interface called DCUI.
Direct Console User Interface (DCUI) — the low-level configuration and management interface, accessible through the console of the server, used primarily for initial basic configuration.
Please consider DCUI as lower level which means it’s more like backdoor of ESXi which allows you by pass any other security mechanism. You can use DCUI to setup root password and manage your ESX box. There are couple of things I would like to point out within DCUI.
Default root password is empty. Using DCUI to setup one ASAP.
The only way to setup ESXi initially is to use DCUI since ESXi box doesn’t have IP, root password is empty and SSH or other protocol is disabled in default. All what you need to do is to assign nic to management network.
Careful plan with your management network
Unlike ESX installation which will give you choice to choose which nic will be vmnic0, you don’t have choose in ESXi. Meaning, you better make sure all ESXi HOSTs are using same Hardward otherwise, you may have some issues on choose right nic and plug right nics to right switch ports.
Do not try to setup secondary gateway in you vCenter it will bring your Service Console offline.ESXi doesn’t have Service Console meaning you can’t setup 2 different gateway for your vmotion network and management network (in ESXi, we call it Management Network) or iSCSI. Considering Management Network as normal network which can have multiple network cards but only one gateway is allowed. The solution for this is to use esxcfg-route to setup multiple routing in your ESXi just like normal Windows.
esxcfg-route –h to get all command parameters
esxcfg-route -l to see the current list
Use DCUI to clean up wrong assigned NICs if you made mistake.
1. Go to the ESXi console and press alt+F1
2. Type: unsupported
3. Enter the root password(No prompt, typing is blindly)
4. At the prompt type “vi /etc/inetd.conf”
5. Look for the line that starts with “#ssh” (you can search with pressing “/”)
6. Remove the “#” (press the “x” if the cursor is on the character)
7. Save “/etc/inetd.conf” by typing “:wq!”
8. Restart the management service “/sbin/services.sh restart”
10 – Kill inetd : kill `ps | grep inetd | cut -f2 -d” “‘
11 – Start inetd: inetd
Yes, that’s actually enabled by default, believe or not. If you press Alt+F1 at Console, and type “unsupported”, you will get chance to type in password so you can login and run some commands. There are too much discussion about this on the Internet. so I don’t need to explain too much.
You need make sure that check box is selected to get this function.
If you read my previous post, you would know ESXi automatically create 4GB scratch partition. This partition is to use to store vmware upgrade file or other temp files and even log files. You need to make sure the space of that partition is big enough. Double check the path in this column. If it’s necessary, feel free to move local storage.
Syslog local path and remote syslog server
The funny thing about log is it is setup as in normal verbose by default. But verbose log won’t help you at all when your server crash. You pick up phone to ring Vmware support and they ask you to export your log and tell you that your log isn’t detail enough to give whatever they want. So you have to come back and setup to different level and wait for disaster happening again.
Also, you can move your log files to another location and setup remote log server at same time. I will discuss it in future post. Feel free to move logs location to local storage in VMFS.
Backup and Restore ESXi configuration
Warning: Please be cautious when you backup and restore your data. You have to make sure no VMs (on/off doesn’t matter) not sitting on this ESXi HOST. Otherwise, there will be orphaned VMS from Local Host database meaning that some inconsistent vms will become orphan from VC.
Solution for this one is to remove orphan VM from VC and reimport it from storage.
(This picture shows how to backup. But you have to connect to right host first).
With this new version of ESXi, you can backup your ESXi data into a single file from vMA(please refer to my previous post). Then,you can schedule to backup daily. The content of backup is not txt format. It is not only including network configuration, special settings on Advanced Settings, it also includes all registered VMs information as well. Therefore, when you restore your ESXi configuration, you will encounter orphan VMs.
(This picture shows how to restore and you have to type “yes” to continue, reboot after that)
You have to face with it when you restore your configuration. Clean up duplicate orphan VMs. That’s all.
To be continued……..