1. はじめに
IBM CloudのVPCで、Dedicated hostがGAされたので試してみた。Dedicated Hostによって、Hypervisor層までの管理をIBM Cloudに任せたまま、そのホストサーバーをまるごと自アカウント専有で利用可能になる。
2. Dedicated Hostの特徴
docsは以下の通り。
- https://cloud.ibm.com/docs/vpc?topic=vpc-creating-dedicated-hosts-instances&locale=en
- https://cloud.ibm.com/docs/vpc?topic=vpc-faqs-dedicated-host&locale=en
検証を進めていくうちに、以下の特徴があることに気がついたのであらかじめ列挙する。
- 専有環境を提供するため、ホスト単位での購入となる。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 Host
とSpecify 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 xxx@xxx.xxx.com...
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.
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を注文できないし、起動もできない(すでに稼働中のサーバーは影響なし)
ステータスと変更は以下から確認できる。
こうすることで、既存の稼働中のサーバーはそのまま稼働するが、新規にこのdedicated hostにプロビジョニングも稼働もできなくなる。この特性を利用すると、Specify Group
で作成したVSIに対して、
- 移動させたいVSIを停止する
- そのVSIを配置したいdedicated hostのみを
Instance placement=enabled
にし、それ以外のdedicated hostはInstance placement=disabled
にする。 - 移動させたい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>
で確認可能である。
# ibmcloud is instance 02g7_f4b930c5-e268-4fe2-9945-9eb1398c0990
Getting instance 02g7_f4b930c5-e268-4fe2-9945-9eb1398c0990 under account xxx as user xxxxxx@xx.xxx.xxx...
(途中略)
Placement ID Name Resource type
02g7-337d704b-e48f-41ae-9662-c5582d808cfc dh1 dedicated_host
# ibmcloud is instance 02g7_93dab327-3a9d-4615-80b4-74f3425551ea
Getting instance 02g7_93dab327-3a9d-4615-80b4-74f3425551ea under account xxx as user xxxxxx@xx.xxx.xxx...
(途中略)
Placement ID Name Resource type
02g7-0c41c5d5-a70c-49db-918b-e2abfcb888e3 dhgroup1-tok3 dedicated_host_group