You can deploy an airgap server VM directly to the VMware Telco Cloud Automation environment. But to make the airgap server VM deployable across multiple airgap environments, export the airgap VM to be a virtual appliance and upload it to a local file server. This section lists the steps to export the airgap server virtual appliance.

1. (Optional) Clear Docker cache and remove Docker cache disk.

If the airgap server is configured with multiple disks and one disk is for the Docker cache, it is recommended to clear the cache and remove the Docker cache disk before exporting the airgap server to OVA. This step reduces the final size of the OVA.
Note: Clearing the Docker cache will unmount the Docker cache disk and you cannot run setup.yml. To avoid this issue, it is recommended to create a snapshot of the airgap VM before performing this operation.
To clear the Docker cache, run following Ansible Playbook command. This command will remove all unused the Docker images and move all the Docker files to the image disk ( /data/docker).
root@photon-machine [ ~/airgap ]# scripts/bin/run.sh clear

2. Prepare tools and free disks.

Exporting a VM requires installation of VMware Open Virtualization Format Tool (VMware OVF Tool). This tool supports Windows, Linux, and Mac OS platforms. For steps to install VMware OVF Tool on your client where you export the airgap server virtual appliance before starting to export the VM, see https://developer.vmware.com/web/tool/4.4.0/ovf. For this example, we use the Linux platform. However, the command line options are the same for all the platforms.

3. Log in to vCenter Server.

Before exporting the VM, log in to vCenter Server and verify the name of the data center and the airgap server VM. For this example, we use the following information:
  • vCenter Server name: vcenter-airgap.example.com
  • vCenter Server credentials: [email protected] / abcd1234
  • Data center name: Datacenter
  • Airgap server VM name: airgap-ova

4. Log in to the client desktop and export the OVA.

For example,
mkdir export-ova
cd export-ova
ovftool vi://[email protected]:'abcd1234'@vcenter-airgap.example.com/Datacenter/vm/airgap-ova ./airgap-ova.ova

5. Package the exported OVA into multiple blocks.

If the size of the OVA is large, you can split it into multiple blocks. This makes it easier to carry the OVA to the airgap environment and import. To split the OVA into blocks, run the following command on the client where you exported the OVA:
tar cvzf - airgap-ova.ova | split --bytes=1GB - airgap-ova.tar.gz.
Note: You can set the block size according to your requirement.

6. Merge the blocks back to OVA.

After the split step, copy the tar.gz.* files to the client in the airgap environment. Then merge them back into an OVA.
cat airgap-ova.tar.gz.* | tar xzvf -

After merging the OVA, you can either import the OVA from the local datastore to vSphere, or upload it to the local NFS server, and import to create a new airgap server from it. If the import succeeds, you can safely delete the block files of .tar.gz.*.

7. (Optional) Import the OVA to vCenter Server using the VMware OVF Tool.

You can also import the airgap VM OVA using the VMware OVF Tool. Ensure that you have installed the VMware OVF Tool. Before using the tool, log in to vCenter Server and note down the airgap VM details. For this example, we use the following details:
  • vCenter Server name: vcenter-new.example.com
  • vCenter Server credentials: [email protected] / ABCD5678
  • Datacenter name: Datacenter-new
  • Cluster name: airgap_cluster
  • Datastore name: vsanDatastore
  • Airgap server VM name: Import-airgap-ova
  • Network name: VM Network
  • VM folder: AIRGAP
To import the OVA, run:
ovftool --noSSLVerify --disableVerification --allowExtraConfig --X:enableHiddenProperties --X:injectOvfEnv --X:logFile=./airgapDeploy.log --X:logLevel=verbose --name="Import-airgap-ova" --datastore="vsanDatastore" --network="VM Network" --vmFolder="AIRGAP" --diskMode=thin "airgap-ova.ova" vi://[email protected]:'ABCD5678'@vcenter-new.example.com/Datacenter-new/host/airgap_cluster/