[Fixed] vSphere 5.1 cannot login with domain account after changing domain controller

We changed our domain controllers of our company these days. Of course, we did that by SOP:

  1. use dcpromo to promote new servers as domain controllers;
  2. migrate PDC and other critical roles to the new domain controllers;
  3. use dcpromo to depromote the old domain controllers.

After these steps, all Windows servers works great.

But we can use neither vSphere Client nor vSphere Web Client to login vCenter with a domain account any more.

 

By asking VMware support, we realize we have to adjust Single Sign On for this change.

Steps:

  1. Open vSphere Web Client, using admin@system-Domain to login;
  2. Select Sign-On and Discovery – Configuration from the left panel;
  3. You will the a record related to your domain on the right;
  4. Select the record and make a screen capture of all information;
    (You cannot edit it directly, cos it won’t save successfully.)
  5. Delete that record and create a new one, with the same setting and new LDAP address;
    (For Authentication Type, the existed one may set to Reuse Session, but you have to change it Password and leave an account with password below. I don’t know the reason.)
  6. Save it.

All done.

 

Use MBR disk in ESXi 5

From ESXi 5.0, if you install ESXi to a empty hard disk, the target disk will be prepared with GPT-based partitions. That may cause some boot delay or even boot problem in some desktop motherboards.
Fortunately, you can use MBR mode instead of GPT.

Step:
1 Make a clean hard disk for ESXi. You can use any method to delete all partitions on that disk.
2 Boot with ESXi CD. During initial installation step, press Shift-O (letter, not number zero) when prompted (right down corner).
3 Type a space and “formatwithmbr” (without quotation marks). Press enter.
4 Go on setup. ESXi will make the target disk prepared with MBR-based partitions instead of GPT.

 

Normal Steps for Minimal Setup CentOS 6 on ESXi

1 Create a new VM as you wish. Install CentOS6 with minimal configuration. After installation, shutdown the VM.

shutdown –h now

2 Add a new E1000 network interface card (eth1 in this article, if not, change all related steps below).

3 Boot and login.

4 Setup a temporary network:

ifconfig eth1 <temporary ip> netmask <netmask> up
route add default gw <gateway>

  • if HTTP proxy is required: edit the yum configuration file.

vi /etc/yum.conf

and add these lines:

# The proxy server – proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty

  • if HTTP proxy is NOT required: edit DNS configuration file. See step 13.
  • if Route is required: edit route configuration file. See step 14.

5 Install perl, and update system.

yum install perl
yum update

6 Shutdown.

shutdown –h now

7 Remove the E1000 network interface card, which was inserted in step 2.

8 Boot and login.

9 Insert VMware Tools CD.

10 Install VMware Tools, and reboot. (NOTE: you may need to do this step every time after system update)

cd /
mount /dev/cdrom /media
tar –zvxf /media/VM*
cd vmware-tools-distrib/
./vmware-install.pl

follow the instructions on your screen.

umount /media
reboot

11 Wait for reboot and login.

12 Setup eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0

and add these lines:

ONBOOT=yes

  • if DHCP is enabled:

BOOTPROTO=dhcp

  • if static IP is preferred:

IPADDR=<IP>
NETMASK=255.255.255.0
BOOTPROTO=none

13 Setup DNS.

vi /etc/resolv.conf

and add these lines:

nameserver <1st DNS IP>
nameserver <2nd DNS IP>
domain <domain name> #your domain name, optional

14 Setup route.

vi /etc/sysconfig/network

and add these lines:

NETWORKING=yes
HOSTNAME=<value>
GATEWAY=<Gateway IP>
GATEWAYDEV=eth0

15 Reboot.

reboot

16 Disable SELINUX if you don’t like it.

vi /etc/sysconfig/selinux

find the line start with SELINUX=, and set it to disabled.

SELINUX=disabled

Important steps to do while upgrading from vSphere 4.1 to 5

1 Backup your vCenter database.

2 Uninstall all vSphere client and plugins. If VUM plugin cannot be uninstall successfully, check this.

3 Upgrade vCenter / VUM software.

4 If you have changed your database before upgrading, vCenter installer maybe setup a SqlServer 2008R2 Express but never used. You can follow this step to change the service dependence and uninstall this instance of SqlServer. Warning: Make sure the instance is truly useless before you uninstall it.

5 Install a vSphere client and a VUM plugin.

6 Open vSphere client, go to Home – Solutions and Applications – Update Manager, ESXi Images tab.

7 Click Import ESXi Image, upload the ESXi 5.0 installation ISO file.

8 Go to Baselines and Groups tab, create a new baseline for hosts with type Host Upgrade.

9 Go to Home – Inventory – Hosts and Clusters, select the cluster or esxi hypervisor, Update Manager tab.

10 Click Attach, to link your selected hypervisors with new created baseline.

11 Scan.

12 Put some of hypervisors into maintenance mode.

13 Important: go to Conguration tab – Software – Security Profile, disable the Lockdown Mode. Or, HA agants will be unable to upgrade.

14 Remediate (context menu item of hypervisor) with Upgrade baseline, select the remove 3rd drivers checkbox.

15 The progress will stay at 22% for more than 5 minutes. You will be notified to press Enter to restart by hypervisor console, not vSphere client. After you press Enter, the CDROM tray will be ejected. You have to close it manually. That is funny, right?

16 Exit maintenance mode.

17 Re-enable the Lockdown Mode.

18 Upgrade license if you need.

19 Upgrade all vm-tools.

20 Upgrade distributed network switches.

21 Upgrade VMFS (terrible). I suggest you to delete and re-create the datastore one by one, by using Storage vMotion moving. It will cost several days.

Fix the ESXi not responding problem

Situation:

A “not responding” are displayed after all esxi hypervisor shown in vsphere client which linked to the vcenter. Right click any of the esxi and select “Connect” will bring it back. But after a short while, no more than 90 secs, it will be back to not responding status.

Solution:

1 In vShpere client, open menu “Administration” — “vCenter Server Settings”, click “Runtime Settings” from the left panel, make sure that all IP and server name are correct. If not, re-enter it. Close and reopen your vSphere client — This is important.

2 Try to ping from your vCenter, not the vSphere client, to each of esxi hypervisors.

3 If you are using Windows Server 2008/R2 or any OS with firewall for vCenter, you need to add or change some firewall rules:

change:

Enable the “File and Printer Sharing (Echo Request – ICMPv4-In)”

Enable the “File and Printer Sharing (Echo Request – ICMPv6-In)”

Add a rule to allow TCP 903 income for ESXi heartbeat.

Add a rule to allow UDP 902 income for ESXi heartbeat.

4 Try to reconnect all ESXi hypervisors.

 

If the problem still exists, you have to google it again.