VMware Cloud Community
sosadmin
Contributor
Contributor

Could not look up host [username]. Proper password, but will not convert

Hey all. I know I am using proper syntax, but it seems like there's a missing service running on my esx cluster. I am able to log in with vSphere, but cannot use ovftool to export a stopped server in my ESX 4.0 cluster environment.

command I am using:

ovftool vi://[username]:[password]@vi://192.168.77.111/[serverid] d:\[serveridoutput].ovf

the error I am receiving is as follows:

Error: Could not lookup host: [username]

Completed with errors

Now it's interesting because the server does seem to know that I am using a proper user/pass because if I make a mistake on the password, I am given another chance to log in, until I miss three tries. If I enter the correct password, it seems to almost connect, then fails out with the above error. I would *REALLY* appreciate some help with this guys.

Thanks in advance!

5 Replies
jceresini
Contributor
Contributor

Were you able to get this sorted out? I'm running into the same issue, and a quick search only seems to return this 1 thread.

ovftool --noImageFiles "vi://user:pass@server/datacenter?ds=[datastore] vm-path" test.ovf

I'm using ovftool 3.0.1 on Windows 7 64bit.

0 Kudos
sosadmin
Contributor
Contributor

Actually, yeah. I did solve it, but it was ugly.

Instead of using an ovftool or "export" from vSphere client, I had to actually ssh in to the ESX server and scp the .vmdk files to a local computer. From that point, I used the ovf conversion tool to convert the images.

Finding the LUN is kind of difficult, and I created a simlink from the root directory instead of having to type out the giant hash for the directory structure. The file structure looks something like this:

/vmfs/volumes/[gigantic hash key associated to simlink]/[server name]/*

I wish I could have gone back in time and told myself this answer way earlier. It would have saved me almost two weeks. I am happy I can help you.

0 Kudos
jceresini
Contributor
Contributor

Thank you for the quick reply. I'm looking to script a method to copy templates between different vcenter servers, so I was hoping I could do all of the heavy lifting with the ovftool.

I did some further troubleshooting and I think I got it working in my case. First thing I did was add my username to my hosts file with a bogus IP address. As a result the ovftool no longer complained about resolving it, and returned another error message:

Error: Cannot parse locator: vi://user:pass@server...

I googled around for that and found http://communities.vmware.com/thread/397852

I saw there was talk about special characters in the password, particularly "#". I was also using an AD user so my username was in the form "domain\user"

I created a local user on the vsphere server, with a strictly alpha-numeric password, and granted it the role of "OVFTool" (this appears to be a pre-defined role, but I'm not certain).

I then tested and it works perfectly.

I believe the ovftool just has trouble parsing the vsphere locator (vi://user:pass@server....) if the user or password have certain special characters. I didn't spend time trying to escape characters, or trying to narrow down which characters worked, but an alphanumeric password is perfectly fine for the application I'm using it for.

0 Kudos
ecapuano515
Contributor
Contributor

Sorry to resurrect this ancient post, but I can confirm this to be correct.

Changing the password to one without special characters immediately resolved this for me.

sureshviswanat1
Contributor
Contributor

Thanks for this post, i too had issues when special char is used in password, revised to a new one fixed the issue Thanks

0 Kudos