Datastore Copy and VMotion Errors in Virtual Center VC – Mindwatering Incorporated

Datastore Copy and VMotion Errors in Virtual Center VC – Mindwatering Incorporated.

 

Datastore Copy and VMotion Errors in Virtual Center (VC)
Mindwatering Incorporated
Tripp W Black on 27.04.2010 at 14:56

Category: VMWare
Host Configuration

Issue:
You want to manually copy a file (or VM’s files) from one datastore to another. Every time you initialize a transfer, you wait about 30 seconds and get an error:
You can do anything local you want on the server’s local datastores, you just cannot transfer anything to or from them. In other words, anything with VMotion or datastore copying returns with “Cannot connect to host“.

Solutions:
Since you can do anything locally on the datastore, this rules out connectivity (network) and obviously the host is up and the network and management agents are both running.
That leaves the question, “Did you recently change your ESXi host’s IP address without a “Reset to Factory Defaults”?
If so, you have to update a file manually for the management agents.
(This is still true in 3.5.x and vSphere 4 for ESX also when changed in Virtual Center. For ESXi, we see this if we change it on the host, too. The only time we don’t see it is moving from DHCP to static..)

PART A: Confirm the Problem
To confirm, look at the /etc/opt/vmware/vpxa.cfg file on the host in the console.
# cat /etc/opt/vmware/vpxa/vpxa.cfg

Inside the <vpxa> and </vpxa> tags, will be a <hostIp> tag. The tag probably shows the old IP. If it shows the old IP, then you’ve found the cause.

Note: For ESXi, you need the hidden console instructions for this. They are at the bottom of these notes.

PART B: Remove the Host from VC and Re-add
Here are the steps:
1. Disconnect the host from VC.
– Select the host, right-click and choose Disconnect.
(We do this to clear data.)

2. Restart the management agents:
ESXi: On the host, click the Customize System <F2> option. Login and choose the Restart Management Agents option.
(Be careful not to click “Reset to Factory Defaults”. That is right below this option.)

ESX: In the console type;
service vmware-vpxa stop
and then
service vmware-vpxa start

3. Disconnect and remove the host from VC.
– Select the host, right-click and choose “Disconnect“.
– Select the italic/grayed-out again, and this time, select “Remove“. Confirm the choice. (Yes, you will lose your historical statistics doing this.)

4. Log into the console on the host and kill/backup the current vpxa.cfg file.
# mv /etc/opt/vmware/vpxa/vpxa.cfg /etc/opt/vmware/vpxa/vpxa.zoldcfg
(The above command backups the old file to a new one called vpxa.zoldcfg. Reconnecting the host will create a new file. This file is not needed. It’s for “just in case”.)

5. Add the Host Back to VC.
Right click the data center, choose Add Host….
Proceed through the wizard, enter the host’s FQDN along with it’s root id and password. Follow the prompts to add it to the data center.

6. Confirm the IP Is Now Correct and Perform Side/Ancillary Tasks.
– At this point you might discover your VMs are “orphaned”. If so, we fixed this by removing the orphaned VMs from inventory and re-adding them via the Datastore browser.
– To confirm that the IP is correct, you can view the vpxa.cfg file again, or simply just copy a file from a local datastore to network one and the other way.
– If it didn’t work, you probably didn’t delete/move/backup the vpxa.cfg file before removing and adding the host.

ESXi Hidden Console Instructions:

Enter the hidden console:
1. Viewing the host’s status screen, hold down <ALT> and click <F1>. You will see a black screen with the server’s version.
2. Type the word unsupported. (There is no prompt, you just type this into “nothing”.)
3. Enter the server’s root password and hit the <ENTER> key.

To leave the hidden console:
1. hold down <ALT> and click <F2>.