IBM Cloud: VPC-Dedicated Hostを試してみた


1. はじめに

IBM CloudのVPCで、Dedicated hostがGAされたので試してみた。Dedicated Hostによって、Hypervisor層までの管理をIBM Cloudに任せたまま、そのホストサーバーをまるごと自アカウント専有で利用可能になる。

2. Dedicated Hostの特徴

docsは以下の通り。

検証を進めていくうちに、以下の特徴があることに気がついたのであらかじめ列挙する。

  • 専有環境を提供するため、ホスト単位での購入となる。dedicated hostを購入後、VSI注文時にdedicated hostを指定する。
  • dedicated host自体は時間課金での利用になり、Sustained usage discountも有効化されている。
  • まともに利用する場合には、VPCのデフォルトのQuotaを上げる必要がある。
  • dedicated hostは必ず1つのdedicated groupに属する必要がある。逆に言うと、dedicated hostを購入するためには、dedicated groupを事前に作成しておく必要がある。
  • dedicated host作成時にはVPCの指定をしない。つまり、dedicated hostは特定のVPCに所属せず複数のVPCで共通のdedicated hostを利用できる(確かにVPCが異なっていても、シングルアカウントであることには違いはない)
  • VSI注文時にdedicated hostを指定する場合には、Specify HostSpecify Groupがあるが、この違いはとても重要(現状、どちらで注文したのかを確認するためにはCLIが必要)。
    • Specify Host: そのdedicated ホストでしか起動できない。もしデプロイされたdedicatedhostにおいて、Instance placement=disabledとなっていたら、そのVSIは起動できない。
    • Specify Group: 過去に利用していたホストでInstance placement=disabledとなっていても、同じdedicated groupの中でInstance placement=enabledとなっているホストがあればそこで起動可能。

3. Caseを起票してQuotaの上限を上げる。

デフォルトでは、vCPUは200 per regionというQuotaが存在する。プロファイルを以下のコマンドで確認したところ、1ホストあたり152vCPUであり、簡単にquotaを超えてしまう。そのため、Caseを起票して上限を増やしてもらうことば望ましい。私の場合はすでに90vCPUをpublic VSIとして利用していたので、1つもdedicated hostが作れない状態であった。

# ibmcloud is dedicated-host-profiles
Listing host profiles for generation 2 compute in region jp-tok under account xxx as user [email protected]...
Name                Architecture   CPU Socket Count   vCPUs   Memory   Family     Class
cx2-host-152x304    amd64          4                  152     304      compute    cx2
bx2-host-152x608    amd64          4                  152     608      balanced   bx2
mx2-host-152x1216   amd64          4                  152     1216     memory     mx2

なの、この情報はFAQにも書かれてある。

Q: Why can I only create one dedicated host per region?

A: When you provision dedicated hosts, the vCPU associated with your dedicated hosts counts toward the total vCPU for virtual server instances per region. The standard quota for virtual servers vCPU is 200. The dedicated host profile uses 152 vCPUs. To increase your vCPU quota, contact Support. For more information, see Quotas.

Caseの英文例
Hello, can you increase the upper limit of vCPU in VPC ?

1) The Account ID (32-character ID): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2) Generation 1 or 2: 2
3) Availability Zone: Tokyo1/Tokyo2/Tokyo3
4) Resource to be update and desired value change: Max vCPU : 400
5) Production or Staging Environment? :  Staging
6) Justification for request: We're trying to deploy two dedicated host, but it requires 152 vCPU per host, meaning additional 304 vCPU resources are required. The current resource is limited to Quota: 200, so we want you to increase the upper limit.

Thanks for your help in advance.

ここでのAccount IDはManage->Account->Account Settingsの以下に相当。

ちなみにQuotaに引っかかった場合はDedicated Host作成時に以下のようなエラーが表示される。

4. Dedicated hostおよびDedicated host groupの注文

  • 以下の画面から作成
  • dedicated hostの名前/リソースグループ/タグを記入
  • ロケーション、プロファイル、dedicated groupを指定。dedicated groupはデフォルトでは存在していないので、New dedicated groupから作成する。
  • 上記で作成したdedicated groupを指定してCreateする。

同様にdh2というdedicated hostも作成する。

5. VSIの注文

特筆すべき箇所は以下の2つ。

  • Dedicated host指定もしくはDedicated Group指定のどちらかでプロビジョニングできる。
  • Dedicated hostをcxで作ったので、選択可能なプロファイルもcxからしか選べない。

注文が完了すると、以下のようになり、どのdedicated hostを利用しているかも確認できる。

6. VSIのdedicated host間の移動について

dedicated hostにはInstance placementという属性がある。

  • enabled; 新規にVSIを注文できるし、起動もできる。
  • disabled: 新規にVSIを注文できないし、起動もできない(すでに稼働中のサーバーは影響なし)

ステータスと変更は以下から確認できる。

  • 現行のステータスはenabled.
  • ここから変更可能。
  • 変更後、disabledになった。

こうすることで、既存の稼働中のサーバーはそのまま稼働するが、新規にこのdedicated hostにプロビジョニングも稼働もできなくなる。この特性を利用すると、Specify Groupで作成したVSIに対して、

  1. 移動させたいVSIを停止する
  2. そのVSIを配置したいdedicated hostのみをInstance placement=enabledにし、それ以外のdedicated hostはInstance placement=disabledにする。
  3. 移動させたいVSIを起動すると、Instance placement=enabledのdedicated hostで起動する。

とすることで、対象のdedicated hostにVSIを移動させることができる。このあたりは、FAQにも書かれてある。

Q: What are the advantages of provisioning instances on a dedicated group versus a dedicated host?

A: Provisioning instances on a dedicated group allows your instances to move between hosts if the need ever occurs. For example, if you want to decrease the size of your dedicated host group, you can stop instances on one of the hosts and disable placement for the host that you want to decommission. Then, when you restart the instances they are started on another host in the group if capacity is available.

ただし、上記のFAQに書いてあるように、このやり方によるdedicated hostの移動はSpecify Groupで注文したVSIだけであり、Specify Hostで注文したVSIはそのdedicated hostのInstance placementがdisabledでも他のdedicated hostに移動せずに以下のようなエラーになる。

VSIをSpecify Groupで注文したかSpecify Hostで注文したかはUIからは分からないが、CLIであればibmcloud is instance <INSTANCE_ID>で確認可能である。

SpecifyHostで作成したVSI
# ibmcloud is instance 02g7_f4b930c5-e268-4fe2-9945-9eb1398c0990
Getting instance 02g7_f4b930c5-e268-4fe2-9945-9eb1398c0990 under account xxx as user [email protected]...

(途中略)

Placement            ID                                          Name   Resource type
                     02g7-337d704b-e48f-41ae-9662-c5582d808cfc   dh1    dedicated_host
SpecifyGroupで作成したVSI
# ibmcloud is instance 02g7_93dab327-3a9d-4615-80b4-74f3425551ea
Getting instance 02g7_93dab327-3a9d-4615-80b4-74f3425551ea under account xxx as user [email protected]...

(途中略)

Placement            ID                                          Name            Resource type
                     02g7-0c41c5d5-a70c-49db-918b-e2abfcb888e3   dhgroup1-tok3   dedicated_host_group