VMware automatically deploys/exports templates with Ovftool

Source: Internet
Author: User

First, Introduction

The OVF (Open virtualization format) is a specification of a virtual appliance that is defined by a number of virtualization vendors and hardware vendors, and the OVF-formatted virtual appliance (which is actually some files) can be used by multiple virtualized software devices and import into a virtualized environment. such as VMware, XenServer, VirtualBox and so on. OVF typically consists of several parts, namely OVF files, mf files, cert files, vmdk files, and ISO files. The OVF (Open Virtualization format: Open virtualization) and the OVA (open virtualization Appliance: Opening Virtualization Appliance) contain all the necessary information for deploying virtual machines. Many software vendors now often use a virtual device that is packaged directly into an OVF or OVA format to be imported into a virtualized environment, such as VMware, Riverbed, and many other companies that have products published in this way, which facilitates user deployment.

VMware offers the ability to deploy and export ovf, OVA templates, sometimes in the case of a manual deployment or an error in the deployment process, especially if a sudden interruption in large file deployment is a headache, here is a tool: Ovftool.

The official website offers multiple versions of the download, which are recommended for use on Linux and Mac, followed by specific download links.

Second, installation

Example of a Linux version:

After downloading, the direct SH operation can be:

[Email protected]:~# sh vmware-ovftool-4.1.0-2459827-lin.x86_64.bundle

Third, the use

Ovftool installation is ready to use, its Userguide document provides a lot of optional parameters, here is a common (deployment Ovf/ova) example, the basic can be tried on most:

[Email protected]:~# ovftool--x:loglevel=verbose--x:logfile=/root/ovflog--nosslverify--ACCEPTALLEULAS-DM=THIN-VF =templates-ds=pod1-template/data/mytemplate-centos6.3-64bit.ova #要部署的ova模板文件 ' vi://username:password* @MyVC/pod1 ( MYDC)/host/clu01/pod1-clu01-h001.jx.local '

Detailed parameters:

--x:loglevel: Defines the level of log;

--x:logfile: Defines the log file location;

--nosslverify: Skipping the SSL authentication of the vsphere connection;

--acceptalleulas: Accept the licenses of all users;

-DM (--diskmode): Disk type, generally choose thin provisioning, if not add this parameter, the default hard disk thick provisioning type;

-VF (--vmfolder): The target directory of the template deployment, I assume here to deploy to the templates directory;

-ds (--datastore): Target storage location for template deployment

vi://: The full name "VMware Infrastructure", a command-line option for communicating with data centers, was originally a term for ESX version 3. Format: "Username:[email protected] Name/data center name/host/Specify host"


which

MYVC is the name of vcenter;

POD1 (MYDC) is the name of the data center;

Host after the template deployment target host location, CLU01 represents the cluster, pod1-clu01-h001.jx.local is a host under the cluster;

It is important to note that DNS is set up here , or it can be replaced with an IP address, such as:

Vi://username:[email protected]/?ip=192.168.100.1 '

192.168.1.1 is the address of vcenter, 192.168.100.1 is the IP address of the target host;

This connection to Vcenter can also be used in the form of HTTP, detailed in the official documentation.

Iv. Automatic Deployment

If you have more than one OVA file, you can simply add a for loop with the shell script when you deploy it automatically, for example:

#!/bin/bashfilename= ' find/data/template/-name *.ova ' # Find all OVA templatefor OVA in $filenamedo/usr/bin/ovftool--X:l Oglevel=verbose--x:logfile=/root/ovflog-' Date +%y%m%d '--nosslverify--acceptalleulas-dm=thin-vf=templates-ds= Pod1-template ' echo $ova ' vi://username:password* @MyVC/pod1 (MYDC)/host/clu01/pod1-clu01-h001.jx.local ' Continuedone

Here are the current official documentation links:

Https://www.vmware.com/support/developer/ovf/ovf410/ovftool-410_userguide.pdf

In addition Ovftool can be downloaded on the VMware website, before the download need to register an account, download links as follows:

https://my.vmware.com/cn/web/vmware/details?downloadGroup=OVFTOOL410&productId=491




This article is from "Jason's blog" blog, please be sure to keep this source http://xujunxian.blog.51cto.com/8614409/1767701

VMware automatically deploys/exports templates using Ovftool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.