简体   繁体   English

如何在通过 ibmcloud CLI 创建新的经典虚拟服务器时启用暂停计费

[英]How to enable Suspended Billing When Creating a New Classic Virtual Server via ibmcloud CLI

Using the ibmcloud CLI, how do I specify Suspended billing?使用ibmcloud CLI,我如何指定暂停计费?

I am trying to create two identical VM instances, the first via the GUI and the second via the ibmcloud CLI.我正在尝试创建两个相同的 VM 实例,第一个通过 GUI,第二个通过ibmcloud CLI。

Classic Infrastructure.经典基础设施。

CLI command: CLI 命令:

ibmcloud sl vs create -H ibm -D example.com -c 1 -m 2048 -d dal13 -o UBUNTU_18_64 --disk 25 --san

When I compare the two instances in the GUI, they are identical except for hostname, IP addresses and Suspended billing.当我在 GUI 中比较两个实例时,除了主机名、IP 地址和暂停计费外,它们是相同的。 The are also identical when using the CLI command ibmcloud sl vs detail ID .使用 CLI 命令ibmcloud sl vs detail ID时,它们也是相同的。

The problem I am trying to solve is: instances created with the CLI have Suspending billing as Unavailable.我要解决的问题是:使用 CLI 创建的实例将暂停计费视为不可用。 Instances created thru the GUI have Suspended billing as Enabled on Power Off.通过 GUI 创建的实例在关机时已启用暂停计费。

This link is the documentation that I am using for creating an instance with the CLI.链接是我用于使用 CLI 创建实例的文档。 No mention of Suspended billing options.没有提到暂停的计费选项。

I solved this problem, but I am very open to additional information.我解决了这个问题,但我对其他信息非常开放。 Please comment if you know the link to any documentation on this matter.如果您知道有关此问题的任何文档的链接,请发表评论。

It appears that you must select a preconfigured virtual server instance type called "flavor" to enabled suspended billing.看来您必须 select 一个名为“flavor”的预配置虚拟服务器实例类型才能启用暂停计费。 I could not find any clear documentation on this, but I saw this in API calls link .我找不到任何明确的文档,但我在 API 调用链接中看到了这一点。

I found this command which lists the flavors available:我发现这个命令列出了可用的口味:

ibmcloud sl vs options

This CLI command creates an instance with suspended billing enabled.此 CLI 命令创建一个启用暂停计费的实例。 Notice the use of the --flavor command line option:注意--flavor命令行选项的使用:

ibmcloud sl vs create -H ibm2 -D example.com --flavor B1_1X2X25 -d dal13 -o UBUNTU_18_64 --san

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM