この章ではコンピュート、ディスク、システムサービスオファリングについて述べています。ネットワークオファリングに関してはユーザー向けの「ネットワークの設定」にて述べられています。
8.1. Compute and Disk Service Offerings
A service offering is a set of virtual hardware features such as CPU core count and speed, memory, and disk size. The CloudStack administrator can set up various offerings, and then end users choose from the available offerings when they create a new VM. A service offering includes the following elements:
CPU, memory, and network resource guarantees
How resources are metered
How the resource usage is charged
How often the charges are generated
For example, one service offering might allow users to create a virtual machine instance that is equivalent to a 1 GHz Intel® Core™ 2 CPU, with 1 GB memory at $0.20/hour, with network traffic metered at $0.10/GB. Based on the user’s selected offering, CloudStack emits usage records that can be integrated with billing systems. CloudStack separates service offerings into compute offerings and disk offerings. The computing service offering specifies:
The disk offering specifies:
8.1.1. 新しいコンピューティングオファリングの作成
新しいコンピューティングオファリングを作成するには
CloudStack ユーザーインターフェイスに管理者特権でログインします。
左側のナビゲーションバーで[Service Offerings]をクリックします。
[Select Offering]ボックスの一覧で[Compute Offering]を選択します。
[Add Compute Offering]をクリックします。
ダイアログボックスで次の選択を行います。
Name: サービスオファリングに指定する名前です。
Description: ユーザーに表示される、オファリングの短い説明です。
Storage type: ゲストに割り当てるディスクの種類です。[Local]を選択すると、ハイパーバイザーホストに直接アタッチされているストレージから割り当てます。[Shared]を選択すると、NFS 経由でアクセスできるストレージ から割り当てます。
# of CPU cores: このオファリングを使用するインスタンスに割り当てるコアの数です。
CPU(in MHz): インスタンスに割り当てるコアの CPU 速度です。たとえば、2GHz クロックを提供する場合は\n「2000」と指定します。
Memory(in MB): インスタンスに割り当てるメモリの量(メガバイト単位)です。たとえば、2GB の RAM を提供す る場合は「2048」と指定します。
Network Rate: 1 秒間に許可される MB 単位のデータ転送速度です。
Offer HA: オンにする場合は、ユーザーは監視対象であり可能な限り可用性の高い仮想マシンを選択できます。
Storage Tags: このディスクのプライマリストレージに関連付けるタグです。
Host Tags: (オプション)ホストの整理に使用するタグです。
CPU cap: 使用率に余裕があっても、CPU 使用率に制限を設けるどうかを指定します。
Public: サービスオファリングを使用できるドメインが、すべてのドメインか一部のドメインのみかを示します。オ ンの場合は、すべてのドメインで使用できるようになります。オフの場合は、対象がサブドメインに制限されます。 サブドメインをボックスの一覧から選択します。
[Add]をクリックします。
システムサービスオファリングを作成します。
CloudStack ユーザーインターフェイスに管理者としてログインします。
[Service Offerings]をクリックします。
[Select Offering]ボックスの一覧で[Disk Offerings]を選択します。
[Add Disk Offering]をクリックします。
ダイアログボックスで次の選択を行います。
Name: システムオファリングに指定する名前です。
Description: ユーザーに表示される、オファリングの短い説明です。
Custom Disk Size: オンにした場合は、ユーザーは独自のディスクサイズを設定できます。オフにした場合は、 ルート管理者が[Disk Size]ボックスに値を定義する必要があります。
Disk Size: [Custom Disk Size]チェックボックスがオフの場合にのみ表示されます。ボリュームサイズを GB 単位 で定義します。
Storage Tags(オプション): このディスクのプライマリストレージに関連付けるタグです。タグはストレージの属性をコンマで区切った一覧です。たとえば「ssd,blue」です。タグはプライマリストレージにも追加されます。 CloudStack により、ディスクオファリングのタグとストレージのタグが照合されます。ボリュームを準備するために、ディスクオファリングにタグが存在する場合は、そのタグはプライマリストレージにも存在する必要があります。そのようなプライマリストレージが存在しない場合は、このディスクオファリングからの割り当てに失敗します。
Public: オファリングを使用できるドメインが、すべてのドメインか一部のドメインのみかを示します。オンの場合は、すべてのドメインで使用できるようになります。オフの場合は、対象がサブドメインに制限されます。CloudStack がサブドメイン名を表示するので対象となるサブドメインをボックスの一覧から選択します。
[Add]をクリックします。
8.1.3. Modifying or Deleting a Service Offering
Service offerings cannot be changed once created. This applies to both compute offerings and disk offerings.
A service offering can be deleted. If it is no longer in use, it is deleted immediately and permanently. If the service offering is still in use, it will remain in the database until all the virtual machines referencing it have been deleted. After deletion by the administrator, a service offering will not be available to end users that are creating new instances.
8.2. System Service Offerings
System service offerings provide a choice of CPU speed, number of CPUs, tags, and RAM size, just as other service offerings do. But rather than being used for virtual machine instances and exposed to users, system service offerings are used to change the default properties of virtual routers, console proxies, and other system VMs. System service offerings are visible only to the CloudStack root administrator. CloudStack provides default system service offerings. The CloudStack root administrator can create additional custom system service offerings.
When CloudStack creates a virtual router for a guest network, it uses default settings which are defined in the system service offering associated with the network offering. You can upgrade the capabilities of the virtual router by applying a new network offering that contains a different system service offering. All virtual routers in that network will begin using the settings from the new service offering.
8.2.1. Creating a New System Service Offering
システムサービスオファリングを作成します。
CloudStack ユーザーインターフェイスに管理者としてログインします。
[Service Offerings]をクリックします。
In Select Offering, choose System Offering.
Click Add System Service Offering.
ダイアログボックスで次の選択を行います。
Name: システムオファリングに指定する名前です。
Description: ユーザーに表示される、オファリングの短い説明です。
System VM Type. Select the type of system virtual machine that this offering is intended to support.
Storage type. The type of disk that should be allocated. Local allocates from storage attached directly to the host where the system VM is running. Shared allocates from storage accessible via NFS.
# of CPU cores. The number of cores which should be allocated to a system VM with this offering
CPU (in MHz). The CPU speed of the cores that the system VM is allocated. For example, "2000" would provide for a 2 GHz clock.
Memory (in MB). The amount of memory in megabytes that the system VM should be allocated. For example, "2048" would provide for a 2 GB RAM allocation.
Network Rate. Allowed data transfer rate in MB per second.
Offer HA. If yes, the administrator can choose to have the system VM be monitored and as highly available as possible.
Storage Tags. The tags that should be associated with the primary storage used by the system VM.
Host Tags. (Optional) Any tags that you use to organize your hosts
CPU cap. Whether to limit the level of CPU usage even if spare capacity is available.
Public: オファリングを使用できるドメインが、すべてのドメインか一部のドメインのみかを示します。オンの場合は、すべてのドメインで使用できるようになります。オフの場合は、対象がサブドメインに制限されます。CloudStack がサブドメイン名を表示するので対象となるサブドメインをボックスの一覧から選択します。
[Add]をクリックします。
Network throttling is the process of controlling the network access and bandwidth usage based on certain rules. CloudStack controls this behaviour of the guest networks in the cloud by using the network rate parameter. This parameter is defined as the default data transfer rate in Mbps (Megabits Per Second) allowed in a guest network. It defines the upper limits for network utilization. If the current utilization is below the allowed upper limits, access is granted, else revoked.
You can throttle the network bandwidth either to control the usage above a certain limit for some accounts, or to control network congestion in a large cloud environment. The network rate for your cloud can be configured on the following:
Network Offering
Service Offering
Global parameter
If network rate is set to NULL in service offering, the value provided in the vm.network.throttling.rate global parameter is applied. If the value is set to NULL for network offering, the value provided in the network.throttling.rate global parameter is considered.
For the default public, storage, and management networks, network rate is set to 0. This implies that the public, storage, and management networks will have unlimited bandwidth by default. For default guest networks, network rate is set to NULL. In this case, network rate is defaulted to the global parameter value.
The following table gives you an overview of how network rate is applied on different types of networks in CloudStack.
A guest VM must have a default network, and can also have many additional networks. Depending on various parameters, such as the host and virtual switch used, you can observe a difference in the network rate in your cloud. For example, on a VMware host the actual network rate varies based on where they are configured (compute offering, network offering, or both); the network type (shared or isolated); and traffic direction (ingress or egress).
The network rate set for a network offering used by a particular network in CloudStack is used for the traffic shaping policy of a port group, for example: port group A, for that network: a particular subnet or VLAN on the actual network. The virtual routers for that network connects to the port group A, and by default instances in that network connects to this port group. However, if an instance is deployed with a compute offering with the network rate set, and if this rate is used for the traffic shaping policy of another port group for the network, for example port group B, then instances using this compute offering are connected to the port group B, instead of connecting to port group A.
The traffic shaping policy on standard port groups in VMware only applies to the egress traffic, and the net effect depends on the type of network used in CloudStack. In shared networks, ingress traffic is unlimited for CloudStack, and egress traffic is limited to the rate that applies to the port group used by the instance if any. If the compute offering has a network rate configured, this rate applies to the egress traffic, otherwise the network rate set for the network offering applies. For isolated networks, the network rate set for the network offering, if any, effectively applies to the ingress traffic. This is mainly because the network rate set for the network offering applies to the egress traffic from the virtual router to the instance. The egress traffic is limited by the rate that applies to the port group used by the instance if any, similar to shared networks.
For example:
Network rate of network offering = 10 Mbps
Network rate of compute offering = 200 Mbps
In shared networks, ingress traffic will not be limited for CloudStack, while egress traffic will be limited to 200 Mbps. In an isolated network, ingress traffic will be limited to 10 Mbps and egress to 200 Mbps.