vSphere 5.x does not allow operations to be performed directly on an ESX host managed by a virtual center. This error is given while connected directly to an ESXi server with vSphere client, attempting to resize a virtual disk on a VM (to add more capacity). However as this ESXi server and its virtual machines was managed by vCenter server, it would not let me modify its "resource settings" i.e. its disk size. There is a way to remove the host from thinking it was connected to vCenter. This is probably not supported by VMware and I do not support it but it works.
1. Connect to the ESXi server either on the console or via SSH
2. Edit /etc/vmware/vpxa/vpxa.cfg
Remove the whole vpxa section including <vpxa> and </vpxa> "d"
<vpxa> <bundleVersion>1000000</bundleVersion> <datastorePrincipal>root</datastorePrincipal> <hostIp>18.104.22.168</hostIp> <hostKey>52e16e0d-07e4-366e-7bf6-73279af3c8f0</hostKey> <hostPort>443</hostPort> <licenseExpiryNotificationThreshold>15</licenseExpiryNotificationThreshold> <memoryCheckerTimeInSecs>30</memoryCheckerTimeInSecs> <serverIp>22.214.171.124</serverIp> <serverPort>902</serverPort> </vpxa>
Save it ":wq!!
3. Restart the services
4. Connect back to the ESXi server with vSphere client and it should now let you make the changes
Note: I would very much assume at this point if the host was managed by vCenter you will have to disconnect and reconnect the host to push out the VPXA agent and config, otherwise you wont be able to manage the host via vCenter.
As it happens the ESXi server I had this issue with was no longer managed by vCenter server as someone has rebuilt vCenter, but had not removed this host from vCenter before doing so.
Before I did a fresh install of vCenter,I want to add some more disk to the vCenter VM. This had to be done directly connected to the host, as the vCenter it no longer existed!
While its not very often that would happen, I can see other issues very similar. Say for example the vCenter server ran out of space because of SQL logs, hence the SQL and/or vCenter service might not start. In that case you would want to quickly as more disk space to the VM and get vCenter back up, but you would have to resort to the above.