PowerVSで、従来の接続方式 Cloud Connections(Direct Link) で接続いただいており、下記手順でPERへの切替を実施した場合、期待通りであれば、PERに切替後、後処理(per-migrate-validateコマンド)の中で、Cloud Connections(Direct Link) も削除されます。
https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-per#migrate-per
一方、何らかの理由で、Cloud Connections(Direct Link) が消えないで残ってしまう場合があります。
そして、Direct Link画面から削除しようとしても、読み取り専用になっていてポータルからの操作では削除できない場合があります。
この Direct Link は読み取り専用です。 リンク固有のアクションは、サービス・プロバイダー・ポータルを介して開始する必要があります。
こうした場合、従来はcaseを起票して削除依頼する必要がありましたが、2025年5月の新機能として、CLIコマンドでユーザー側からCloud Connections(Direct Link) を削除できるようになりました。
If you have existing IBM Cloud Connections that are managed from non-PER enabled workspaces, you can now view and delete them using the IBM Cloud CLI or API from a PER-enabled workspace.
下記の手順で実施します。
該当リージョンのワークスペースをターゲットとして指定する。ワークスペースを消してしまってCloud Connections(Direct Link) だけが残っている状況もありますが、Cloud Connectionsを作成した元のワークスペースそのものでなくても、同じリージョンのワークスペースであればOKです。
$ ic pi ws target 【対象PowerVSワークスペースのCRN】
ibmcloud pi cc ls
コマンドで、該当Cloud ConnectionsのIDを確認。
$ ic pi cc ls
Listing cloud connections under account xxx as user xxxxx...
ID Name Link Status Creation Date Global Routing IBM IPAddress User IPAddress Speed Port Metered
f4e4b0d9-6df3-4bcd-9cba-c5c64e84557e cc-fra established 2023-09-26T07:54:40.186Z true 10.254.0.2/30 10.254.0.1/30 50 4f0f5913-1c9b-46fe-8f71-0b976927f287 true
$
ibmcloud pi cc del
コマンドで、上記で確認したIDを指定して、Cloud Connectionsを削除実行。
コマンドを発行すると、すぐにジョブIDが返ってきます。このジョブがバックグラウンドで進み、Cloud Connections(Direct Link)の削除が行われます。おおよそ5〜10分でジョブが完了し、Direct Linkが削除されます。
$ ic pi cc del f4e4b0d9-6df3-4bcd-9cba-c5c64e84557e
Deleting cloud connection f4e4b0d9-6df3-4bcd-9cba-c5c64e84557e under account xxx as user xxxxx...
Job ID a22eae47-e07a-4348-a7d6-a2d5ad637f7c
Job Link pcloud/v1/cloud-instances/14f5c41cad8c414aba785a617e2deec4/jobs/a22eae47-e07a-4348-a7d6-a2d5ad637f7c
$
ジョブの状況は、ibmcloud pi job lsで確認できます。下記は、正常にcompletedになっています。
$ ic pi job ls
Listing jobs under account xxx as user xxxxx...
Job ID a22eae47-e07a-4348-a7d6-a2d5ad637f7c
Creation Timestamp 2025-06-18T06:25:07.579Z
Operation ID f4e4b0d9-6df3-4bcd-9cba-c5c64e84557e
Operation Target cloudConnection
Operation Action delete
State completed
Progress delete-cloud-connection
Message
$
Direct LinkからClassicやVPCに直接接続している場合、仮想接続が存在しても「ibmcloud pi cc del」で削除可能です。
一方、もしDirect Linkが”Transit Gatewayタイプ”で作られていて、Transit Gatewayに接続されている場合、「ibmcloud pi cc del」が行えない場合があります。
この場合、ジョブが数分後にfailedで完了します。
Transit GatewayからDirect Linkを切断した後、再度「ibmcloud pi cc del」を実施することで、削除可能です。
$ ic pi job ls
Listing jobs under account xxx as user xxxxx...
Job ID 55525feb-32c1-49f3-ac1c-a01d3455154a
Creation Timestamp 2025-06-18T06:53:46.014Z
Operation ID 2968fa1e-2b25-456c-ae13-510cf035896f
Operation Target cloudConnection
Operation Action delete
State failed
Progress delete-cloud-connection
Message unable to delete cloud-connection 2968fa1e-2b25-456c-ae13-510cf035896f for cloud-instance 10c4b10a0a4d4c5bb30cffa8e50d8a1f: {"Payload":{"errors":[{"code":"bad_request","message":"Cannot delete virtual connection as gateway is attached as a connection to Transit gateway. Delete virtual connections associated with this gateway from Transit.","more_info":"https://cloud.ibm.com/apidocs/direct_link#error-handling"}],"trace":"996f3c19-1ffe-4891-b89e-0a212643f6c7"}}
削除が正常に行われると、下記のDirect Link画面から該当Direct Linkが削除されます。
https://cloud.ibm.com/interconnectivity/direct-link
以上