VMware Cloud Community
uswbnc53
Enthusiast
Enthusiast

Not Able to Export to OVF

Not sure if I'm not getting the syntax correct, but I am attempting to export a vm in OVF format directly from a ESXi 4.1 host.

I have tried several different commands, but all have failed.

Any help with the Syntax to export the OVF directly from a Host would be greatly apprecaited.

ovftool --compress=9 "vi://host1/ha-datacenter/3PAR-LUN6/server1" "Z:\server1.ovf"

ovftool --compress=9  "vi://host1/DC1/3PAR-LUN6/server1/server1.vmx" "Z:\server1.ovf"

ovftool --compress=9  "https://host1/DC1/server1/server1.vmx" "Z:\server1.ovf"

0 Kudos
5 Replies
mrksiddiqui
Enthusiast
Enthusiast

Try this syntax:

ovftool "vi://<username>:<pass>@<server>/ha-datacenter?ds=\[datastore\] vm/vm.vmx" <local path>

http://www.vmware.com/support/developer/ovf/ovf21/ovftool-210-userguide.pdf

If you find this helpful please consider awarding points.

If this helps answer your question please consider awarding points!
0 Kudos
Amtul
Contributor
Contributor

I'm also trying to export an ovf, mine is standalone to esxi 5 host and I'm trying to export a vm to ovf file. I use the following command

ovftool "vi://root@<server>/ha-datacenter?ds=\datastore1\vm/vm.vmx" /export/vm.ovf

and I get prompted for password, once I enter the password, I get this error.

"Opening VI source : vi://root@server/ha-datacenter

"Error: locater does not refer to an object: vi://server/ha-datacenter?ds=\datastore1\vm/vm.vmx "

Can anyone please help me... eventhoug mine is a standalone esxi do I still have to use "vi" or can I use the following

ovftool root@server/vmfs/volumes/datastore1/vm/vm.vmx /export/vm/vm.ovf

thanks,

0 Kudos
mrksiddiqui
Enthusiast
Enthusiast

Let's make it simple:

ovftool "vi://VcenterServerName/DataCenterName/vm/VmName" "local Export path"

vi: is the path you would have to know. In my case it is simple

U:\>ovftool "vi:// VcenterName/ DataCenter /vm/ vm19 "
Please enter login information for source vi://VcenterName/
Username: ************
Password: ***********
Opening VI source: vi://username@ VcenterName / DataCenter /vm/vm19
OVF version:   1.0
Name:          vm19
Annotation:  THIS NEEDS TO BE REBUILD
Download Size:     Unknown
Deployment Sizes:
  Flat disks:    129.00 GB
  Sparse disks:   Unknown
Networks:
  Name:        VM Network
  Description: The VM Network network
Virtual Hardware:
  Family:       vmx-07
  Disk Types:   SCSI-lsilogicsas
Completed successfully
U:\>ovftool "vi://VcenterName/DataCenter/vm/vm19" F:\ vm19 .ovf
Please enter login information for source vi://VcenterName/
Username: ****************
Password: ****************
Opening VI source: vi://username@VcenterName/DataCenter/vm/vm19
Opening OVF target: F:\vm19.ovf
Writing OVF package: F:\vm19.ovf
Disk progress: 1%
If this helps answer your question please consider awarding points!
0 Kudos
mrksiddiqui
Enthusiast
Enthusiast

In case you only have ESXi host here is how you do it

U:\>ovftool "vi://xxx.xxx.xxx.xxx/vm19" F:\vm19.ovf
Please enter login information for source vi:// xxx.xxx.xxx.xxx /
Username: root
Password:
Opening VI source: vi://root@ xxx.xxx.xxx.xxx /vm19
Opening OVF target: F:\vm19.ovf
Writing OVF package: F:\vm19.ovf
Disk progress: 0%

I was get error with host could not be resolved when appending VM name so I used IP instead.

If this helps answer your question please consider awarding points!
0 Kudos
Amtul
Contributor
Contributor

thanks a lot for you input.

I figured it out as soon as I posted the question... I started off by the ip address and then the vm name and I was able to export the vm to an ovf.

Thanks again.

0 Kudos