Copying a template from an ESX host to a remote ESX host in a different datacenter using SCP
search cancel

Copying a template from an ESX host to a remote ESX host in a different datacenter using SCP

book

Article ID: 302722

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides instructions to copy a template from one ESX host to another ESX host in a different datacenter using SCP.


Symptoms:


Resolution

To copy a template from one ESX host to another ESX host in a different datacenter using SCP:
  1. Log in to the ESX host as root using an SSH client.
  2. Verify that the SSH client is allowed through the firewall on the ESX host with the command:

    # esxcfg-firewall -q

    Look for the sshClient in the Allowed Services string.
  3. If the SSH client is not allowed, enable it with the command:

    # esxcfg-firewall -e sshClient
  4. Change to the datastore that has the template with the command:

    # cd /vmfs/volumes/<datastore_name>
  5. Verify that the remote root connection is allowed on the destination ESX host. For more information, see 

  6. Run the scp command:

    # scp -r <template_directory_name> <destination_host>:/vmfs/volumes/<destination_datastore_name>
  7. Accept the SSH keys if necessary, and provide the root login credentials. The copy process begins.