12.4. Methods
12.4.1. 创建存储域 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
创建新存储域需要
名称、类型、主机和存储 元素。使用 id 属性或 name 元素识别 host 元素。
您可以通过在
POST 请求中指定 <wipe _after_delete> 来默认在存储域上启用 wipe after delete 选项。可以在创建域后编辑此选项,但是这样做不会在删除已存在的磁盘属性后更改擦除。
例 12.3. 创建存储域
POST /ovirt-engine/api/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
<storage_domain>
<name>data1</name>
<type>data</type>
<host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
<storage>
<type>nfs</type>
<address>172.31.0.6</address>
<path>/exports/RHEVX/images/0</path>
</storage>
</storage_domain>
API 用户在创建后将存储域附加到数据中心。