File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 场景使用
2+
3+ 1 . 使用前请 ** 一定** 按照注意事项里内容进行配置 (若空则无需配置)
4+ 2 . 使用时命令如下
5+
6+ 拉取
7+ ```
8+ redc pull azure/vm
9+ ```
10+
11+ 开启
12+ ```
13+ redc run azure/vm
14+ ```
15+
16+ 查询
17+ ```
18+ redc status [uuid]
19+ ```
20+
21+ 关闭
22+ ```
23+ redc stop [uuid]
24+ ```
25+
26+ # 注意事项
27+
28+ ** Azure 凭据配置**
29+
30+ 需要配置 Azure 服务凭据,详见 [ redc 凭据管理] ( ../../README_CN.md#azure-配置 )
31+
32+ ``` yaml
33+ # ~/redc/config.yaml
34+ providers :
35+ azure :
36+ ARM_CLIENT_ID : " your-client-id"
37+ ARM_CLIENT_SECRET : " your-client-secret"
38+ ARM_SUBSCRIPTION_ID : " your-subscription-id"
39+ ARM_TENANT_ID : " your-tenant-id"
40+ ` ` `
41+
42+ **区域说明**
43+
44+ 默认使用 ` West Europe`(西欧洲)区域
45+
46+ **配额问题**
47+
48+ Azure 创建虚拟机需要满足以下条件:
49+
50+ 1. **区域配额**:目标区域需要有可用的 vCPU 配额
51+ 2. **SKU 可用性**:所选 VM 规格在该区域需要有可用容量
52+
53+ 如遇到以下错误:
54+ - `SkuNotAvailable` : VM 规格在当前区域不可用 → 更换 `vm_size` 或 `location`
55+ - `quota exceeded` : vCPU 配额不足 → 在 Azure 门户申请增加配额,或更换区域
56+
57+ **默认配置**
58+
59+ | 参数 | 默认值 |
60+ |------|--------|
61+ | VM 规格 | Standard_D2a_v4 |
62+ | 区域 | West Europe |
63+ | 系统镜像 | Ubuntu 18.04 LTS |
64+ | 用户名 | redcadmin |
65+ | 密码 | 自动生成 |
66+
67+ **自定义参数**
68+
69+ 可以通过 `terraform.tfvars` 覆盖默认配置:
70+
71+ ` ` ` hcl
72+ instance_password = "YourPassword123"
73+ ` ` `
Original file line number Diff line number Diff line change 11{
22 "name" :" vm" ,
33 "user" :" r0fus0d" ,
4- "version" : " 0.0.0 " ,
4+ "version" : " 0.0.1 " ,
55 "description" :" Azure VM 实例,该场景测试由于配额问题未跑通,仅记录参考" ,
66 "template" : " preset"
77}
You can’t perform that action at this time.
0 commit comments