I give; I have spent too long attempting to find the magic decoder ring to get ovftool to do what I expect to be a very basic use case.
My vCenter server is win2k8 R2 node, my host node is RHEL6.3, and my guest in this case is CentOS6.3.
The vCenter server FQDN is vsphere2.foo.com.
The ESX host is las13.foo.com.
The guest is qavm1.foo.com
The Datacenter name is screwy, but appears to be passable with URI character replacements. The name is "Foo / Bar Network" so I have been using "Foo %2f Bar Network" and quoting any URL string to deal with the spaces.
Examining the Datacenter layout in vCenter client, the path to the vm from which I want to create an OVA is
Foo / Bar Network/QA Guy/las13.foo.com/qavm1
attempting to use ovftool from either the Win2k8 server or my RHEL6.4 development machine results in the same errors. I have perturbed the syntax of options and paths in so many ways I don't want to list them all here, but the end result is always an incorrect reference or missing object.
Might I grovel for the proper syntax to store a VM guest as an OVA?
Yes...I have devoured the manual mutiple times over...RTFM is my first tenet
Thank you all!
[root@qavm34 tmp]# ovftool --sourcetype=vmx "vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com"
Error: Unknown option: 'sourcetype'
Completed with errors
[root@qavm34 tmp]# ovftool --sourceType=vmx "vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com"
Error: Failed to open file: vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com
[root@qavm34 tmp]# ovftool --sourceType=vmx "vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com/qavm1"
Error: Failed to open file: vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com/qavm1
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com/qavm1"
Please enter login information for source vi://vsphere2.foo.com/
Username: administrator
Password: **********
Error: Locator does not refer to an object: vi://administrator@vsphere2.foo.com:443/Foo / Bar Network/host/las13.foo.com/qavm1
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com"
Please enter login information for source vi://vsphere2.foo.com/
Username: administrator
Password: *********
Error: Locator does not refer to an object: vi://administrator@vsphere2.foo.com:443/Foo / Bar Network/host/las13.foo.com
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network/host/"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo / Bar Network/host/
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network/host"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo / Bar Network/host
[root@qavm34 tmp]#
[root@qavm34 tmp]#
[root@qavm34 tmp]#
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Found wrong kind of object (Datacenter). Possible completions are:
vm/
host/
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network/vm/qavm1"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo / Bar Network/vm/qavm1
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network/vm/QA Guy/qavm1"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo / Bar Network/vm/QA Guy/qavm1
[root@qavm34 tmp]# ovftool --sourceType=VI "vi://Administrator@vsphere2.foo.com?moref=vim.vm.VirtualMachine:qavm1"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Invalid object type specified (not a ManagedEntity subtype)
[root@qavm34 tmp]# ovftool "vi://Administrator@vsphere2.foo.com?moref=vim.vm.VirtualMachine:qavm1"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Invalid object type specified (not a ManagedEntity subtype)
[root@qavm34 tmp]# ovftool "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network/host/las13.foo.com"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo / Bar Network/host/las13.foo.com
[root@qavm34 tmp]# ovftool "vi://Administrator@vsphere2.foo.com/Foo %2f Bar Network?ds=[EqualLogic] qavm1/qavm1.vmx"
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: *********
Please enter login information for source vi://vsphere2.foo.com/
Username: Administrator
Password: **********
Error: Locator does not refer to an object: vi://Administrator@vsphere2.foo.com:443/Foo %2f Bar Network?ds=[EqualLogic]%20qavm1/qavm1.vmx
[root@qavm34 tmp]# ovftool --version
VMware ovftool 3.0.1 (build-801290)
[root@qavm34 tmp]#