IBM Cloud Docs
Using OVFTool to import VMs to VCF as a Service

Using OVFTool to import VMs to VCF as a Service

The IBM Cloud® for VMware Cloud Foundation as a Service is a powerful platform to manage virtualized resources and to facilitate the creation of flexible cloud environments. The VMware Open Virtualization Format Tool (OVFTool) simplifies the tasks of deploying and configuring virtual appliances within the VMware Cloud Director system.

This tutorial provides an overview of using OVFTool to manage virtual appliances on VMware Cloud Director.

Objectives

The objective of this tutorial is to demonstrate the basic steps to import an OVA image from your on-premises environment into a VMware Cloud Foundation (VCF) as a Service single-tenant or multitenant instance after initial provisioning.

This tutorial takes approximately 20-30 minutes to complete and assumes that a VCF as a Service instance and a virtual data center (VDC) are provisioned.

In this tutorial, you will learn:

  • How to create a local user in a VMware Cloud Director instance.
  • How to import an OVA image into a VMware Cloud Director instance by using OVFTool.

Before you begin

OVFTool is available without charge. You need to create a VMware account to download OVFTool.

This tutorial requires:

Creating a local username and password in VMware Cloud Director

A local user in this tutorial is used to authenticate when you import the OVA into the VCF as a Service instance.

To create a local username and password in VMware Cloud Director, complete the following steps:

  1. Log in to the VCF as a Service instance with a user that has the Organization Administrator role.
  2. In the navigation bar, click Administration.
  3. In the left pane, under Access Control, click Users.
  4. Next to the list of users, click New.
  5. Enter a username and password for the user. The minimum password length is 6 characters.
  6. From the list of predefined roles, select the Organization Administrator role to assign to the user.
  7. Click Save.

Uploading an OVA image into a VDC

To upload an OVA image into a VDC, complete the following steps:

  1. Install OVFTool on your local computer.
  2. To upload a VM image into a vDC, use the following command. After upload, the VM image appears in a vApp and is ready for configuration.
ovftool -tt=vCloud c:\LOCAL_FILEPATH\FILE_NAME.ova “vcloud://ORG_USER@VCLOUD_URL/cloud?org=ORG_NAME&vdc=VDC_NAME&vapp=VAPP_NAME”

In the previous command, replace the variables with the following values:

  • LOCAL_FILEPATH is the absolute file path that contains the OVA image.
  • FILE_NAME is the name of the OVA image.
  • ORG_USER is the local username (local) to log in to VMware Cloud Director. OVFTool prompts you for the password.
  • VCLOUD_URL is the URL that you use to log in to VMware Cloud Director. Use only the domain name, for example, https://dirw003.us-east.vmware.cloud.ibm.com/.
  • ORG_NAME is the full name of your VMware Cloud Director organization.
  • VDC_NAME is the full name of your VDC.
  • VAPP_NAME is the name of the destination vApp.

Example command:

.\ovftool.exe -tt=vCloud c:\test-image.ova vcloud://local-admin@"dirw003.us-east.vmware.cloud.ibm.com/cloud?org=xxxxxa&vdc=yyyyyo&vapp=demoApp"
Opening OVA source: c:\test-image.ova
The manifest validates
Enter login information for target vcloud://dirw003.us-east.vmware.cloud.ibm.com/xxxxxx
Username: local-admin
Password: **********
Opening vCloud target: vcloud://local-admin@dirw003.us-east.vmware.cloud.ibm.com:443/cloud
Deploying to vCloud vApp: vcloud://local-admin@dirw003.us-east.vmware.cloud.ibm.com:443/cloud
Transfer Completed
Completed successfully

The result is a vApp within the VCF as a Service instance that can be started.