Error failed to open ovf descriptor

Hi All, I am trying to convert vmdk file to ovf format using command line. I am using the below command: # ovftool my_vm.vmdk new.ovf    Opening OVF source: my_vmdk.vmdk    Error: Failed to open OVF descriptor    Completed with errors Not sure whats wrong in this command. Please help! Thanks!

vmware_user14

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Hi All,

I am trying to convert vmdk file to ovf format using command line. I am using the below command:

# ovftool my_vm.vmdk new.ovf

   Opening OVF source: my_vmdk.vmdk

   Error: Failed to open OVF descriptor

   Completed with errors

Not sure whats wrong in this command. Please help!

Thanks!


  • All forum topics


  • Previous Topic

  • Next Topic

7 Replies

Anjani_Kumar

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

must follow below things before running the ovf tool.

1. Open tool wiht «Run As Administrator».

2. Provide the full path for your vm and output file.

e.g. >ovftool c:vmmyVM.vmx c:OVFmyVM.ovf

Follow the blog.

Terremark Worldwide

Please consider marking this answer «correct» or «helpful» if you found it useful.

Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist
Twitter : @anjaniyadav85
Website : http://www.Vmwareminds.com

Anjani_Kumar

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

try it with windows or mac if you can. and see if it works.

Please consider marking this answer «correct» or «helpful» if you found it useful.

Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist
Twitter : @anjaniyadav85
Website : http://www.Vmwareminds.com

vmware_user14

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Hi,

As suggested, I followed the same steps mentioned above on windows system.

Unfortunately, it gives same error as Linux Smiley Sad

C:Program FilesVMwareVMware OVF Tool> ovftool.exe d:myVM.vmdk d:myVM.ovf

Opening OVF source: d:myVM.vmdk

Error: Failed to open OVF descriptor

Completed with errors

Thanks!

Anjani_Kumar

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

seems like your ovf descriptor file is missing that is the reason for this erro.

Did you tried creating the ovf via using wokrstation or esxi. ?

Please consider marking this answer «correct» or «helpful» if you found it useful.

Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist
Twitter : @anjaniyadav85
Website : http://www.Vmwareminds.com

vmware_user14

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Using ESX it works. I am basically trying to automate file conversion process from vmdk to ovf format using ovftool.

Any idea how ovf descriptor file can be created?

It would be of great help if you can share some other possible ways to do this!

Thanks!

Я пытаюсь преобразовать VMX в формат OVF с помощью OVFTool, как показано ниже, однако выдает ошибку:

C:Program FilesVMwareVMware OVF Tool>ovftool.exe
vi://vcenter.com:port/folder/myfolder/abc.vmx abc.ovf
Error: Failed to open file: https://vcenter.com:port/folder/myfolder/abc.vmx
Completed with errors

Пожалуйста, дайте мне знать, если у вас есть решение.

8 ответов

У меня была аналогичная проблема с OVFTool, пытающимся экспортировать в формат OVF.

Export failed: Failed to open file: C:Virtualtesttest.vmx.

Сначала я открыл файл .VMX в редакторе (это текстовый файл) и убедился, что такие настройки, как

scsi0:0.fileName = "test.vmdk"
nvram = "test.nvram"
extendedConfigFile = "test.vmxf"

Укажите правильные имена файлов. Потом я заметил эту строку:

.encoding = "windows-1251"

Это кириллическая кодовая страница, поэтому я изменил ее для использования западной кодовой страницы.

.encoding = "windows-1252"

Затем запуск OVFTool выдал другую ошибку

Export failed: Failed to open disk: test.vmdk.

Чтобы исправить это, мне пришлось открыть файл .VMDK в HEX-редакторе (потому что это обычно большой двоичный файл), нашел там строку

encoding = "windows-1251"

(это где-то в начале файла) и заменил «1251» на «1252».

И это сделало свое дело!


7

Vladimir Shutow
18 Мар 2016 в 23:45

В моем случае необходимо было восстановить диск «abc.vmdk», прежде чем преобразовать «abc.vmx» в «abc.ovf».

Используйте это для Linux:

$ /usr/bin/vmware-vdiskmanager -R /home/user/VMware/abc.vmdk

Посмотрите по этой ссылке https://kb.vmware.com/s/article/2019259 для решения проблемы в Windows и Linux


2

guilhermisaac
3 Окт 2018 в 16:25

Попробуйте запустить, как описано ниже.

C:Program FilesVMwareVMware OVF Tool>ovftool C:Win-TestWin-Test.vmx (расположение вашего файла vmx) C:Win-Testwin-test.ovf (место назначения)


1

Vadim Sluzky
7 Июл 2015 в 23:30

Возможно, ovftool не может распознать указанный вами путь.

Попробуйте выполнить следующую команду:

ovftool --eula@=[path to eula] --X:logToConsole --targetType=OVA --compress=9 vi://[username]:[ESX address] [target address]

Как только вы укажете адрес ESX, в нем будут перечислены папки, которые вы создали в своем ящике ESX. Затем вы можете снова запустить вышеупомянутую команду, добавив имя папки.

Если в вашем поле нет иерархии папок, он просто перечислит имена виртуальных машин.

Повторите ту же команду, добавив [foldername]/[vmname no vmx file name required]

ovftool --eula@=[path to eula] --X:logToConsole --targetType=OVA --compress=9 vi://[username]:[ESX address]/[foldername if exist]/[vmname no vmx file name required] [target address]


1

the
20 Сен 2015 в 21:01

У меня была точно такая же проблема. В моем случае я открыл файл VMX, удалил IDE и звуковые контроллеры из файла и сохранил. Затем я смог преобразовать все в OVA, используя инструмент со стандартным синтаксисом.

Например Я бросил:

ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-image"

А также:

sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"

Это позволило мне преобразовать файл как обычно.


0

Doug
16 Фев 2018 в 05:06

Для меня сработало открытие .vmx и удаление следующей строки:

sata0:1.deviceType = "cdrom-image"


0

Michail Gede
15 Мар 2018 в 12:11

В моем случае это работает:

ide1:0.present = "TRUE"

ide1:0.deviceType = "cdrom-image"

Я изменил true на false и работает нормально, поскольку cdrom-image не существует, это изменение разрешает преобразование формата.


0

double-beep
19 Мар 2019 в 22:45

У меня была аналогичная ситуация в vmware fusion, когда я пытался использовать .vmx, который, вероятно, был создан в Windows. Я мог загрузить виртуальную машину, но любая попытка экспортировать машину с помощью ovftool или использовать vmware-vdiskmanager провалилась:

Error: Failed to open disk: source.vmdk
Completed with errors

Имя диска было полностью действительным, путь был действительным, разрешения были действительными, и единственная подсказка заключалась в запуске ovftool с:

ovftool --X:logToConsole --X:logLevel=verbose source.vmx dest.ova

Opening VMX source: source.vmx
verbose -[10C2513C0] Opening source
verbose -[10C2513C0] Failed to open disk: ./source.vmdk
verbose -[10C2513C0] Exception: Failed to open disk: source.vmdk. Reason: Disk encoding error
Error: Failed to open disk: source.vmdk

Как и предлагали другие, я заглянул в .vmdk. там я нашел еще 3 подсказки:

encoding="windows-1252"
createType="monolithicSparse"
# Extent description
RW 16777216 SPARSE "source.vmdk"

Поэтому сначала я преобразовал monolithicSparse vmdk в «предварительно выделенный виртуальный диск, разделенный на файлы размером 2 ГБ»:

vmware-vdiskmanager -r source.vmdk -t3 foo.vmdk

Затем я мог бы отредактировать «foo.vmdk», чтобы изменить кодировку, которая теперь выглядит так:

encoding="utf-8"
createType="twoGbMaxExtentFlat"
# Extent description
RW 8323072 FLAT "foo-f001.vmdk" 0
RW 8323072 FLAT "foo-f002.vmdk" 0
RW 131072 FLAT "foo-f003.vmdk" 0

И, наконец, после исправления source.vmx:

scsi0:0.fileName = "foo.vmdk"

Выгода:

ovftool source.vmx dest.ova
...
Opening VMX source: source.vmx
Opening OVA target: dest.ova
Writing OVA package: dest.ova
Transfer Completed
Completed successfully


8

Ryan Breed
11 Янв 2017 в 05:30

You are here: Home / Automation / How to Deploy an OVF Located On ESXi Datastore Using ovftool

I have written several articles in the past about the awesome ovftool which is a versatile remote command-line utility for importing/exporting virtual machines in the OVF format across various VMware products. I mainly run ovftool in either the vMA or on my OSX desktop. When performing an import, the OVF files are local on the same system that has the ovftool installed.

I recently came across an interesting question about using the ovftool to deploy OVF files that are located on an ESXi datastore. My initial thought was that you would not be able to deploy the OVF files since the ovftool would not have access to the files locally. After finishing a recent article about ESXi datastore management using the vCLI’s vifs utility, I then realized there might actually be a way to deploy OVF files that are stored on an ESXi datastore.

If you take a look on page 17 of the ovftool user guide, there is a table describing the various source locators that are supported. You can see that the source of an OVF file can be accessed by ovftool in 4 different methods including HTTP/HTTPs which is a key for this specific request.

Source Type Default File Extension Protocol
OVF .ovf File, HTTP, HTTPS, FTP
OVA .ova File, HTTP, HTTPS, FTP
VMX .vmx File
vvApprun N/A File
vCloud Director N/A HTTPS
vSphere N/A vSphere

Files and folders management for a datastore is exposed through the fileManager in the vSphere API and datastores are referenced as a URL or remote path.

A URL has the form

scheme://authority/folder/path?dcPath=dcPath&dsName=dsName

where

  • scheme is http or https.
  • authority specifies the hostname or IP address of the Center or ESX(i) server and optionally the port.
  • dcPath is the inventory path to the Datacenter containing the Datastore.
  • dsName is the name of the Datastore.
  • path is a slash-delimited path from the root of the datastore.

Putting all this together, you can use the ovftool remotely to deploy an OVF file that is stored on an ESX(i) datastore. Below is an example walk through of this process.

Here is an OVF that is stored on a datastore located on an ESXi host:

To identify the URL path to your OVF, you can use a web browser to assist. Point your browser to the following address: https://[ESXI_HOST]/folder

When you first login, you will be brought to the root datacenter, in the case of directly connecting to an ESX(i) host, you will only see «ha-datacenter». Go ahead and select it and then you will be brought to a list of datastores the host has access to.

Select the datastore which contains the OVF file you wish to deploy from and then browse to the specific file.

Make a note of the URL path used to get to the OVF file and the OVF filename itself. Taking the example above, we end up with the following URL path:

https://vesxi50-4.primp-industries.com/folder/MyVM/MyVM.ovf?dcPath=ha-datacenter&dsName=iSCSI-1

To confirm the URL path, we can use ovftool to perform a simple «probe» on our OVF, this will provide you with a quick summary of the OVF.

Next we are ready to import the OVF file to our ESXi host. In this example, we will deploy the OVF to another datastore the ESXi host has access to and configure a specific portgroup to connect to the VM to after deployment. There are various options that can be passed to ovftool, please refer to the ovftool user guide for more details.

One the import has completed, you should now see the VM automatically registered in your ESXi host inventory.

You can see that this method allows you to import an OVF file stored on a datastore locally to the ESXi host as well as an OVF file stored on a remote datastore of another ESXi host. To help manage and deploy your OVF files, you should consider storing them on a centralized «media» datastore or even a WEB/FTP server that can be accessed by the ovftool.

Trackbacks

Quick post about a silly issue I encountered that I want to document here. I was trying to deploy an OVA on a VCSA 6.7 with no success. You would wonder how hard can this be, we’ve been doing it for years and somehow I just now get the error described below…

In the HTML5 client the deployment just fails with no error. The failed task shows the following message:

Transfer failed: The OVF descriptor is not available

Same issue in different browsers. I’d been deploying this OVA on other vCenters before with no issue but whatever, I tried the flash (flex) client, you never know these days…

In the flex client at least I would get a description. The helpful kind that VMware loves so much:

The operation failed for an undetermined reason. Typically this problem occurs due to certificates that the browser does not trust. If you are using self-signed or custom certificates, open the URL below in a new browser tab and accept the certificate, then retry the operation.

https://vCenter-FQDN

If this does not resolve the problem, other possible solutions are shown in this KB article: 2147256.

At this point I know this is not going to help because my vCenter certificate is issued by a CA and the root is trusted. I tried what the KB mentions but it did nothing.

Credits to Sasha_G. for the solution in this VMTN. That’s right, I was using the short name to access vCenter (which is in the SAN of my certificate by the way). I tried with the FQDN and it worked.

Turns out the error description contained the solution all along (Not on purpose though -> see url). Now I have no idea how I managed to live that long without ever encountering this issue, I guess I don’t use short names as I often as I thought…

We’d prefer it if you saw us at our best.

Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

  • Google Chrome
  • Mozilla Firefox
  • Microsoft Edge


Close Deprecation Notice


Close Deprecation Notice

Понравилась статья? Поделить с друзьями:
  • Error failed to open display
  • Error failed to open apk database permission denied
  • Error failed to mount fridge error 0x2 windows 10
  • Error failed to mount dev loop0
  • Error failed to lookup view error in views directory