WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / How to Deploy an OVF/OVA in the ESXi Shell

How to Deploy an OVF/OVA in the ESXi Shell

05.21.2012 by William Lam // 54 Comments

I recently answered, what I thought was pretty straight forward question on the VMTN forums about whether it was possible to to deploy an OVA directly onto an ESXi host without leveraging remote tools such as the vSphere Client or the ovftool. The response that I provided was, no it was not possible to deploy an OVF/OVA within the ESXi Shell and recommended the user to take a look at the vSphere Client or the ovftool.

For whatever reason, my brain decided to ponder about this specific question over the weekend (even though I had answered dozen or so questions earlier in the week) and came up an idea that could make this work. As many of you know, I am a big fan of the ovftool and I have written several articles about the tool such as here and here. I wanted to see if I could get the ovftool to run in the ESXi Shell as all the necessary libraries and required packages are all self contained within /usr/lib/vmware-ovftool directory. If this works, it would allow a user to deploy a VM from an OVF or OVA format within the ESXi Shell and would not require a remote system which is great for kickstart deployments or ISO installations. As you probably have guessed, I was able to get this to work 🙂

Disclaimer: This is not officially supported by VMware, please test this in a lab before deploying on production systems.

Before you begin, you will need to get the ovftool installed on an existing Linux system, you can use vMA for your convenience. Next, you will need to use the scp command to copy the entire /usr/lib/vmware-ovftool directory onto an ESXi host. Ensure you place the contents on either a shared or local datastore as the size of the ovftool content is quite large (~119 MB).

In this example, I am scp'ing the ovftool directory to a local VMFS datastore (/vmfs/volumes/datastore1)

scp -r /usr/lib/vmware-ovftool/ [email protected]:/vmfs/volumes/datastore1

Once you have successfully copied the ovftool directory over to your ESXi host, you will need to make a small tweak to the file located in /vmfs/volumes/datastore1/vmware-ovftool/ovftool (shell script that calls the ovftool binary). You will need to modify the the first line using the vi editor from #!/bin/bash to #!/bin/sh as ESXi does not recognize the bash shell. You are now ready to copy an OVF or OVA to your ESXi host which should also reside within a shared or local datastore.

In this example, I uploaded a SLES OVF to the same datastore which contains the ovftool as seen below from the datastore browser:

Let's go ahead and perform a simple probe operation on the OVF we just uploaded to ensure that ovftool is working as expected. To do so, you just need to specify the full path to the ovftool as well as the full path to either your OVF or OVA file.

Note: The ovftool does take slightly longer to run in the ESXi Shell compared to a regular system with the ovftool installed.

Now that we have confirmed the ovftool is working, let's go ahead and deploy from the OVF image. Even though we are running the ovftool locally in the ESXi Shell, you will still need to specify the credentials to your ESXi host during deployment as ovftool was not designed for this use case.

Note: You must specify both the username and password in the ovftool command line, as the password prompt does not function properly in the ESXi Shell and you will see a looping of  "*" characters on the screen.

If you are familiar with the ovftool, you know you can specify an OVF/OVA from both a local resource as well as remote location such as a web server. Here is another example of deploying an OVF from a remote web server:

We can see that is pretty easy to deploy an OVF or OVA from within the ESXi Shell, but what about unattended installations such as ESXi kickstart? Yep, we can do that too! The easiest way is to compress the vmware-ovftool directory using tar command and then download it remotely using the wget command during the %firstboot stanza. I would also recommend placing your OVF/OVA images on a remote web server as well for centralize management and deployment.

Here is the sample code snippet that can be used in your kickstart:

# download ovftool tar to local storage
wget http://air.primp-industries.com/vmware-ovftool.tar.gz -O /vmfs/volumes/datastore1/vmware-ovftool.tar.gz

# extract ovftool content to /vmfs/volumes/datastore1
tar -xzvf /vmfs/volumes/datastore1/vmware-ovftool.tar.gz -C /vmfs/volumes/datastore1/

# deploy OVF from remote HTTP source
/vmfs/volumes/datastore1/vmware-ovftool/ovftool -dm=thin -ds=datastore1 "--net:access333=VM Network" "http://air.primp-industries.com/SLES-VM/SLES-VM.ovf" "vi://root:[email protected]"

# power on VM
vim-cmd vmsvc/power.on $(vim-cmd vmsvc/getallvms | grep "SLES-VM" | awk '{print $1}')

As you can see, virtually anything is possible ... even if you thought it was not earlier 🙂

More from my site

  • Quick Tip - Import OVF/OVA as VM Template using OVFTool 4.3 Update 1
  • Default hashing algorithm changed in OVFTool 4.2 preventing OVF/OVA import using vSphere C# Client
  • Heads Up: OVF/OVA always deployed as Thick on VSAN when using vSphere Web Client
  • Caveat when deploying Photon Controller Installer (v0.8) OVA to vCenter Server
  • How to deploy and run the VSAN 6.1 Witness Virtual Appliance on VMware Fusion & Workstation?

Categories // Automation, ESXi, OVFTool, Uncategorized Tags // esxi 5, ova, ovf, ovftool

Comments

  1. Anonymous says

    05/21/2012 at 2:58 pm

    Even though I have not tested this myself yet (will do so soon), is it possible to create an ovf/ova file from within the ESXi shell ?

    Reply
    • William says

      05/21/2012 at 3:08 pm

      @Anonymous,

      Yes, if you know how the ovftool works, it can be used to import/export OVF.

      You would still need to connect to the ESXi host and discover your VMs, but you can easily export an "offline".

      Here is an example:

      /vmfs/volumes/datastore1/vmware-ovftool/ovftool "vi://root:[email protected]/VM1" /vmfs/volumes/datastore1/VM1.ovf

      Reply
    • Anonymous says

      05/21/2012 at 3:18 pm

      Nice! Should we expect the next version of backup to include an option for ovf/ova backup and restore 🙂

      Reply
    • William says

      05/21/2012 at 10:30 pm

      I don't have any plans on exposing this with ghettoVCB.

      As mentioned in the article, ovftool runs a little slower on ESXi Shell due to limited amount of resources and the biggest problem is that to export to an OVF, the VM must be offline. Though this may be okay for some users, I suspect the majority of users would like to perform online backups.

      Reply
    • Anonymous says

      05/22/2012 at 6:52 pm

      Just to keep the idea going ...

      The backups that are produced by ghettoVCB are offline VM's. Would it not be feasible to do a post process where we create an ova/ovf from the backup itself, and use that for storage, backup etc. The advantage would be smaller footprint, and better portability (no issues with moving the file around).

      Just thinking out loud ..

      Reply
  2. Anonymous says

    05/21/2012 at 10:24 pm

    In kickstart file, can't we just do an NFS mount and run ovftool from the mounted file system ? That way we don't need to run scp, tar and changing of 'bash' to 'sh' manually (which could be done on the NFS server side itself).

    Reply
    • William says

      05/21/2012 at 10:28 pm

      Yes that will probably work as well. The article is just to give you an idea on how you can accomplish the task, there's more than one way to do anything 🙂 I would recommend you give it a try and post your findings

      Reply
  3. Anonymous says

    06/13/2012 at 2:03 am

    Which version of ESX are you using? I am trying with ESXi 4.1. I am good up until it comes to deployment. Then i get an error, "Error: Unexpected option vi://root:"...
    Any ideas?

    Reply
    • William says

      06/13/2012 at 3:54 am

      This was tested on ESXi 5.0

      Reply
    • myxinghe says

      06/14/2012 at 3:39 am

      Hi William,

      Do you know what is the Linux OS which is most similar to that of esxi 4.1? I have been trying to auto deploy ovf file on 64 bit ESXi 4.x. Since it is ESXi 4.x, I cannot use ESXi 5.0 and vmware auto deploy. The method described in your post looks promising.

      I first tried to install 64 bit ovftool on the latest vma4, and then scp the vmware-ovftool directory to ESXi 4.1 shell. I got a "segment fault" when I was trying to probe the ovf file.

      And then I tried copying the vmware-ovftool from 32 bit ubuntu 10.04. Probing the ova file is successful (/vmfs/volumes/datastore1/vmware-ovftool/ovftool "http://10.10.1.1/kickstart/myos.ova") . But when I was trying to deploy it , I got the following PANIC error.

      /vmfs/volumes/datastore1/vmware-ovftool/ovftool "http://10.10.1.1/kickstart/myos.ova" "vi://10.10.1.100"
      Opening OVA source: http://10.10.1.1/kickstart/myos.ova
      The manifest validates
      PANIC bora/lib/unicode/unicodeCommon.c:330

      VMware Workstation Error:
      VMware Workstation unrecoverable error: (vthread-3)
      PANIC bora/lib/unicode/unicodeCommon.c:330
      You can request support.
      To collect data to submit to VMware support, select Help > About and click "Collect Support Data". You can also run the "vm-support" script in the Workstation folder directly.
      We will respond on the basis of your support entitlement.

      I have verified copying vmware-ovf directory from a host to another host with the same OS version works. I think if I install the ovftool to a OS which is very similar to that of ESXi 4.1, it will a have good chance to succeed.

      Any suggestions that I can try to make ovftool work for ESXi 4.1, besides finding the OS similar to ESXi 4.1?

      Really appreciate your help!

      Reply
    • William says

      06/14/2012 at 4:59 pm

      ESXi is it's own OS, specifically the VMkernel and it's not related to any Linux OS. The ESXi shell runs Busybox, you could try to get it working on Busybox and copying the files over, but YMMV. This was only tested on ESXi 5 and it's not officially supported, so it may or may not work even on ESXi 5.0

      You might find these two articles useful:
      http://www.virtuallyghetto.com/2011/02/how-to-compile-busybox-for-esxi-kind-of.html
      http://www.virtuallyghetto.com/2011/02/how-to-compile-busybox-for-esxi-kind-of_15.html

      Good Luck

      Reply
    • myxinghe says

      07/05/2012 at 8:50 pm

      Hi William,
      Thanks for your explanation. I tried the Busybox solution without success. But I did figure out one workable solution. Here is what I did:
      1. install 64 bit CentOS 5.5 x86_64.
      2. on CentOS, get 32 bit ovftool installation script VMware-ovftool-2.0.1-260188-lin.i386.sh from vmware. (newer version or 64 bit version don't work on esxi 4.1 shell in my testing)
      3. install ovftool on CentOS: ./VMware-ovftool-2.0.1-260188-lin.i386.sh
      4. modify first line of /opt/vmware/ovftool/ovftool from "#!/bin/bash" to "#!/bin/sh".
      5. cd /opt/vmware
      6. tar -czvf ovftool.tar.gz ovftool/
      7. copy the tar file to esxi4.1 and untar it.
      8. using ovftool to deploy ova file on esxi4.1: /vmfs/volumes/datastore1/ovftool/ovftool --acceptAllEulas --name="newname" "http://10.10.1.1/kickstart/my.ova" "vi://[email protected]".

      Hope it might be helpful for someone.

      Thanks.

      Reply
  4. Anonymous says

    08/08/2012 at 8:45 am

    Hi William

    Priceless....I was trying to do this a couple of months back for an audo-deployment project from a DVD disk sent out to a customer...I had to gz the entire VM and extract it into the newly deployed ESXi system (MD5 checks all the way!). Now I can chill...send out new OVF's on DVD and do a nice clean import.

    My only thorn in my side is ESXi5's 2GB USB limit which prevents me sending out loads of OVF's updates on a 32GB USB stick?....I can dream I suppose?

    Oustanding!

    Luca (London)

    Reply
  5. SH says

    01/25/2013 at 6:31 pm

    It looks like VMware changed ovftool binary and ver 3.0.1 is no longer static. I'm having troubles getting it work in ESXi 5.1 shell. Does anyone have a link to an older ovftool bundle ?

    The error is :

    SSLLoadSharedLibraries: Failed to load OpenSSL libraries. libdir is /usr/lib/vmware

    VMware Workstation Error:
    VMware Workstation unrecoverable error: (vthread-3)
    SSLLoadSharedLibraries: Failed to load OpenSSL libraries. libdir is /usr/lib/vmware

    Reply
    • flavio lodoli says

      01/30/2013 at 9:32 am

      Same error on ESXi, can an older version work?

      Reply
    • Trevor says

      04/26/2013 at 12:34 pm

      When I run the ovftool (v. 3.0.1) from the local esxi 5.1 shell I receive the following error:

      ovftool :not found

      Has anyone been successful at running the ovftool from the esxi 5.1 shell?

      Reply
    • Len says

      06/18/2014 at 5:56 pm

      I'm getting the same error. ESXi 5.5

      Reply
  6. Carl Windsor says

    05/23/2013 at 9:35 am

    3.0.1 works on 5.1 you just have to symlink the files to /usr/lib e.g.

    ln -s /vmfs/volumes/501916f2-c5a348a7-b2f4-d4ae52a078f7/vmware-ovftool /usr/lib/vmware-ovftool

    where 501916f2-c5a348a7-b2f4-d4ae52a078f7 is replaced with your local volume ID. Don't be tempted to use the Datastore name, this is a symlink itself so you will receive an error due "to too many levels of symbolic links". Don't try to move the files there either or you will run out of space.

    Then run the ovftool as follows

    /usr/lib/vmware-ovftool/ovftool /vmfs/volumes/datastore1/Filename.ova

    Finally, it allows me to install VMs easily across a transatlantic link 🙂

    Reply
  7. Suraksha Vidyarthi says

    06/14/2013 at 6:49 pm

    Is there any other equivalent of ovftool which can be used to deploy a .ova file. We are trying to to automate our test environment so looking for options that we can use to create a working environment from .ova files.

    Reply
  8. MO says

    06/25/2014 at 11:38 pm

    Hello, I'm trying to deploy an OVA on ESXi 5.1:

    /vmfs/volumes/5266a109-xxx-xxx-xx-xx/vmware-ovftool # /vmfs/volumes/datastore1/vmware-ovftool/ovftool -ds=datastore1 -dm=thin /vmfs/volumes/datastore1/Web.ova “vi://aaa:[email protected]”
    Opening OVA source: /vmfs/volumes/datastore1/Web.ova
    Opening VMX target: “vi://aaa:[email protected]”
    Error: Invalid target disk adapter type: thin
    Deleting directory tree below: “vi:
    Completed with errors

    Do you know why I'm receiving this error?

    Thanks!

    Reply
  9. Louis says

    07/03/2014 at 10:27 am

    This doesn't seem to work with OVFtool 3.5 on ESXi 5.0.

    The following comes up:
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.9'
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.11'
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.9'
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.11'
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.9'

    the libstdc++.so.6 is part of vmware tools install on Linux. I have taken the file and placed it both in the folder containing the ovftool as well as /usr/lib/ and I have also configured the symlink as suggested in the other comments, it still doesn't work.

    Reply
  10. Jeff says

    08/09/2014 at 11:04 pm

    Check to see if there is an updated version of libstdc++ available. On SLES, there is both the 4.3 and 4.6 versions - they can co-exist. Install libstdc++43, and the 32-bit (in on x86_64) AND the libstdc++46 (and 32-bit).

    Run a depmod -a afterwards. Reboot doesn't hurt.

    Running the 'strings command against the libstdc++.so.6 | grep GLIBC" should show you whether the version 3.4.11 is in
    the library or not.

    Reply
    • Louis says

      10/16/2014 at 9:08 am

      Thanks Jeff, will test.

      Reply
  11. swapna says

    10/16/2014 at 5:19 am

    I am using ESXI6.0 OS . Now i have to create VM in ESXI6.0 using OVFtool. As the older ovftool 3.5.0 is not supporting ESXI6.0, help me out to get OVFtool for esxi6.0 OS.

    Reply
  12. 1111 says

    10/31/2014 at 7:52 pm

    And primp industries is no more? Anyone have the link to ovftool.exe or ovftool linux binary from VMware without having to login?

    Reply
  13. Gal says

    03/19/2015 at 2:54 pm

    Hi,
    I successfully deployed ovf using this procedure with some warnings because my network have few adapters.
    This is the list of networks I have-

    Networks:
    Name: Check Point Management
    Description: The Check Point Management network

    Name: Check Point Sync
    Description: The Check Point Sync network

    Name: External Network
    Description: The External Network network

    Name: Internal Network
    Description: The Internal Network network

    I used this command to deploy the ovf with only 1st network - /vmfs/volumes/datastore1/vmware-ovftool/ovftool -dm=thick -ds=datastore1 "--net:Check Point Management=VM Network" ......

    My question is how to deploy more then 1 network ?

    Thanks

    Reply
  14. vBoy says

    05/20/2015 at 11:50 am

    Hi,

    I successfully install ovftool local on one ESX and it works fine for exporting ova locally.

    /vmfs/volumes/55484a4d-f560588d-cb1c-005056952125/vmware-ovftool # ./ovftool --disableVerification --noSSLVerify -ds=datastore1 vi://root:[email protected]/Esxi1_VM3 /vmfs/volumes/datastore1/vm-tst.ova

    Opening VI source: vi://[email protected]:443/Esxi1_VM3
    Opening OVA target: /vmfs/volumes/datastore1/vm-tst.ova
    Writing OVA package: /vmfs/volumes/datastore1/vm-tst.ova
    Progress: 16%
    Transfer Completed
    Completed successfully

    Is it possible to export/import directly between 2 ESXi 5.1 host ? I've tied but get the following error:

    /vmfs/volumes/55484a4d-f560588d-cb1c-005056952125/vmware-ovftool # ./ovftool --disableVerification --noSSLVerify -ds=datastore1 --X:logFile=debug_o.log vi://root:[email protected]/Esxi1_VM3 vi://root:[email protected]

    Opening VI source: vi://[email protected]:443/Esxi1_VM3
    Opening VI target: vi://[email protected]:443/
    Error:
    - The task was canceled by a user.
    Completed with errors

    Here's the log:

    2015-05-20T11:43:47.418Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Getting target
    2015-05-20T11:43:47.419Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Connecting to vi host
    2015-05-20T11:43:47.419Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Skip SSL verification
    2015-05-20T11:43:47.419Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Getting version of the VI host : 172.18.235.22
    2015-05-20T11:43:47.420Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Initializing new curl session
    2015-05-20T11:43:47.478Z verbose -[3FFCBD89F20] [[email protected] sub=Default] WebRequest set basic http authorization, username : root
    2015-05-20T11:43:47.478Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Getting http page: https://172.18.235.22/sdk/vimServiceVersions.xml
    2015-05-20T11:43:47.542Z verbose -[3FFCC191940] [[email protected] sub=Default] Curl session torn down
    2015-05-20T11:43:47.555Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Http response code: 200
    2015-05-20T11:43:47.555Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Http response body:

    2015-05-20T11:43:47.556Z verbose -[3FFCBD89F20] [[email protected] sub=Default] Curl session torn down

    Can you help please?

    Thanks

    Reply
    • William Lam says

      05/20/2015 at 3:48 pm

      Hi,

      Given ovftool was never meant to run in ESXi, YMMV on what operations will work and I've not tried to run it between two ESXi within ESXi. I know this works when you run ovftool on a separate supported system.

      Reply
  15. DJVege says

    07/08/2015 at 5:36 pm

    Hi,

    Your article was great and got me almost through this deployment. However, I've run into this problem. I'm using esx 3.5 and ovftool 3.5.2. I'm trying to deploy the ovf from the datastore (or locally), but it fails with the brilliant error:

    Error: vmodl.fault.InvalidRequest.

    Looking through the logs, it is failing on:

    2015-07-09T03:28:15.133+10:00 [16244 verbose 'Default'] Getting http page: https://192.168.6.200/sdk/vimServiceVersions.xml
    2015-07-09T03:28:15.133+10:00 [16244 verbose 'Default'] Proxy host :0
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.148+10:00 [18148 verbose 'Default'] CURL: header data removed
    2015-07-09T03:28:15.164+10:00 [16244 verbose 'Default'] viConnection version: vim25:2.5u2 (apiVersion: 2.5.0)
    2015-07-09T03:28:15.179+10:00 [16244 verbose 'Default'] Setting VI connection message locale (via login) to:
    2015-07-09T03:28:15.179+10:00 [16244 verbose 'HttpConnectionPool-000002'] HttpConnectionPoolImpl created. maxPoolConnections = 1; idleTimeout = 900000000; maxOpenConnections = 1; maxConnectionAge = 0
    2015-07-09T03:28:15.195+10:00 [16244 verbose 'Default'] Keeping VI session alive
    2015-07-09T03:28:15.195+10:00 [10172 verbose 'vmomi.soapStub[3]'] initial service state request failed, disabling pings. error=HTTP Status:404 'Not Found'

    I'm assuming that because esx is older than version 4, the vimserviceVersions.xml file (and the sdk folder) do not exist so it is failing with the 404 error.

    Is it possible to get this working?

    C:\Program Files\VMware\VMware OVF Tool>ovftool --datastore=storage2 --vmFolder="TestFolder" --X:logFile=d:\log.txt "https://[email protected]/folder/HipChatovfs/hipchat.ovf?dcPath=ha-datacenter&dsName=storage2" vi://[email protected]/

    Any help would be greatly appreciated.

    Reply
  16. Hruthvik says

    07/21/2015 at 9:15 am

    Thanks for the good stuff William, I have esxi server and I am able to create VM through ovftool and power it on. so far it is good but I want to manage (linux-vm) from esxi cli. Like this I want to login to the esxi through ssh from there I want to access linux-vm console. Is there any way to do it?

    Reply
  17. Robert says

    01/02/2016 at 9:23 am

    Thank you so much. Deployed 18 VM's in no time with this setup.

    Reply
  18. W Glass says

    03/08/2016 at 6:59 am

    Hello!

    I need help, I have everything going along. OVF tool is tar'd and working I am able to get the description read. my issue comes with the vi connection. I keep getting a connection refused on 192.168.x.x:443 and not sure where to go from here.

    ESXi 6

    Please help

    Reply
    • W Glass says

      03/08/2016 at 8:19 am

      I was running before firstboot in the ks file, I am retrying now

      Reply
      • GeeKv2 says

        09/27/2017 at 3:03 am

        Hey. I am trying this on ESXi 6 as well but without luck. Did you get it to work?

        Thanks!

        Reply
        • Sagi says

          01/01/2018 at 1:03 am

          Hi,
          Any news? please advise

          Reply
          • G says

            01/01/2018 at 2:49 am

            It didn't work for me.

  19. Sankar says

    09/12/2016 at 5:03 am

    Hi William,
    I've created a ova and while deploying its showing web console networking properties tab for some ESX servers.
    How can I skip configuring these properties in web console while deploying ova?
    Do we have any configuration to make sure that this console tab can be hide while deploying.

    I appreciate you help, thanks in advance.

    Regards
    Sankar

    Reply
  20. Martin Steigerwald says

    09/15/2016 at 3:17 am

    William, thank you a ton for this one! It was the *easiest* way for me to deploy an OVA on my Intel NUC ESX + Proxmox tuxcenter training machine without hitting the upload issues with VMware ESXi Host Client (I think it does not like that the vmdk is 5 GiB, at least it says it won´t accept OVAs larger than 1 GiB due to a browser limitation… and then suggests un-tar-ing ova and upload individual files, but, well VMDK is also larger than 1 GiB).

    Reply
  21. banchini says

    02/17/2017 at 9:02 am

    Hi William,

    When I run the test probe, looks good...

    [[email protected]:~] /vmfs/volumes/datastore1/vmware-ovftool/ovftool /vmfs/volumes/datastore1/vmx-esxi-15.1F6.9/ova/vcp
    _15.1F6.9.ova
    OVF version: 1.0
    VirtualApp: false
    Name: vCP_15.1F6.9

    Download Size: 834.82 MB

    Deployment Sizes:
    Flat disks: 31.01 GB
    Sparse disks: 1.02 GB

    Networks:
    Name: br-ext
    Description: The br-ext network

    Name: br-int
    Description: The br-int network

    Virtual Machines:
    Name: vCP_15.1F6.9
    Operating System: otherguest64
    Virtual Hardware:
    Families: vmx-08
    Number of CPUs: 1
    Cores per socket: 1
    Memory: 2.00 GB

    Disks:
    Index: 0
    Instance ID: 6
    Capacity: 25.00 GB
    Disk Types: IDE

    Index: 1
    Instance ID: 7
    Capacity: 6.00 GB
    Disk Types: IDE

    Index: 1
    Instance ID: 9
    Capacity: 16.00 MB
    Disk Types: IDE

    NICs:
    Adapter Type: E1000
    Connection: br-ext

    Adapter Type: E1000
    Connection: br-int

    When I run the final deployment command get a resource pool error...

    [[email protected]:~] /vmfs/volumes/datastore1/vmware-ovftool/ovftool -dm=thick -ds=datastore1 "--net:br-ext=br-ext" "--
    net:br-int=br-int"/vmfs/volumes/datastore1/vmx-esxi-15.1F6.9/ova/vcp_15.1F6.9.ova "vi://root:[email protected]"

    Error: Found wrong kind of object (ResourcePool). Possible completions are:

    Any ideas, this is the first VM on the Server and its 6.5.0

    Reply
  22. Karanjot Bhasin says

    06/19/2017 at 2:53 am

    Hi,
    Thanks for your help! I was successfully able to use OVFTOOL on ESXI Server itself.
    However considering OVF EULA , i am not sure whether this is legal for production system?
    https://www.vmware.com/download/eula/vmware-ovf-tool.html

    Reply
  23. Shwetha says

    07/07/2017 at 6:06 am

    Hi I am getting this problem while probing the ovf tool. Please help!

    /vmfs/volumes/datastore1/VMware OVF Tool/ovftool: line 1: syntax error: unexpected word (expecting ")")

    tried from symlink too:
    /usr/lib/vmware-ovftool/ovftool: line 1: syntax error: unexpected word (expecting ")")

    Reply
    • Shwetha says

      07/07/2017 at 7:28 am

      Oops. My bad. I was doing this whole procedure from my mac instead of linux vm

      Reply
  24. Michael Marques says

    07/10/2017 at 4:17 am

    Errr... ESXI 6.5, something really wrong here...

    [[email protected]:/vmfs/volumes/59628d09-e2d4deb8-9b41-00259022ae5e/vmware-ovftool]./ovftool –disableVerification –noSSLVerify -ds=datastore1 –X:logFile=debug_o.log vi://root:*protected email*1/ISPConfigGeral vi://root:*protected email*2

    Error: Unexpected option: -ds=datastore1
    Completed with errors

    [[email protected]:/vmfs/volumes/59628d09-e2d4deb8-9b41-00259022ae5e/vmware-ovftool]./ovftool -ds=datastore1 -ds=thin vi://root:*protected email*1/ISPConfigGeral vi://root:*protected email*2

    Error: Unexpected option: -ds=datastore1
    Completed with errors

    The second "try" works ok in apple mac ovftools....

    help...

    Reply
    • Michael Marques says

      07/10/2017 at 4:21 am

      Sorry second try add 2 erros... did not copied correctly (this is the one that does work on mac ovftool)

      [[email protected]:/vmfs/volumes/59628d09-e2d4deb8-9b41-00259022ae5e/vmware-ovftool]./ovftool -ds=datastore1 -dm=thin vi://root:*protected email*1/ISPConfigGeral vi://root:*protected email*2

      Error: Internal error: Failed to connect to server
      Completed with errors

      Reply
  25. Biswajit Mukherji says

    07/27/2017 at 6:21 am

    Looks like it accept port group of standard switch only.

    Reply
  26. GeeKv2 says

    09/27/2017 at 3:00 am

    Great article! I am trying this on a ESXi 6 host and deploying on another ESXi 6 host. But I get an error after running the ovftool command:
    Error: Internal error: Failed to connect to server

    I can ping the other server, even ssh to it. I have also enabled FTP clients on both servers but it still doesnt work.

    Is there anything else that might be blocking the operation?

    Thanks!

    Reply
  27. sistemi says

    10/25/2017 at 6:33 am

    tried three version of ovftool (3.5.2, 4.0.0, 4.2.0) on esxi 5.5.0 none working... someone have working example? thanks

    Reply
  28. Prabhu G says

    08/13/2018 at 2:17 am

    Hello Willliam,
    I'm trying to deploy OVA from vcenter using Import-Vapp cmdlet and connected to VC. The OVA file is located in a share point. when I execute the command" Import-VApp -Name testvm -VMHost 10.12.202.146 -Source "\\192.168.101.109\Amp-Ovf \ESRS_VE.x86_64-326.0006.0.ova" -ovfconfiguration $ovfconfig -Datastore MGMT-DS-04 -DiskStorageFormat thin -Force -RunAsync:$true" the command is running successful. But in VC, the VM creating steps are coming and the VM is getting Destroy automatically. Any clue why it is behaving like this.

    Reply
  29. Justin says

    07/24/2019 at 11:15 am

    To get this to work I had to set the environmental variables before using the OVFTool within ESXi 6.7.

    HISTFILE='/.ash_history'

    HOME='/'

    HOSTNAME='esxi_host.local.net'

    IFS=' '

    LANG='en_US.UTF-8'

    LC_ALL='en_US.UTF-8'

    LINENO=''

    LOGNAME='root'

    MAIL='/var/mail/root'

    OPTIND='1'

    PATH='/bin:/sbin'

    PPID='2099700'

    PS1='[[email protected]\h:\w] '

    PS2='> '

    PS4='+ '

    PWD='/'

    SHELL='/bin/sh'

    SHLVL='1'

    SSH_TTY='/dev/char/pty/t0'

    TERM='xterm-256color'

    TERMINFO='/usr/share/terminfo'

    TMOUT='0'

    USER='root'

    VI_USERNAME='root'

    _='ls'

    secureBoot='0'

    Reply
  30. Federico says

    12/22/2021 at 3:35 am

    Hi William,
    I trying to deploy an ovf from local repository but every execution of command "ovftool" return me "killed".
    Could you help me?
    Regards

    Reply

Trackbacks

  1. Automating ESXi 5 Kickstart Tips & Tricks | virtuallyGhetto says:
    03/02/2014 at 7:44 pm

    […] is a post on How to Deploy an OVF/OVA in the ESXi […]

    Reply
  2. How to Copy VMs Directly Between ESXi Hosts Without Shared Storage | אגדיקום - agadycom says:
    07/15/2014 at 10:07 pm

    […] you probably have guessed by now, I am a big fan of the ovftool and have written several articles here, here and here. It still surprises me with the amount of features this little utility contains […]

    Reply
  3. How to Copy VMs Directly Between ESXi Hosts Without Shared Storage | virtuallyGhetto says:
    10/21/2016 at 10:35 am

    […] you probably have guessed by now, I am a big fan of the ovftool and have written several articles here, here and here. It still surprises me with the amount of features this little utility contains and […]

    Reply
  4. Do not forget to open 443 port while using ovftool on ESXi hosts and deploying to a vCenter – Giedrius Statkevičius says:
    04/23/2018 at 8:55 am

    […] on their own machines but it is possible to run it on an ESXi host as well as per these articles: http://www.virtuallyghetto.com/2012/05/how-to-deploy-ovfova-in-esxi-shell.html, https://gist.github.com/ruzickap/fda71997083a41b0c6cd. However, if you tried that and tried to […]

    Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023
  • Is my vSphere Cluster managed by vSphere Lifecycle Manager (vLCM) as a Desired Image or Baseline? 03/10/2023
  • Interesting VMware Homelab Kits for 2023 03/08/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023