VMware Cloud Community
huyikang
Contributor
Contributor

How to export a vm to ova file on ESXI6.5 with SSH command?

How to export a vm to ova file on ESXI6.5 with SSH command? I wanna use the ssh tool to export a vm to an ova file, how can i do?

0 Kudos
6 Replies
JagadeeshDev
Hot Shot
Hot Shot

Hi

The recommended way of exporting the VM to ova is GUI ( webclient ) or through any automation tools.

I do not think we have an option to export the VM as OVA unless copying the VM files to different datastore, mount as a new vm at destination host .

Thanks

JD

http://www.myitblog.in/
0 Kudos
SureshKumarMuth
Commander
Commander

Thwre is a tool called ovftool available for download, which has multiple options to export a vm as ovf/ova. Please refer the following link for doc related to ovftool

OVF Tool Documentation

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
vbroc
Contributor
Contributor

Can you please tell us what problem you are trying to solve? Is their a self imposed requirement to utilize SSH, or is it really all you have? 

As mentioned, unless you want to manually build the OVA from the VM files, which is a PITA, we recommend using an SDK/API or ovftool.  Python and Powershell are probably the easiest ways to solve this problem if you are less interested in writing code.

-Marc
0 Kudos
huyikang
Contributor
Contributor

thank u for answering my question, here I have a ESXI on 23 server, and installed 8 vms in the ESXI center, I want to back up the vms to 21 server, usually I use the web client actions to export the vm, the result is an .ovf file and a .vmdk file, then i upload them to 21 server, I think it's too complex. So I want to know is there shell command to to complete this task, for instance, I can use the ovftool to export it, but how?is there some detail tutorials?

0 Kudos
huyikang
Contributor
Contributor

Thank you, I tried it before, but failed. I used this command:

ovftool --disableVerification --noSSLVerify --powerOffSource --powerOn -ds=datastore1 vi://root:xxx@172.11.21.23/phpbb phpbb.ova

0 Kudos
vbroc
Contributor
Contributor

Are you trying to create cold backups, or a disaster recovery cluster?  Do you have specific recovery point and time objectives for these VMs?  What application/s are they running, and how large are their disk and compute configurations?

Before jumping into the rabbit hole of a home brew scripted solution, which is both hard to support and hard to rely on, have you looked into 3rd party or VMware products to solve this problem for you?

-Marc
0 Kudos