Migrate "manually configured Direct Link 2.0" environment to PER environment in PowerVS

# Introduction
This article describes the procedure for migrating a PowerVS environment connected to an x86 IaaS (VPC or Classic) with "Manually configured Direct Link 2.0" to a PER environment.

:::note warn
The "Automatically configured Cloud Connection" cannot be migrated to PER using this procedure.
:::

Essentially, we can migrate to PER environment by following the docs below.
https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-migrate-ws-per

# Considerations for migrating to PER-enabled workspace
As described in the docs, in workspaces migrated using this procedure, it is necessary to create a case and have support staff modify the network configurations when adding, updating, or deleting subnets. Please note that what can be done by self-service in the workspace before migration or in a newly created PER-enabled workspace will require a request by a case in a migrated workspace.
https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-migrate-ws-per#add-info-per-mig

# Create a support case and request transfer to PER.

My initial configuration is shown in the figure, with Direct Link 2.0 connecting PowerVS to VPC.
Transit Gateway is not used.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/a182e8a2-b1c4-40bf-dc12-f4e321a4dfb4.png)


Create a case as per the docs, providing details about the PowerVS workspace, subnet, and Direct Link you want to migrate. (Step 4 of the docs)

You will receive a reply in the case when the necessary action is taken on the PowerVS support side.

When you access the workspace, you will notice that `Cloud connections` and `VPN connections` have disappeared from the Networking menu on the left side of the workspace. PER enabled workspaces cannot use these functions, so this indicates that the workspace has been migrated to a PER enabled environment.

[Before]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/0bafd31b-8262-f038-cfa9-2176cdc103a3.png)


[After]
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/e79f48ad-0799-43cb-f5a3-ac486b4c0851.png)

# Create PER+Transit Gateway route

We are ready to use PER from the workspace, but communication is still done via Direct Link.
The following tasks will switch to communication via PER instead of using Direct Link.

Order a Transit Gateway and create connections to PowerVS and VPC, as PER-enabled workspaces need to communicate with x86 IaaS and/or on-premises via Transit Gateway. (Step 5 of the docs)
Before the request to the case, the workspace did not appear in the `Power Systems Virtual Server` type on the Transit Gateway, but now that it is a PER enabled workspace, it does appear.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/4dbb05b4-bd85-0ffd-23e2-8c9f7b00d23a.png)


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/8a5e766b-c468-1320-659d-c10da9f95ac1.png)


We can see that routing information is advertised from both PowerVS and VPC.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/04406367-84f2-e326-8fbd-226447acbaa4.png)


At this point, two routes are available for routing between PowerVS and VPC: "via Direct Link" and "via PER+Transit Gateway".


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/80043f00-fda5-79a5-99f7-d501aaef08e4.png)

Note that Transit Gateways connected to PowerVS are priced differently than regular Transit Gateways (less expensive than regular Transit Gateways).
Local type Transit Gateways connected to PowerVS do not charge for data transfer.
https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-pricing-virtual-server-on-cloud#per-pricing

# Eliminate Direct Link routes

Next, we will stop using the routes via Direct Link that we have been using so far.
Specifically, set `Deny all import routes` in the `Import route filters` of Direct Link's filtering function to block routing information from PowerVS. (Step 5 of the docs)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/de5a6850-bda4-3227-e06e-88f0e66ea907.png)

Since the route via Direct Link is no longer available, communication will be via the route via PER.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/dacd2e8b-8361-9eec-ec2a-bae6816b315a.png)


I enabled the `Deny all import routes` setting on the Direct Link while continuing to ping the PowerVS LPAR from a server in the VPC.
In my environment, there was no packet loss and only a few seconds delay (line 6 below).

```
64 bytes from 172.16.50.157: icmp_seq=115 ttl=250 time=0.518 ms
64 bytes from 172.16.50.157: icmp_seq=116 ttl=250 time=0.528 ms
64 bytes from 172.16.50.157: icmp_seq=117 ttl=250 time=0.470 ms
64 bytes from 172.16.50.157: icmp_seq=118 ttl=250 time=0.515 ms
64 bytes from 172.16.50.157: icmp_seq=119 ttl=250 time=0.538 ms
64 bytes from 172.16.50.157: icmp_seq=120 ttl=250 time=4.92 ms
64 bytes from 172.16.50.157: icmp_seq=121 ttl=250 time=0.503 ms
64 bytes from 172.16.50.157: icmp_seq=122 ttl=250 time=0.475 ms
64 bytes from 172.16.50.157: icmp_seq=123 ttl=250 time=0.557 ms
64 bytes from 172.16.50.157: icmp_seq=124 ttl=250 time=0.564 ms
```

# Delete the Direct Link

Once it is confirmed that communication via PER is working without problems even though the route via Direct Link is blocked, delete the Direct Link (Step 6 of docs procedure).

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/59627/ebffeac5-3c42-0193-1710-845880ba90cc.png)

Please update the case to indicate that Step 6 is complete.
When Step 7 is completed on the support side, the migration is complete.