This is an archive version of the document. To get the most up-to-date information, see the current version.

(POST) /cloud/hardwarePlans

In this article

    Configures a new hardware plan on the Veeam backup server connected to Veeam Backup Enterprise Manager.

    Request

    To create a new hardware plan, you need to send the POST HTTP request to the URL of the /cloud/hardwarePlans resource.

    HTTP Request

    POST http://<Enterprise-Manager>:9399/api/cloud/hardwarePlans

    Request Header

    The request contains the following headers:

    Header

    Required

    Description

    X-RestSvcSessionId

    True

    The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. To learn more, see Authentication and Security.

    Request Body

    In the request body, the client must send parameters for the new hardware plan. The body of the request must conform to the XML Schema Definition of Veeam Backup Enterprise Manager RESTful API.

    The request body must contain the following elements:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    BackupServerUid

    String

    UID of the Veeam backup server on which the hardware plan must be created.

    Yes

    1/1

    Name

    String

    Name for the hardware plan, for example: VMware Hardware Plan.

    Yes

    1/1

    Description

    String

    Description for the hardware plan.

    Yes

    0/1

    ProcessorUsageLimitMhz

    Int

    Limit of CPU that can be utilized by all VM replicas of the tenant subscribed to the hardware plan.

    Yes

    1/1

    MemoryUsageLimitMb

    Int

    Limit of RAM that can be utilized by all VM replicas of the tenant subscribed to the hardware plan.

    Yes

    1/1

    HardwarePlanDetails

    ViCloudHardwarePlan or HvCloudHardwarePlan

    Parameters for the created hardware plan. To learn more about creating a VMware hardware plan, see VMware Hardware Plan Settings. To learn more about creating a Hyper-V hardware plan, see Hyper-V Hardware Plan Settings.

    Yes

    1/1

    For example:

    <?xml version="1.0" encoding="utf-8"?>
    <CloudHardwarePlanCreateSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <BackupServerUid>urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982</BackupServerUid>
     <Name>VMware Gold</Name>
     <Description>Hardware Plan for VMware</Description>
     <ProcessorUsageLimitMhz>10000</ProcessorUsageLimitMhz>
     <MemoryUsageLimitMb>20000</MemoryUsageLimitMb>
     <HardwarePlanDetails>
       <ViCloudHardwarePlan>
         <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
         <ParentType>HostSystem</ParentType>
         <ParentName>esx01.tech.local</ParentName>
         <Datastores>
           <Datastore>
             <FriendlyName>Cloud Replicas</FriendlyName>
             <DatastoreType>Datastore</DatastoreType>
             <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
             <QuotaGb>500</QuotaGb>
           </Datastore>
         </Datastores>
         <Network>
           <CountWithInternet>1</CountWithInternet>
           <CountWithoutInternet>0</CountWithoutInternet>
         </Network>
       </ViCloudHardwarePlan>
     </HardwarePlanDetails>
    </CloudHardwarePlanCreateSpec>

    VMware Hardware Plan Settings

    You can define the following parameters for the VMware hardware plan:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    HypervisorHostRef

    URN

    UID of the virtualization host on which tenant VM replicas should be registered, for example: urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438.

    Yes

    1/1

    Datastores

    ViCloudHardwarePlanDatastoreInfoListType

    Datastore parameters for the created hardware plan. To learn more, see Datastore Settings.

    Yes

    1/1

    Network

    CloudHardwarePlanNetworkInfo

    Network parameters for the created hardware plan. To learn more, see Network Settings.

    Yes

    0/1

    (POST) /cloud/hardwarePlans Note:

    VMware hardware plan settings must be defined in the ViCloudHardwarePlan section of the request body.

    For example:

    <ViCloudHardwarePlan>
     <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
     <ParentType>HostSystem</ParentType>
     <ParentName>esx01.tech.local</ParentName>
     <Datastores>
       <Datastore>
         <FriendlyName>Cloud Replicas</FriendlyName>
         <DatastoreType>Datastore</DatastoreType>
         <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
         <QuotaGb>500</QuotaGb>
       </Datastore>
     </Datastores>
     <Network>
       <CountWithInternet>1</CountWithInternet>
       <CountWithoutInternet>0</CountWithoutInternet>
     </Network>
    </ViCloudHardwarePlan>

    Datastore Settings

    You can define the following datastore parameters for the VMware hardware plan:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    FriendlyName

    String

    Name of the datastore as displayed to the tenant, for example: Cloud Replicas.

    Yes

    1/1

    DatastoreType

    String

    Type of the datastore.

    Yes

    1/1

    Reference

    HierarchyObjRefType

    Reference to the datastore on which tenant VM replicas should be stored, for example: urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441.

    Yes

    1/1

    QuotaGb

    Int

    Storage quota for tenant VM replicas on the datastore (in GB).

    Yes

    1/1

    For example:

    <Datastores>
     <Datastore>
       <FriendlyName>Cloud Replicas</FriendlyName>
       <DatastoreType>Datastore</DatastoreType>
       <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
       <QuotaGb>500</QuotaGb>
     </Datastore>
    </Datastores>

    Hyper-V Hardware Plan Settings

    You can define the following parameters for the for the Hyper-V hardware plan:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    HypervisorHostRef

    HierarchyObjRefType

    UID of the virtualization host on which tenant VM replicas should be registered, for example: urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb.

    .

    Yes

    1/1

    Volumes

    HvCloudHardwarePlanVolumesInfoListType

    Storage volume parameters for the created hardware plan. To learn more, see Volume Settings.

    Yes

    1/1

    Network

    CloudHardwarePlanNetworkInfo

    Network parameters for the created hardware plan. To learn more, see Network Settings.

    Yes

    0/1

    (POST) /cloud/hardwarePlans Note:

    Hyper-V hardware plan settings must be defined in the HvCloudHardwarePlan section of the request body.

    For example:

    <HvCloudHardwarePlan>
     <HypervisorHostRef>urn:HyperV:Host:849a937a-3416-4f03-8111-67b06393afcb.</HypervisorHostRef>
     <Volumes>
       <Volume>
         <FriendlyName>Cloud Replicas</FriendlyName>
         <VolumePath>D:\Replicas</VolumePath>
         <QuotaGb>300</QuotaGb>
       </Volume>
     </Volumes>
     <Network>
       <CountWithInternet>1</CountWithInternet>
       <CountWithoutInternet>1</CountWithoutInternet>
     </Network>
    </HvCloudHardwarePlan>

    Volume Settings

    You can define the following storage volume parameters for the Hyper-V hardware plan:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    FriendlyName

    String

    Name of the volume as displayed to the tenant, for example: Cloud Replicas.

    Yes

    1/1

    VolumePath

    String

    Path to a folder on thevolume in which tenant VM replica files should be stored.

    Yes

    1/1

    QuotaGb

    Int

    Storage quota for tenant VM replicas on the volume (in GB).

    Yes

    1/1

    For example:

    <Volumes>
     <Volume Id="66d75e14-a35a-4dfe-a919-9b2a3bf87e4a">
       <FriendlyName>Cloud Replicas</FriendlyName>
       <VolumePath>D:\Replicas</VolumePath>
        <QuotaGb>300</QuotaGb>
     </Volume>
    </Volumes>

    Network Settings

    You can define the following network parameters for the VMware or Hyper-V hardware plan:

    Element

    Type

    Description

    Modifiable

    Min/Max Occurrence

    CountWithInternet

    Int

    Number of networks with internet access that will be available to tenant VM replicas.

    Yes

    0/1

    CountWithoutInternet

    Int

    Number of networks without internet access that will be available to tenant VM replicas.

    Yes

    0/1

    For example:

    <Network>
     <CountWithInternet>1</CountWithInternet>
     <CountWithoutInternet>1</CountWithoutInternet>
    </Network>

    Query Parameters

    None.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns response code 202 Accepted.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTP headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the request body message: application/xml.

    Response Body

    None.

    Example

    The example below creates a VMware hardware plan on the Veeam backup server with ID 8fff3b8e-c3f1-4ef5-aecc-561f07bf9982.

    Request:

    POST http://localhost:9399/api/cloud/hardwarePlans

     

    Request Header:

    X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

     

    Request Body:

    <?xml version="1.0" encoding="utf-8"?>
    <CloudHardwarePlanCreateSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <BackupServerUid>urn:veeam:BackupServer:8fff3b8e-c3f1-4ef5-aecc-561f07bf9982</BackupServerUid>
     <Name>VMware Gold</Name>
     <Description>Hardware Plan for VMware</Description>
     <ProcessorUsageLimitMhz>10000</ProcessorUsageLimitMhz>
     <MemoryUsageLimitMb>20000</MemoryUsageLimitMb>
     <HardwarePlanDetails>
       <ViCloudHardwarePlan>
         <HypervisorHostRef>urn:VMware:Host:b7f17482-2f34-446c-976c-924539a98b0b.host-438</HypervisorHostRef>
         <ParentType>HostSystem</ParentType>
         <ParentName>esx01.tech.local</ParentName>
         <Datastores>
           <Datastore>
             <FriendlyName>Cloud Replicas</FriendlyName>
             <DatastoreType>Datastore</DatastoreType>
             <Reference>urn:VMware:Datastore:ed6ad5f1-671b-4875-9d81-72a431953aca.datastore-441</Reference>
             <QuotaGb>500</QuotaGb>
           </Datastore>
         </Datastores>
         <Network>
           <CountWithInternet>1</CountWithInternet>
           <CountWithoutInternet>0</CountWithoutInternet>
         </Network>
       </ViCloudHardwarePlan>
     </HardwarePlanDetails>
    </CloudHardwarePlanCreateSpec>

     

    Response:

    202 Accepted

     

    Response Body:

    <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
     <Links>
       <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
     </Links>
     <TaskId>task-1</TaskId>
     <State>Running</State>
     <Operation>CreateCloudGateway</Operation>
    </Task>

    To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

    Request:

    GET http://localhost:9399/api/tasks/task-1

     

    Request Header:

    X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

     

    Response:

    200 Success

     

    Response Body:

    <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
     <Links>
       <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
       <Link Rel="Related" Type="CloudGateway" Href="http://localhost:9399/api/cloud/gateways/917be225-6744-4777-8096-cbabaec55006?format=Entity" Name="" />
     </Links>
     <TaskId>task-1</TaskId>
     <State>Finished</State>
     <Operation>CreateCloudHardwarePlan</Operation>
     <Result Success="true">
       <Message>Ok</Message>
     </Result>
    </Task>