OVFTool 4.1 vmdk格式换成OVF格式

OVFTool 4.1

  • New Features in OVFTool 4.1
  • Known Issues
  • System Requirements
  • Installation
  • Deprecated Features

New Features in OVFTool 4.1

There are no new features in version 4.1 of the OVF Tool.

Known Issues in Version 4.1

You can not use the OVF Tool to deploy a VM to static DVS port group.

To work around this issue:

  1. Use vCenter Server to create an ephemeral port on the desired network.
  2. Deploy the appliance to that port group on an ESXi host.
  3. Switch the appliance over to that static port group.
  4. Use vCenter Server to delete the ephemeral port group.

System Requirements for Version 4.1

The OVF Tools supports the following operating systems and software.

Supported Operating Systems

Supported Operating Systems include:

Microsoft Windows

The OVF Tool supports the following Windows 32-bit (x86) and 64-bit (x86_64) operating systems:

  • Windows Vista
  • Windows Server 2008
  • Windows 7
  • Windows Server 2012
  • Windows 8

Linux

The OVF Tool supports the following Linux operating systems:

  • CentOS 5.x and 6.x
  • Fedora Core 14.x, 15.x, 16x, 17x, and 18x
  • RedHat Enterprise Linux (RHEL) 5.x and 6.x
  • SUSE Enterprise Server 10.x and 11x
  • Ubuntu Desktop 9.x, 10.x, 11x, and 12x

Apple

The OVF Tool supports the following Mac OS X 64 bit operating systems:

  • Mac OS X 10.7
  • Mac OS X 10.8

Supported VMware Products and Platforms

Version 4.1 of the OVF Tool supports the following VMware software:

  • Packages created with previous OVF Tool versions 4.0.0, 3.5.2, 3.5.1, 3.5.0, 3.0.1, 2.1, 2.0, and 1.1 and is backward compatible with OVF format from versions 1.0 and 0.9.
  • vSphere 4.0 and later
  • vCloud Director 6.0, 5.5, 5.1, 1.5, and 1.0 (source from OVF or OVA types only)
  • vCloud Suite 6.0 and 5.5
  • VirtualCenter 2.5 and later
  • ESX 3.5 and later
  • VMware Server 2.0 and later
  • VMware Workstation 6.0 and later
  • VMware Fusion 3.0 and later
  • vApprun 1.0
  • OVF 0.9 is supported for import and export by VirtualCenter 2.5 and later, and ESX 3.5 and later
  • VMware Studio 1.0 and later can generate OVF packages.

OVF support is built into the vSphere Client that installs from, and is compatible with vCenter 5.0 and ESXi 5.0, vCenter 4.0 and ESX 4.0. It is also built into the vSphere Client that installs from and is compatible with VirtualCenter 2.5 and later, and ESX 3.5 and later. The vSphere 5.1 Web Client includes the 3.x version of the VMware OVF Tool as part of the Client Integration Plug-in.

Space Requirements for OVF Packages

A virtual machine is stored as a set of files on disk. In the VMware runtime format, these files have extensions .vmx, .vmdk, .vmsd, .vmxf, and .nvram. The VMware hypervisor requires these file formats, which are optimized for efficient execution. An ESXi host often uses fully allocated flat disks in a VMFS file system to optimize virtual machine performance.

The OVF standard supports efficient, secure distribution of vApps and virtual machine templates. OVF is optimized for these goals, rather than for efficient runtime execution. OVF does not include specific information on runtime disk format because such information is not required until the virtual machine is deployed. When you package appliances with OVF, you can optimize one vApp for high performance in a production environment, and optimize another for minimal storage space during evaluation.

The following table contrasts a virtual machine in VMware file format with a virtual machine in OVF format. OVF employs a compressed sparse format for VMDK files. Virtual disks in that format cannot be used directly for execution without conversion.

  VMware Format OVF Format OVA Format
Files
  • LinuxBasedAppliance.nvram
  • LinuxBasedAppliance.vmdk
  • LinuxBasedAppliance-s001.vmdk
  • LinuxBasedAppliance-s002.vmdk
  • LinuxBasedAppliance.vmsd
  • LinuxBasedAppliance.vmx
  • LinuxBasedAppliance.vmxf
  • LinuxBasedAppliance.ovf
  • LinuxBasedAppliance-0.vmdk
  • LinuxBasedAppliance-1.vmdk
  • LinuxBasedAppliance-2.vmdk
  • LinuxBasedAppliance.ova
    Total Size
  • 251MB using thin provisioning
  • 4000MB using thick provisioning
  • 132MB 132MB

    Installing the OVF Tool

    1. Download the VMware OVF Tool as an installer or an archive (zipped/compressed) file:
      Operating System Download Filename
      Linux 32 bit VMware-ovftool-4.1.0-10936-lin.i386.bundle
      Linux 64 bit VMware-ovftool-4.1.0-10936-lin.x86_64.bundle
      Mac OS X 64 bit VMware-ovftool-4.1.0-10936-mac.x64.dmg
      Windows 32 bit VMware-ovftool-4.1.0-10936-win.i386.msi
      Windows 64 bit VMware-ovftool-4.1.0-10936-win.x86_64.msi
    2. Install software from the table above using the appropriate method for your operating system:
    Operating System Download Filename
    Linux 32 bit Run the shell script as ./VMware-ovftool-4.1.0-10936-lin.i386.bundle
    Linux 64 bit Run the shell script as ./VMware-ovftool-4.1.0-10936-lin.x86_64.bundle
    Mac OS X 64 bit Open the .dmg file and double-click the package installer.VMware-ovftool-4.1.0-10936-mac.x64.dmg
    Windows 32 bit Double-click on the installation file, VMware-ovftool-4.1.0-10936-win.i386.msi
    Windows 64 bit Double-click on the installation file, VMware-ovftool-4.1.0-10936-win.x86_64.msi

    Completing the Installation Steps

    The following list gives you screen-by-screen instructions for all installations:

    1. At the Welcome screen, click Next.
    2. At the license agreement, read the license agreements, select “I agree...” and clickNext.
    3. Accept the path suggested or change to a path of your choice and click Next.
    4. When you have finished choosing your installation options, click Install.
    5. When the installation is complete, click Next.
    6. Deselect Show the readme file if you do not want to view the readme file, and click Finish to exit.

    Running the OVF Tool from a Windows Command Line

    After installing the OVF Tool on Windows, you can run the OVF Tool from the Windows command line.

    1. From the Start menu, choose Run.
    2. In the Run dialog, write cmd, which opens the Windows command line console (DOS prompt).

    If you have the OVF Tool folder in your Path environment variable, you can run the OVF Tool from the command line.

    Adding the OVF Tool to your Path Environment Variable

    The following instructions are for Windows 7, but the steps are similar on other Windows systems.

    1. Right-click My Computer.
    2. Select Properties.
    3. Select Advanced system settings.
    4. Select Environment Variables.
    5. Highlight (select) the Path variable from the System variable (lower) pane.
    6. Click the Edit button and then type the path to the folder where you installed the OVF Tool (at the end of the existing path).

    Specifying the Inventory Path

    The OVF Tool allows you to specify an inventory path for a source or target.

    Inventory Path to a VM

    You can specify an inventory path to a specific virtual machine.

    The following example shows an inventory path to a virtual machine without any folders:MyDatacenter/vm/MyVM

    The following example shows an inventory path with two nested folders: MyDatacenter/vm/Folder 1/Sub Folder/MyVM

    The use of the vm tag after the datacenter name specifies that you are locating a virtual machine or vApp in the VM and Template view. Use the host tag after the datacenter name if you are locating a virtual machine or vApp in the Host and Clusters view.

    Inventory Path to a Cluster, Host, or Resource Pool

    You can specify an inventory path for a host or a resource pool. You can nest resource pools similar to folders.

    To specify an inventory path for a host or a resource pool as part of target locators, use the following syntax:/host//Resources/

    Using the example above, the following rules apply:

    • host is a fixed part of the path
    • Resources is a fixed part of the path, but is only specified when using a resource pool
    • <resource pool>can take the value of one or more nested resource pools. If no resource pools are specified, the default resource pool for the host is used.

    You must specify the /host/ section of an inventory path when using a vi destination locator. If you are specifying the destination of a resource pool, you must include the/Resources/ section of the path.

    The following example is of an inventory path without a specified resource pool:vi://username:pass@localhost/my_datacenter/host/esx01.example.com

    The following example is of an inventory path with a specified resource pool: vi://username:pass@localhost/my_datacenter/host/esx01.example.com/Resources/my_resourcepool

    Using Partial Locators

    When using the OVF Tool, it is often not necessary to specify source and target types as long as certain filename conventions are used. It is possible to the ignore locator type and specify the source and target explicitly using the arguments--sourceType=... and --targetType=.

    The OVF Tool assumes the locator type based on the following rules:

    1. If the name starts with vcloud://, OVF Tool assumes vCloud Director type.
    2. If the name starts with vi://, OVF Tool assumes vSphere type.
    3. If the name ends with .ovf, OVF Tool assumes OVF type.
    4. If the name ends with .vmx, OVF Tool assumes VMX type.
    5. If the name ends with .ova, the OVF tool assumes OVA type.
    6. If the locator is a file path to a directory that represents a vApprun workspace or an entity in a vApprun workspace, then OVF Tool assums the vApprun type.

    Similarly, source and target types can be inferred from folder locators. OVF Tool assumes the type according the following rules:

    1. If the source locator is a folder, the OVF Tool assumes that the source is an OVF package and that the OVF descriptor has the same name as the folder. For example,my-ovf/my-ovf.ovf.
    2. If the source is an OVF package and the target locator is a directory, such asMyVirtualMachines/, the OVF Tool assumes that the target is a VMX locator. The resulting VMX/VMDK file is added to in a directory with the target name, for example,MyVirtualMachines/MyVM/MyVM.vmx.
    3. If the source is a VMX locator and the target locator is a directory, the OVF Tool assumes that the target is an OVF package.
    4. If the source is a vSphere locator, and the target locator is a directory, the OVF Tool assumes that the target is an OVF package.

    OVF Tool supports partial vSphere locators when deploying or exporting. For an incomplete locator path, the tool suggests completions at the command line. The following example shows the command-line dialog when partial locators are used.

    Example 1 - Partial VMware Locators on the Command Line

    > ovftool LAMP.ovf vi://localhost/
    Opening source: LAMP.ovf
    Opening target: vi://user@localhost/
    Error: Found wrong kind of object (Folder)
    Possible completions are:
      Datacenter/
      Remote Datacenter/
      Secondary Datacenter/
    
    > ovftool LAMP.ovf vi://localhost/Datacenter
    Opening source: LAMP.ovf
    Opening target: vi://user@localhost/Datacenter
    Error: Found wrong kind of object (Datacenter)
    Possible completions are:
      vm/
      host/
    
    > ovftool LAMP.ovf vi://localhost/Datacenter/host
    Opening source: LAMP.ovf
    Opening target: vi://user@localhost/Datacenter/host
    Error: Found wrong kind of object (Folder)
    Possible completions are:
      host1.foo.com/
      host2.foo.com/
    
    > ovftool LAMP.ovf vi://localhost/Datacenter/vm/host1.foo.com
    

    The OVF Tool supports partial vSphere locators when deploying or exporting. For an incomplete locator path, the tool suggests completions at the command line. Example 2 shows the command-line dialog when partial locators are used. First, the OVF Tool signals that there is more than one virtual datacenter present, then multiple catalogs, then multiple networks. At each attempt, you must select one of the options that the OVF Tool presents.

    Example 2 - Partial vCloud Director Locators on the Command Line

    ovftool LAMP.ovf vcloud://jd:[email protected]:443/?org=myOrg&vapp=test1
    Opening OVF source: LAMP.ovf
    Warning: No manifest file
    Opening vCloud target: vcloud://js:[email protected]:443/
    Error: Multiple VDCs found. Possible VDC completions are:
      orgVdc
      orgVdc2
    Completed with errors
    
    ovftool LAMP.ovf "vcloud://jd:[email protected]:443/?org=myOrg&vapp=test1&vdc=orgVdc"
    Opening OVF source: LAMP.ovf
    Warning: No manifest file
    Opening vCloud target: vcloud://js:[email protected]:443/
    Error: Multiple catalogs found. Possible catalog completions are:
      catalog
      catalog2
    Completed with errors
    
    "vcloud://jd:[email protected]:443/?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog"
    Opening OVF source: LAMP.ovf
    Warning: No manifest file
    Opening vCloud target: vcloud://js:[email protected]:443/
    Error: Multiple networks found on target. Possible completions are:
      extNet2
      extOrgNet
      intNet2
     intnet
    Completed with errors
    
    ovftool --net:"VM Network=intnet" LAMP.ovf "vcloud://jd:[email protected]:443/
    ?org=myOrg&vapp=test1&vdc=orgVdc&catalog=catalog"
    Opening OVF source: LAMP.ovf
    Warning: No manifest file
    Opening vCloud target: vcloud://js:[email protected]:443/
    Deploying to vCloud: vcloud://js:[email protected]:443/
    Disk Transfer Complete
    Completed successfully
    

    For more information and examples about partial locators, see the “Partial Locators” section of the OVF Tool User's Guide.

    Using Configuration Files

    The OVF Tool has many configuration options. You can create a configuration file, so that you don't have to type long configuration entries on the command line. A configuration file uses the following syntax:

    option1=value
    ...
    #comment
    optionN=value
    

    The following is an example of a configuration file:

    proxy=http://proxy.example.com
    datastore=storage-test42
    # Comment on something
    locale=dk
    

    You can create local or global configuration files. A local configuration file has the .ovftool suffix and is read in the folder from which you invoke the OVF Tool. A global configuration file is per user.

    On Windows, the global configuration file is read from the following location:C:\Documents and Settings\$USERNAME\VMware\ovftool.cfg

    On Linux, the global configuration file is read from the following location:$HOME/.ovftool

    When using configuration files, globally defined options are overwritten by locally defined and command-line options. Locally defined options are overwritten by command-line options.

    You can also use the ovftool --help config command to get information about how to use a configuration file.

    See the OVF Tool User's Guide for more information about how to use the OVF Tool.

    Deprecated Features

    There are no deprecated features in version 4.1 of the OVF Tool, but support for Windows XP and Windows Server 2003 has been discontinued.

     


    你可能感兴趣的:(OVFTool 4.1 vmdk格式换成OVF格式)