You can clean up replications and replication tunnels that you no longer need from vCloud Director by using vCloud Availability Installer Appliance scripts.

Cleanup Replications from vCloud Director

To clean up replication from vCloud Director, you must first get a list of all replication pairs of a specific type and then delete a replication pair that you no longer need.

To list all replications of a specific type, run the following command:

Standard Command

Command Using Registry

# vcav vcd list-replications \
--org=vdc_org1 \
--type='to-the-cloud' \
--vcd-address=$VCD_ADDRESS \
--vcd-user=$VCD_USER \
--vcd-password-file=~/.ssh/.vcd
# vcav vcd list-replications \
--org=vdc_org1 \
--type='to-the-cloud' \
--vcd=vcd-01-name

You can set the replication type to to-the-cloud or from-the-cloud.

If your vCloud Director is not listening on the default TCP port(443), specify the port number by adding the --vcd-port=port-number argument to the command.

The system returns the following:

replication-pair-name1 - OK
replication-pair-name2 - OK
replication-pair-name3 - OK

After you get a list of all replications of a specific type, you can delete a replication pair by running the following command:

Standard Command

Command Using Registry

# vcav vcd delete-replication \
--org=vdc_org1 \
--type='to-the-cloud' \
--name=replication-pair-name1 \
--vcd-address=$VCD_ADDRESS \
--vcd-user=$VCD_USER \
--vcd-password-file=~/.ssh/.vcd
# vcav vcd delete-replication \
--org=vdc_org1 \
--type='to-the-cloud' \
--name=replication-pair-name1 \
--vcd=vcd-01-name

The system returns an OK message upon successful deletion of a replication pair.

Cleanup Replications Tunnels from vCloud Director

To clean up replication tunnels from vCloud Director, you must first get a list of all replication tunnels and then delete the ones that you no longer need.

To list all replication tunnels, run the following command:

Standard Command

Command Using Registry

# vcav vcd list-tunnels \
--type='to-the-cloud' \
--vcd-address=$VCD_ADDRESS \
--vcd-user=$VCD_USER \
--vcd-password-file=~/.ssh/.vcd
# vcav vcd list-tunnels \
--type='to-the-cloud' \
--vcd=vcd-01-name

You can set replication tunnel type to to-the-cloud or from-the-cloud.

If your vCloud Director is not listening on the default TCP port(443), specify the port number by adding the --vcd-port=port-number argument to the command.

The system returns the following:

<ns0:ToCloudTunnelRecord xmlns:ns0="http://www.vmware.com/vcloud/v1.5" destinationHost="destination-host-ip" 
destinationId="52c0c1-f36b-23bc-f154-80e1aea4b89a" destinationPort="31031" 
href="https://$VCD_ADDRESS/api/hybrid/toCloudTunnel/replication-tunnel-id" 
org="https://$VCD_ADDRESS/api/org/63dc234c-631f-4b8f-8179-faf5aea31c3b" trafficType="hb useSsl="false" />

After you get a list of all replication tunnels of a specific type, you can delete a particular replication tunnel by running the following command:

Standard Command

Command Using Registry

# vcav vcd delete-tunnel \
--type='to-the-cloud' \
--id=replication-tunnel-id \
--vcd-address=$VCD_ADDRESS \
--vcd-user=$VCD_USER \
--vcd-password-file=~/.ssh/.vcd
# vcav vcd delete-tunnel \
--type='to-the-cloud' \
--id=replication-tunnel-id \
--vcd=vcd-01-name

The system returns an OK message upon successful deletion of a replication tunnel.