When I try to export one of my VMs using File/Export/Export OVF Template....it crashes vSphere with a nice assertion window.
To see what the cause of this is, I decided to try using ovftool 2.1.0 on Linux to export the VM instead, to see what happens (like does it crash ovftool?).
I got stuck though because when I log into the vCenter I have to specify a domain\username format and I can't figure out how to pass this to ovftool in a way that doesn't cause errors.
For example, I tried things like this:
# ovftool vi://myvcenter.domain.com/DataCenterName/vm/
Username: MYDOMAIN\Administrator
Password: whatever
Didn't work, I don't think it likes the backslash.
So I tried stuffing it in a variable:
# DF="MYDOMAIN\Administrator"
# ovftool vi://"$DF"@myvcenter.domain.com/DataCenterName/vm/
Error: Curl error: Couldn't connect to server
Anyone have any ideas?
Thanks,
CJ
please take a look at this post it explains what you need to do
http://communities.vmware.com/thread/332419?tstart=30
eske
try this:
ovftool vi://<user>:<password>@myvcenter.domain.com/<DataCenterName>/vm/
That doesn't work because it looks like this:
# ovftool vi://NTDOMAIN\Administrator:MyCoolPassword@myvcenter.domain.com/DataCenterName/vm/
If you change \ to \\
# ovftool vi://NTDOMAIN\\Administrator:MyCoolPassword@myvcenter.domain.com/DataCenterName/vm/
then you get the same error (curl error->Error: Curl error: Couldn't connect to server).
CJ
Okay, I am very new to the tool, but trying to help.
The "Administrator" user is a domain account in this case?
Do you have to supply the domain? have you tried without the domain:
# ovftool vi://Administrator:<password>@vCenter.domain.com/...
This vCenter is Active Directory only.
CJ
please take a look at this post it explains what you need to do
http://communities.vmware.com/thread/332419?tstart=30
eske
Thanks. that's it.
Something to add to the manual?
Cheers,
CJ
Yes, I have it as a todo/bug to next version of ovftool. I asked Matt to put it on the forum just in case someone else was having the same problem
eske
Much appreciated. My KB search turned up lots of other interesting stuff. Not that though I did learn about some other things in the process though
CJ
Gosh, that's some omission from the OVF Tool User Guide. :smileyblush:
So in summary you need to specify your domain account in the format <domain>%5c<account> instead of <domain>\<account>
Here's an example to export to OVF format a VM called MyVM when you need domain authentication to your vCenter server: [This was run on a Windows client]
ovftool vi://mydomain%5cMyVMAdmin:MyPassword@MyvCenterServer.mydomain.com/MyDatacenter/vm/MyVM c:\MyOVF.ovf
And if you omit the "mydomain%5cMyVMAdmin:MyPassword@" section you will still need to use the <domain>%5c<account> format when prompted for your credentials otherwise you will get the Curl error:
C:\Program Files\VMware\VMware OVF Tool>ovftool vi://MyvCenterServer.mydomain.com/MyDatacenter/vm/MyVM c:\MyOVF.ovf
Please enter login information for source vi://MyvCenterServer.mydomain.com/
Username: mydomain\MyVMAdmin
Password: *********
Error: Curl error: Couldn't resolve host name
C:\Program Files\VMware\VMware OVF Tool>ovftool vi://MyvCenterServer.mydomain.com/MyDatacenter/vm/MyVM c:\MyOVF.ovf
Please enter login information for source vi://MyvCenterServer.mydomain.com/
Username: mydomain%5cMyVMAdmin
Password: *********
Opening VI source: vi://mydomain ☺MyVMAdmin@MyvCenterServer.mydomain.com:443/MyDatacenter/vm/MyVM
Opening OVF target: c:\MyOVF.ovf
Writing OVF package: c:\MyOVF.ovf
Disk progress: 12%
And....... as a side note with the above example it will export the VM to the "C:\Program Files\VMware\VMware OVF Tool" directoy instead of to the C:\ directory. Come on VMware, you're better than that.
This doesn't seem to work with ovftool version 4.2.0. on 64-bit Windows 10.
When I try any credential, I see an error saying
Error: Could not lookup host: <the username I typed>