将ovf格式转为ova格式

OVF是一个包含描述文件.ovf和镜像文件的文件夹,而OVA是OVF文件夹内容的tar包,扩展名为.ova。转换时需要注意tar包内文件顺序需遵循OVF格式规范,确保导入VMware时不报错。参考链接提供了详细顺序要求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

网上有许多资料介绍ovf格式和ova格式是什么,这里不在重复,简单来说,ovf 是一个文件夹下有多个文件(包括描述文件.ovf和镜像文件),ova是将ovf文件夹下的文件打为tar包,只不过扩展名为ova.

进入ovf文件夹,这样打包可以吗?

tar cf  V.ova   *

不行,导入vmware时会报错:第一文件不是ovf文件。实际上,ova格式对tar包内文件的顺序是有要求的。具体见Open Virtualization Format Specification. 后面贴出来相关部分供参考。
我是这样打包的:

tar  ovf文件  镜像文件

如果有多个文件,则文件顺序按照ovf文件中References 节列出文件的顺序


参考:
http://www.dmtf.org/sites/default/files/standards/documents/DSP0243_2.1.1.pdf

In addition, the entries shall be in one of the following orders inside the OVF package:

  1. OVF descriptor
  2. The remaining files shall be in the same order as listed in the References section (see7.1). Note that any external string resource bundle files for internationalization shall be
    first in the References section (see clause 10).

or

  1. OVF descriptor
  2. OVF manifest
  3. OVF certificate
  4. The remaining files shall be in the same order as listed in the References section (see 7.1). Note that any external string resource bundle files for internationalization shall be
    first in the References section (see clause 10).

or

  1. OVF descriptor
  2. The intermediate files shall be in the same order as listed in the References section (see 7.1). Note that any external string resource bundle files for internationalization shall be
    first in the References section (see clause 10).
  3. OVF manifest
  4. OVF certificate

The ordering restriction ensures that it is possible to extract the OVF descriptor from a compressed OVF package without scanning the entire archive. The ordering restriction enables the efficient generation of a compressed OVF package-

A compressed OVF package shall be created by using the TAR format that complies with the USTAR (Uniform Standard Tape Archive) format as defined by the ISO/IEC/IEEE 9945:2009

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值