通过Softlayer API创建IBM VM需要更长的时间

问题描述 投票:1回答:1

我按照以下链接中给出的示例创建了一个新的IBM-cloud VM。https://www.ibm.com/developerworks/cloud/library/cl-softlayer-go-overview/index.html

func main() {
    sess := session.New()
    service := services.GetVirtualGuestService(sess)

    guestTpl := datatypes.Virtual_Guest{
        Hostname: sl.String("sample"),
        Domain: sl.String("example.com"),
        MaxMemory: sl.Int(2048),
        StartCpus: sl.Int(1),
        Datacenter: &datatypes.Location{Name: sl.String("sjc01")},
        OperatingSystemReferenceCode: sl.String("UBUNTU_LATEST"),
        LocalDiskFlag: sl.Bool(true),
    }

    guest, err := service.Mask("id;domain").CreateObject(&guestTpl)
    if err != nil {
        fmt.Println(err)
        os.Exit(-1)
    }

    fmt.Printf("New Virtual Guest created with ID %d\n", *guest.Id)
    fmt.Printf("Domain: %s\n", *guest.Domain)
}

IBM批准邮件将在一个小时后到达,并且与该VM相关的更新是在该邮件之后生成的。有没有办法减少时间?还是IBM行为需要更长的时间?

非常感谢您的帮助。

virtual-machine ibm-cloud ibm-cloud-infrastructure
1个回答
0
投票

我使用python完成该任务,有一天我不得不每1台服务器创建1个小时。因此,没有技术解决方案。 IBM以某种方式批准手动创建服务器。我建议举一张IBM的支持票。现在,我平均有3分钟创建一个虚拟服务器。

以防万一尝试使用B1_1X2X100之类的服务器。为了确保您使用标准的快速设置。

祝你好运

© www.soinside.com 2019 - 2024. All rights reserved.